Skip to content

Commit

Permalink
update to Kotlin 1.9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Sep 20, 2023
1 parent c92717a commit f8adf4f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand All @@ -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`

Expand Down
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.gradle.kotlin.dsl.libs

buildscript {

repositories {
Expand All @@ -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")

Expand Down
18 changes: 4 additions & 14 deletions compiler-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,28 +30,18 @@ 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")
testImplementation(kotlin("reflect"))

}

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<MavenPublication>("default") {
from(components["java"])
artifact(tasks["sourcesJar"])

pom {
name.set("compiler-plugin")
Expand Down Expand Up @@ -102,7 +92,7 @@ publishing {

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
languageVersion.set(JavaLanguageVersion.of(8))
}
}

Expand Down
6 changes: 3 additions & 3 deletions gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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`
}
Expand All @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[versions]
kotlin = "1.9.10"
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")

Expand Down

0 comments on commit f8adf4f

Please sign in to comment.