From f8adf4f25f3d29499ee2199a0f19feadbcfc9e19 Mon Sep 17 00:00:00 2001 From: Jens Klingenberg Date: Wed, 20 Sep 2023 21:10:55 +0200 Subject: [PATCH] update to Kotlin 1.9.10 --- Readme.md | 4 ++-- build.gradle.kts | 4 +++- compiler-plugin/build.gradle.kts | 18 ++++-------------- gradle-plugin/build.gradle.kts | 6 +++--- gradle/libs.versions.toml | 2 ++ gradle/wrapper/gradle-wrapper.properties | 2 +- lib/build.gradle.kts | 2 +- 7 files changed, 16 insertions(+), 22 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/Readme.md b/Readme.md index 5218435..4f6a067 100644 --- a/Readme.md +++ b/Readme.md @@ -4,7 +4,7 @@ [![jCenter](https://img.shields.io/badge/Apache-2.0-green.svg )](https://github.com/Foso/KotlinReactNativeMpp/blob/master/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) -[![jCenter](https://img.shields.io/badge/Kotlin-1.8.22-green.svg +[![jCenter](https://img.shields.io/badge/Kotlin-1.9.10-green.svg )](https://github.com/Foso/Sheasy/blob/master/LICENSE) @@ -26,7 +26,7 @@ This is an example project that shows how to create a Kotlin Compiler Plugin. At ## Usage > :information_source: Please be aware that the Kotlin Compiler still doesn’t have any stable API and there is no -> backwards compatibility guaranteed. Kotlin versions above 1.8.22 can have a totally different API. +> backwards compatibility guaranteed. Kotlin versions above 1.9.10 can have a totally different API. * Inside the project folder run `./gradlew clean build` diff --git a/build.gradle.kts b/build.gradle.kts index eaec8e3..d6940a5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import org.gradle.kotlin.dsl.libs + buildscript { repositories { @@ -12,7 +14,7 @@ buildscript { } } plugins { - id("org.jetbrains.kotlin.multiplatform") version "1.8.22" apply false + id("org.jetbrains.kotlin.multiplatform") version libs.versions.kotlin apply false } apply(plugin = "compiler.gradleplugin.helloworld") diff --git a/compiler-plugin/build.gradle.kts b/compiler-plugin/build.gradle.kts index 834a72e..6d9c251 100644 --- a/compiler-plugin/build.gradle.kts +++ b/compiler-plugin/build.gradle.kts @@ -2,8 +2,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version("1.8.22") - kotlin("kapt") version("1.8.22") + kotlin("jvm") version("1.9.10") + kotlin("kapt") version("1.9.10") id("com.vanniktech.maven.publish") version("0.23.1") `maven-publish` signing @@ -30,7 +30,7 @@ val autoService = "1.0.1" dependencies { compileOnly("com.google.auto.service:auto-service:$autoService") kapt("com.google.auto.service:auto-service:$autoService") - compileOnly("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.8.22") + compileOnly("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.9.10") testImplementation("dev.zacsweers.kctfork:core:0.2.1") testImplementation("junit:junit:4.13.2") testImplementation("com.google.truth:truth:1.1.3") @@ -38,20 +38,10 @@ dependencies { } -tasks.register("sourcesJar", Jar::class) { - group = "build" - description = "Assembles Kotlin sources" - - archiveClassifier.set("sources") - from(sourceSets.main.get().allSource) - dependsOn(tasks.classes) -} - publishing { publications { create("default") { from(components["java"]) - artifact(tasks["sourcesJar"]) pom { name.set("compiler-plugin") @@ -102,7 +92,7 @@ publishing { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(8)) } } diff --git a/gradle-plugin/build.gradle.kts b/gradle-plugin/build.gradle.kts index bd69f69..3e4258d 100644 --- a/gradle-plugin/build.gradle.kts +++ b/gradle-plugin/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - kotlin("jvm") version("1.8.22") - kotlin("kapt") version("1.8.22") + kotlin("jvm") version("1.9.10") + kotlin("kapt") version("1.9.10") id("java-gradle-plugin") `maven-publish` } @@ -19,7 +19,7 @@ allprojects { } } dependencies { - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.8.22") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.10") } gradlePlugin { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..f0be209 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,2 @@ +[versions] +kotlin = "1.9.10" \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 648948f..978e634 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index 28f19eb..093e046 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("org.jetbrains.kotlin.multiplatform") version "1.8.22" + id("org.jetbrains.kotlin.multiplatform") version libs.versions.kotlin } apply(plugin = "compiler.gradleplugin.helloworld")