From 07ab77fd62bc9f03d0d42451f5572340e5c3507f Mon Sep 17 00:00:00 2001 From: ZhangKe Date: Tue, 30 Jan 2024 22:03:37 +0800 Subject: [PATCH] upgrade kotlin to 1.9.22 --- build.gradle.kts | 4 ++-- compiler/build.gradle.kts | 10 ++++++++-- core/build.gradle.kts | 9 ++++++++- gradle/wrapper/gradle-wrapper.properties | 6 ++++-- sample/app/build.gradle.kts | 13 +++++++++++++ sample/home/build.gradle.kts | 7 +++++++ sample/profile/build.gradle.kts | 7 +++++++ sample/sample-core/build.gradle.kts | 6 ++++++ sample/setting/build.gradle.kts | 9 ++++++++- 9 files changed, 63 insertions(+), 8 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f5e9bcd..4ecf8ee 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,4 @@ plugins { - kotlin("jvm") version "1.8.0" - id("com.google.devtools.ksp").version("1.8.0-1.0.9") + kotlin("jvm") version "1.9.22" + id("com.google.devtools.ksp").version("1.9.22-1.0.17") } diff --git a/compiler/build.gradle.kts b/compiler/build.gradle.kts index f687e35..f2aa6d4 100644 --- a/compiler/build.gradle.kts +++ b/compiler/build.gradle.kts @@ -5,17 +5,23 @@ plugins { } group = "com.zhangke.krouter" -version = "0.1.3" +version = "0.2.1" java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } +kotlin{ + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of("8")) + } +} + dependencies { implementation(kotlin("reflect")) implementation(project(":core")) - implementation("com.google.devtools.ksp:symbol-processing-api:1.8.0-1.0.9") + implementation("com.google.devtools.ksp:symbol-processing-api:1.9.22-1.0.17") implementation("com.squareup:kotlinpoet:1.12.0") } diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 0ffecdc..bc7aa89 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -5,13 +5,20 @@ plugins { } group = "com.zhangke.krouter" -version = "0.1.3" +version = "0.2.1" java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } +kotlin{ + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of("8")) + } +} +tasks.withType { duplicatesStrategy = DuplicatesStrategy.INHERIT } + dependencies { testImplementation("junit:junit:4.+") diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 60c76b3..1af9e09 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists \ No newline at end of file +zipStorePath=wrapper/dists diff --git a/sample/app/build.gradle.kts b/sample/app/build.gradle.kts index 18b96a9..92ed9be 100644 --- a/sample/app/build.gradle.kts +++ b/sample/app/build.gradle.kts @@ -1,3 +1,4 @@ + plugins { id("java") kotlin("jvm") @@ -9,6 +10,14 @@ java { targetCompatibility = JavaVersion.VERSION_1_8 } +kotlin{ + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of("8")) + } +} + +tasks.withType { duplicatesStrategy = DuplicatesStrategy.INHERIT } + kotlin { sourceSets.main { kotlin.srcDir("build/generated/ksp/main/kotlin") @@ -24,3 +33,7 @@ dependencies { implementation(project(":core")) ksp(project(":compiler")) } + +tasks.withType{ + duplicatesStrategy = DuplicatesStrategy.INHERIT +} diff --git a/sample/home/build.gradle.kts b/sample/home/build.gradle.kts index 9208654..3b096f3 100644 --- a/sample/home/build.gradle.kts +++ b/sample/home/build.gradle.kts @@ -4,12 +4,19 @@ plugins { id("com.google.devtools.ksp") } +tasks.withType{ + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } kotlin { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of("8")) + } sourceSets.main { kotlin.srcDir("build/generated/ksp/main/kotlin") resources.srcDir("build/generated/ksp/main/resources") diff --git a/sample/profile/build.gradle.kts b/sample/profile/build.gradle.kts index 9208654..036867f 100644 --- a/sample/profile/build.gradle.kts +++ b/sample/profile/build.gradle.kts @@ -10,12 +10,19 @@ java { } kotlin { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of("8")) + } sourceSets.main { kotlin.srcDir("build/generated/ksp/main/kotlin") resources.srcDir("build/generated/ksp/main/resources") } } +tasks.withType{ + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + dependencies { implementation(project(":sample:sample-core")) implementation(project(":core")) diff --git a/sample/sample-core/build.gradle.kts b/sample/sample-core/build.gradle.kts index 5b56d16..b5b111a 100644 --- a/sample/sample-core/build.gradle.kts +++ b/sample/sample-core/build.gradle.kts @@ -7,3 +7,9 @@ java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } + +kotlin{ + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of("8")) + } +} diff --git a/sample/setting/build.gradle.kts b/sample/setting/build.gradle.kts index 9208654..6af62ca 100644 --- a/sample/setting/build.gradle.kts +++ b/sample/setting/build.gradle.kts @@ -4,18 +4,25 @@ plugins { id("com.google.devtools.ksp") } +tasks.withType{ + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + + java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } kotlin { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of("8")) + } sourceSets.main { kotlin.srcDir("build/generated/ksp/main/kotlin") resources.srcDir("build/generated/ksp/main/resources") } } - dependencies { implementation(project(":sample:sample-core")) implementation(project(":core"))