Skip to content

Commit

Permalink
update to Kotlin 1.8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Mar 6, 2023
1 parent c929aa7 commit b13af85
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
10 changes: 5 additions & 5 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.0-green.svg
[![jCenter](https://img.shields.io/badge/Kotlin-1.8.10-green.svg
)](https://github.com/Foso/Sheasy/blob/master/LICENSE)


Expand All @@ -14,21 +14,21 @@
This is an example project that shows how to create a Kotlin Compiler Plugin. At compile time a gradle plugin will trigger the compiler plugin. The plugin will print "Hello from" and the name of the file that is being compiled, as a compiler warning to the terminal log.

<p>
<img src ="https://raw.githubusercontent.com/Foso/JK_KotlinCompilerPluginHelloWorld/master/docs/screenshot.png" />
<img src ="https://raw.githubusercontent.com/Foso/KotlinCompilerPluginExample/master/docs/screenshot.png" />

</p>

### Show some :heart: and star the repo to support the project

[![GitHub stars](https://img.shields.io/github/stars/Foso/JK_KotlinCompilerPluginHelloWorld.svg?style=social&label=Star)](https://github.com/Foso/JK_KotlinCompilerPluginHelloWorld) [![GitHub forks](https://img.shields.io/github/forks/Foso/JK_KotlinCompilerPluginHelloWorld.svg?style=social&label=Fork)](https://github.com/Foso/JK_KotlinCompilerPluginHelloWorld/fork) [![GitHub watchers](https://img.shields.io/github/watchers/Foso/JK_KotlinCompilerPluginHelloWorld.svg?style=social&label=Watch)](https://github.com/Foso/JK_KotlinCompilerPluginHelloWorld) [![Twitter Follow](https://img.shields.io/twitter/follow/jklingenberg_.svg?style=social)](https://twitter.com/jklingenberg_)
[![GitHub stars](https://img.shields.io/github/stars/Foso/KotlinCompilerPluginExample.svg?style=social&label=Star)](https://github.com/Foso/KotlinCompilerPluginExample) [![GitHub forks](https://img.shields.io/github/forks/Foso/KotlinCompilerPluginExample.svg?style=social&label=Fork)](https://github.com/Foso/KotlinCompilerPluginExample/fork) [![GitHub watchers](https://img.shields.io/github/watchers/Foso/KotlinCompilerPluginExample.svg?style=social&label=Watch)](https://github.com/Foso/KotlinCompilerPluginExample) [![Twitter Follow](https://img.shields.io/twitter/follow/jklingenberg_.svg?style=social)](https://twitter.com/jklingenberg_)


## 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.0 can have a totally different API.
> backwards compatibility guaranteed. Kotlin versions above 1.8.10 can have a totally different API.
* Inside the project folder run ` ./gradlew clean build`
* Inside the project folder run `./gradlew clean build`

The plugin is only active when the build cache is changed. This is why you need to run "clean" before building, when you want to see the log output again.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
}
}
plugins {
id("org.jetbrains.kotlin.multiplatform") version "1.8.0" apply false
id("org.jetbrains.kotlin.multiplatform") version "1.8.10" apply false
}
apply(plugin = "compiler.gradleplugin.helloworld")

Expand Down
7 changes: 4 additions & 3 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.0")
kotlin("kapt") version("1.8.0")
kotlin("jvm") version("1.8.10")
kotlin("kapt") version("1.8.10")
id("com.vanniktech.maven.publish") version("0.23.1")
`maven-publish`
signing
Expand All @@ -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.0")
compileOnly("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.8.10")
testImplementation("dev.zacsweers.kctfork:core:0.2.1")
testImplementation("junit:junit:4.13.2")
testImplementation("com.google.truth:truth:1.1.3")
Expand Down Expand Up @@ -113,3 +113,4 @@ tasks.withType<KotlinCompilationTask<*>>().configureEach {
compilerOptions.freeCompilerArgs.add("-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi")
}

//./gradlew clean :lib:compileKotlinJvm --no-daemon -Dorg.gradle.debug=true -Dkotlin.compiler.execution.strategy="in-process" -Dkotlin.daemon.jvm.options="-Xdebug,-Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n"
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.0")
kotlin("kapt") version("1.8.0")
kotlin("jvm") version("1.8.10")
kotlin("kapt") version("1.8.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.0")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.8.10")
}

gradlePlugin {
Expand Down
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.0"
id("org.jetbrains.kotlin.multiplatform") version "1.8.10"
}
apply(plugin = "compiler.gradleplugin.helloworld")

Expand Down
3 changes: 3 additions & 0 deletions lib/src/jvmMain/kotlin/sample/SampleJvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ actual object Platform {
actual val name: String = "JVM"
}

fun main() {

}

0 comments on commit b13af85

Please sign in to comment.