Skip to content

Commit

Permalink
Update to Kotlin 1.8.20 (#5893)
Browse files Browse the repository at this point in the history
* Workaround for JetBrains/kotlin@b50a803

* Kotlin 1.8.20

* Don't explicitly enable new JVM incremental compilation

This is enabled by default in Kotlin 1.8.20

* Remove stdlib from Gradle plugin's classpath
  • Loading branch information
3flex committed Apr 6, 2023
1 parent ddefa8c commit 43f0796
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 8 deletions.
4 changes: 0 additions & 4 deletions build-logic/src/main/kotlin/module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ testing {
}
}

dependencies {
compileOnly(kotlin("stdlib-jdk8"))
}

java {
withSourcesJar()
withJavadocJar()
Expand Down
2 changes: 1 addition & 1 deletion detekt-compiler-plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kotlinCompilerChecksum=4c3fa7bc1bb9ef3058a2319d8bcc3b7196079f88e92fdcd8d304a46f4b6b5787
kotlinCompilerChecksum=10df74c3c6e2eafd4c7a5572352d37cbe41774996e42de627023cb4c82b50ae4

kotlin.code.style=official
systemProp.sonar.host.url=http://localhost:9000
Expand Down
6 changes: 5 additions & 1 deletion detekt-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ testing {
useJUnitJupiter(libs.versions.junit.get())

dependencies {
compileOnly("org.jetbrains:annotations:13.0")
implementation(libs.assertj)
implementation(testFixtures(project(":")))
}
Expand All @@ -68,7 +69,10 @@ dependencies {
compileOnly(libs.android.gradle.minSupported)
compileOnly(libs.kotlin.gradle)
compileOnly(libs.kotlin.gradlePluginApi)
implementation(libs.sarif4k)
testFixturesCompileOnly("org.jetbrains:annotations:13.0")
implementation(libs.sarif4k) {
exclude("org.jetbrains.kotlin")
}
compileOnly("io.gitlab.arturbosch.detekt:detekt-cli:1.22.0")

testKitRuntimeOnly(libs.kotlin.gradle)
Expand Down
1 change: 1 addition & 0 deletions detekt-gradle-plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kotlin.stdlib.default.dependency=false
1 change: 1 addition & 0 deletions detekt-rules-libraries/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
}

dependencies {
compileOnly(kotlin("stdlib-jdk8"))
compileOnly(projects.detektApi)
testImplementation(projects.detektTest)
testImplementation(libs.assertj)
Expand Down
1 change: 1 addition & 0 deletions detekt-rules-ruleauthors/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
}

dependencies {
compileOnly(kotlin("stdlib-jdk8"))
compileOnly(projects.detektApi)
testImplementation(projects.detektTest)
testImplementation(libs.assertj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import org.jetbrains.kotlin.com.intellij.openapi.util.Disposer
import org.jetbrains.kotlin.com.intellij.openapi.util.text.StringUtilRt
import org.jetbrains.kotlin.config.CommonConfigurationKeys
import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.config.JVMConfigurationKeys
import org.jetbrains.kotlin.psi.KtFile
import java.io.File
import java.nio.file.Path
Expand Down Expand Up @@ -52,6 +53,10 @@ internal object KtTestCompiler : KtCompiler() {
configuration.put(CommonConfigurationKeys.MODULE_NAME, "test_module")
configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.NONE)

if (System.getenv("JAVA_HOME") != null) {
configuration.put(JVMConfigurationKeys.JDK_HOME, File(System.getenv("JAVA_HOME")))
}

// Get the runtime locations of both the stdlib and kotlinx coroutines core jars and pass
// to the compiler so it's available to generate the BindingContext for rules under test.
configuration.apply {
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
kotlin.code.style=official
kotlin.incremental.useClasspathSnapshot=true
kotlin.daemon.useFallbackStrategy=false
org.gradle.parallel=true
org.gradle.caching=true
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
dokka = "1.8.10"
jacoco = "0.8.9"
kotlin = "1.8.10"
kotlin = "1.8.20"
ktlint = "0.48.2"
junit = "5.9.2"
contester = "0.2.0"
Expand Down

0 comments on commit 43f0796

Please sign in to comment.