Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ publishing {
}

fun DefaultMavenPublication.unsetModuleDescriptorGenerator() {
@Suppress("NULL_FOR_NONNULL_TYPE")
val generator: TaskProvider<Task?> = null
setModuleDescriptorGenerator(generator)
// TODO fix the migration issue
// @Suppress("NULL_FOR_NONNULL_TYPE")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

And here

// val generator: TaskProvider<Task?> = null
// setModuleDescriptorGenerator(generator)
}
20 changes: 11 additions & 9 deletions buildSrc/src/main/kotlin/Java9Modularity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,11 @@ object Java9Modularity {
source(compileTask.map { it.sources })
source(compileTask.map { it.javaSources })
// part of work-around for https://youtrack.jetbrains.com/issue/KT-60541
source(compileTask.map {
@Suppress("INVISIBLE_MEMBER")
it.scriptSources
})
// TODO fix the migration issue
// source(compileTask.map {
// @Suppress("INVISIBLE_MEMBER")
Copy link
Copy Markdown
Contributor Author

@shanshin shanshin Sep 19, 2025

Choose a reason for hiding this comment

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

@Tapchicoma, could you please help with fixing this problem?

// it.scriptSources
// })
source(sourceFile)
destinationDirectory.set(temporaryDir)
multiPlatformEnabled.set(compileTask.get().multiPlatformEnabled)
Expand Down Expand Up @@ -178,11 +179,12 @@ object Java9Modularity {
@Suppress("DEPRECATION")
if (taskKotlinLanguageVersion.get() < KotlinVersion.KOTLIN_2_0) {
// part of work-around for https://youtrack.jetbrains.com/issue/KT-60541
@Suppress("INVISIBLE_MEMBER")
commonSourceSet.from(compileTask.map {
@Suppress("INVISIBLE_MEMBER")
it.commonSourceSet
})
// TODO fix the migration issue
// @Suppress("INVISIBLE_MEMBER")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same here

// commonSourceSet.from(compileTask.map {
// @Suppress("INVISIBLE_MEMBER")
// it.commonSourceSet
// })
} else {
multiplatformStructure.refinesEdges.set(compileTask.flatMap { it.multiplatformStructure.refinesEdges })
multiplatformStructure.fragments.set(compileTask.flatMap { it.multiplatformStructure.fragments })
Expand Down
2 changes: 1 addition & 1 deletion formats/protobuf/proto-test-model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protobuf {
java.toolchain.languageVersion.set(JavaLanguageVersion.of(8))

tasks.clean {
delete(protobuf.protobuf.generatedFilesBaseDir)
delete(protobuf.generatedFilesBaseDir)
}

sourceSets.main {
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[versions]
kotlin = "2.2.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would suggest first updating this repo to Kotlin 2.2.21, as it contains an important fix for Gradle 9.0.0 support

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok.
However, the problems with Java modularity are not due to Gradle compatibility - they are due to using the outdated KGP API and I'm not aware how to correct them correctly.

And one problem is that @Suppress("NULL_FOR_NONNULL_TYPE") does not work in K2 - perhaps there are also ready-made solutions here on how to do this in a different way.

kover = "0.8.2"
kover = "0.9.2"
dokka = "2.0.0"
knit = "0.5.0"
bcv = "0.16.2"
animalsniffer = "1.7.1"
protobuf = "0.8.19"
animalsniffer = "2.0.1"
protobuf = "0.9.5"
shadow = "8.1.1"
jmh = "0.7.2"
jmh-core = "1.37"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d
distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-8.7-bin.zip
distributionSha256Sum=8fad3d78296ca518113f3d29016617c7f9367dc005f932bd9d93bf45ba46072b
distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 8 additions & 6 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions rules/rules-integration-tests/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import com.android.tools.r8.*
import com.android.tools.r8.origin.*
import org.gradle.kotlin.dsl.support.serviceOf
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

/*
Expand Down Expand Up @@ -124,11 +125,13 @@ val extractBaseJarTask = tasks.register<Task>("extractBaseJar") {
jdkBinDir.resolve("jmod")
}

exec {
// using internal `serviceOf` https://github.com/gradle/gradle/issues/34483
serviceOf<ExecOperations>().exec {
commandLine(jmodFile.absolutePath, "extract", baseJmod.absolutePath, "--dir", extractDir.absolutePath)
}
// pack class-files into jar
exec {
// using internal `serviceOf` https://github.com/gradle/gradle/issues/34483
serviceOf<ExecOperations>().exec {
commandLine(
"jar",
"--create",
Expand Down