Skip to content

Commit db155eb

Browse files
committed
Updates
1 parent 98070fd commit db155eb

File tree

13 files changed

+83
-69
lines changed

13 files changed

+83
-69
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ gradle-app.setting
1515
# gradle/wrapper/gradle-wrapper.properties
1616

1717
.firebase
18+
19+
node_modules/

.idea/codeStyles/Project.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

build.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
plugins {
2-
kotlin("js") version "1.5.30"
2+
kotlin("js") version "1.7.10"
33
}
44

55
group = "net.kusik"
6-
version = "1.1-SNAPSHOT"
6+
version = "1.2-SNAPSHOT"
77

88
repositories {
9-
jcenter()
109
mavenCentral()
11-
maven { url = uri("https://dl.bintray.com/kotlin/kotlinx") }
10+
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
1211
}
1312

1413
dependencies {
1514
testImplementation(kotlin("test-js"))
16-
implementation("org.jetbrains.kotlinx:kotlinx-html:0.7.3")
15+
implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.8.0")
1716
}
1817

1918
kotlin {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/kotlin/GradleKotlinConverter.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,12 @@ object GradleKotlinConverter {
366366

367367
// this will only catch id "..." version ..., should skip id("...")
368368
// should get the id "..."
369-
val idExp = "id\\s*\".*?\"".toRegex()
369+
val idExp = "(id)\\s*\"(.*?)\"".toRegex()
370370

371371
return this.replace(idExp) {
372372
// remove the "id " before the real id
373-
val idValue = it.value.replace("id\\s*".toRegex(), "")
374-
"id($idValue)"
373+
val (id, value) = it.destructured
374+
"""$id("$value")"""
375375
}
376376
}
377377

@@ -381,13 +381,14 @@ object GradleKotlinConverter {
381381
// versionCode = 4
382382
fun String.addEquals(): String {
383383

384+
val compileSdk = "compileSdk"
384385
val signing = "keyAlias|keyPassword|storeFile|storePassword"
385386
val other = "multiDexEnabled|correctErrorTypes|javaMaxHeapSize|jumboMode|dimension|useSupportLibrary"
386387
val databinding = "dataBinding|viewBinding"
387-
val defaultConfig = "applicationId|versionCode|versionName|testInstrumentationRunner"
388+
val defaultConfig = "applicationId|minSdk|targetSdk|versionCode|versionName|testInstrumentationRunner"
388389
val negativeLookAhead = "(?!\\{)[^\\s]" // Don't want '{' as next word character
389390

390-
val versionExp = """($defaultConfig|$signing|$other|$databinding)\s*${negativeLookAhead}.*""".toRegex()
391+
val versionExp = """($compileSdk|$defaultConfig|$signing|$other|$databinding)\s*${negativeLookAhead}.*""".toRegex()
391392

392393
return this.replace(versionExp) {
393394
val split = it.value.split(" ")

0 commit comments

Comments
 (0)