-
-
Notifications
You must be signed in to change notification settings - Fork 66
Update Kotlin, KSP, KotlinPoet, and Gradle #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
buildscript { | ||
dependencies { | ||
with(libs.kotlin.gradle.get()) { | ||
classpath("$group:$name:$embeddedKotlinVersion") | ||
} | ||
} | ||
} | ||
Comment on lines
+1
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. curious why this is needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forcing Gradle to use Kotlin 1.9 results in errors, which I think has to do with https://kotlinlang.org/docs/whatsnew19.html#separate-compiler-plugins-for-official-kotlin-libraries but in any case Gradle has always said not to force a different version of Kotlin for their runtime because they offer no guarantees (Gradle 8.3 should have Kotlin 1.9 support). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah so this overrides the version of kotlin uses when compiling the build script logic right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://docs.gradle.org/8.3-rc-1/release-notes.html The rc releases sometimes have issues, but I've used them in the past with no problems. It should allow kapt to stay in if you really don't want to remove it yet. If you do want to remove kapt, I have a stashed changeset that's most of the way there, and I can make a PR. Unless you want the cathartic experience of ripping it out 😅 |
||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
dependencies { | ||
implementation(libs.kotiln.gradle) | ||
implementation(libs.kotlin.gradle) | ||
implementation(libs.detekt.gradle) | ||
// hack to access version catelouge https://github.com/gradle/gradle/issues/15383 | ||
// hack to access version catalogue https://github.com/gradle/gradle/issues/15383 | ||
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location)) | ||
} | ||
|
||
java { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: to run with java 20 I had to add
(17 probably would work as well) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using a toolchain here would probably be a valid use case (and I tested that it works), but the alternative is to not use java 20 until Gradle supports it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yeah true, I might end up adding a target here because it just means you'd be generating older class files than needed so it's not a huge issue, but it's not a priority or anything. |
||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
val nativeTargets = arrayOf( | ||
"linuxX64", | ||
"macosX64", "macosArm64", | ||
"iosArm64", "iosX64", "iosSimulatorArm64", | ||
"tvosArm64", "tvosX64", "tvosSimulatorArm64", | ||
"watchosArm32", "watchosArm64", "watchosX64", "watchosSimulatorArm64", | ||
) | ||
|
||
val nativeKspTestConfigurations = nativeTargets.map { | ||
@Suppress("DEPRECATION") | ||
"ksp${it.capitalize()}Test" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
org.gradle.parallel=true | ||
kotlin.mpp.stability.nowarn=true | ||
kotlin.mpp.enableGranularSourceSetsMetadata=true | ||
kotlin.native.ignoreDisabledTargets=true | ||
kotlin.native.binary.memoryModel=experimental | ||
org.gradle.jvmargs=-Xmx4G |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.2.1-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Uh oh!
There was an error while loading. Please reload this page.