Skip to content

Conversation

@mvicsokolova
Copy link
Collaborator

@mvicsokolova mvicsokolova commented Jun 26, 2023

Updated gradle to 8.1

  • Removed deprecated experimentalWarning from kotlinDslOptions
  • I had to manually set jvmToolChain(8) for JVM target compatibility in all subprojects, because for some reason this config was not enough and the build was failing with errors like this:
Execution failed for task ':atomicfu-gradle-plugin:compileKotlin'.
> 'compileJava' task (current target is 1.8) and 'compileKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
  Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

* Removed deprecated experimentalWarning from kotlinDslOptions
* Manually set jvmToolChain(8) for JVM target compatibility in subprojects
}
}

kotlin {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

with

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

in the root build.gradle file should solve the issue without specifying jvmToolchain for each individual plugin.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for updating the version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason is preparation of kotlinx.atomicfu for K2. Expected Gradle version to be compatible with K2 is 8.3, so we decided to steadily update Gradle version first on develop and then try out the 8.3-nightly version in the kotlin-community/k2/dev branch.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please mention that in the commit message when merging the PR? Thanks!

@mvicsokolova mvicsokolova requested a review from fzhinkin June 28, 2023 12:26
Copy link
Collaborator

@fzhinkin fzhinkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mvicsokolova mvicsokolova merged commit 33fbf92 into develop Jun 28, 2023
@mvicsokolova mvicsokolova deleted the update-gradle-8.1 branch June 28, 2023 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants