diff --git a/.gitignore b/.gitignore index 1f93dfc..8486ac9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Ignore Gradle project-specific cache directory .gradle +.kotlin + # Ignore Gradle build output directory build diff --git a/architecture-common-gradle-plugins/build.gradle.kts b/architecture-common-gradle-plugins/build.gradle.kts index 54f3e4c..279561e 100644 --- a/architecture-common-gradle-plugins/build.gradle.kts +++ b/architecture-common-gradle-plugins/build.gradle.kts @@ -9,13 +9,17 @@ repositories { dependencies { implementation(project(":kotlin-common-gradle-plugins")) + implementation("org.jetbrains.kotlin:compose-compiler-gradle-plugin:${DependencyVersions.kotlin}") + // use the version in `buildSrc` so there is no need to frequently update the dependent bootstrapping `common-gradle-dependencies` version in "buildSrc" + implementation("org.jetbrains.compose:compose-gradle-plugin:${DependencyVersions.composeMultiplatform}") + //api(project(":common-gradle-dependencies")) //implementation(project(":common-gradle-dependencies")) /* This project depends on a specific version of the Maven dependency of "common-gradle-dependencies" since now they are developed together in the same branch `main`, enabling it to always depend on a release version. */ - implementation(commonGradleClasspathDependencies.composeMultiplatform.gradlePlugin.pluginProject()) + // implementation(commonGradleClasspathDependencies.composeMultiplatform.gradlePlugin.pluginProject()) // bootstrapping } gradlePlugin { diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/GenerateKotlinJsBrowserWebrootForVertxWebPlugin.kt b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/GenerateKotlinJsBrowserWebrootForVertxWebPlugin.kt index 20770f1..a1bee16 100644 --- a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/GenerateKotlinJsBrowserWebrootForVertxWebPlugin.kt +++ b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/GenerateKotlinJsBrowserWebrootForVertxWebPlugin.kt @@ -2,50 +2,66 @@ package com.huanshankeji import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.Copy +import org.gradle.api.tasks.util.PatternFilterable import org.gradle.kotlin.dsl.create import org.gradle.kotlin.dsl.named import org.gradle.kotlin.dsl.register -import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack class GenerateKotlinJsBrowserWebrootForVertxWebPlugin : Plugin { override fun apply(project: Project): Unit = project.run { val extension = extensions.create("generateKotlinJsResources") + afterEvaluate { + val frontendProject = project(extension.webFrontendProjectPath.get()) + val jsBrowserDistributionTask = frontendProject.tasks.named("jsBrowserDistribution") + /*val jsBrowserWebpack by lazy { + tasks.getByPath( + extension.webFrontendProjectPath.get() + + if (extension.production.get()) ":jsBrowserProductionWebpack" else ":jsBrowserDevelopmentWebpack" + ) as KotlinWebpack + }*/ + val copyJsBrowserDistributionToResourcesWebroot = "copyJsBrowserDistributionToResourcesWebroot" + val browserDistributionResourcesDirectory = layout.buildDirectory.get().dir("browserDistributionResources") - // see: https://play.kotlinlang.org/hands-on/Full%20Stack%20Web%20App%20with%20Kotlin%20Multiplatform/04_Frontend_Setup + tasks.register(copyJsBrowserDistributionToResourcesWebroot) { + dependsOn(jsBrowserDistributionTask) + // TODO I didn't find a way to get this path using the DSL, so there may be a bug if this path is customized. + from(frontendProject.layout.buildDirectory.get().dir("dist/js/productionExecutable")) + //if (extension.production.get()) + extension.includes.getOrNull()?.let { include(it) } + into(browserDistributionResourcesDirectory.dir(extension.webRoot.getOrElse("webroot"))) + } - val jsBrowserDistributionTask by lazy { - tasks.getByPath(extension.webFrontendProjectPath.get() + ":jsBrowserDistribution") - } - val jsBrowserWebpack by lazy { - tasks.getByPath( - extension.webFrontendProjectPath.get() + - if (extension.production.get()) ":jsBrowserProductionWebpack" else ":jsBrowserDevelopmentWebpack" - ) as KotlinWebpack - } - val copyJsBrowserDistributionToResourcesWebroot = "copyJsBrowserDistributionToResourcesWebroot" - val browserDistributionResourcesDirectory = buildDir.resolve("browserDistributionResources") - - tasks.register(copyJsBrowserDistributionToResourcesWebroot) { - dependsOn(jsBrowserWebpack) - dependsOn(jsBrowserDistributionTask) // needed for Gradle 8.0.1 whenever `production` is `true` or `false` // TODO: this may be a bug. - from(jsBrowserWebpack.destinationDirectory) - if (extension.production.get()) - include("*.html", "*.css", "*.js") - into(browserDistributionResourcesDirectory.resolve("webroot")) - } + tasks.named("processResources") { + dependsOn(copyJsBrowserDistributionToResourcesWebroot) + } + /* + When running a Maven publish task, the error occurs if this line is not added: + > Task '...:sourcesJar' uses this output of task '...:copyJsBrowserDistributionToResourcesWebroot' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. - tasks.named("processResources") { - dependsOn(copyJsBrowserDistributionToResourcesWebroot) - } + TODO This is probably a bug. remove this line when it's fixed. + */ + tasks.named("sourcesJar") { dependsOn("copyJsBrowserDistributionToResourcesWebroot") } - sourceSets.main { resources.srcDir(browserDistributionResourcesDirectory) } + sourceSets.main { resources.srcDir(browserDistributionResourcesDirectory) } + } } interface Extension { val webFrontendProjectPath: Property - val production: Property + + //val production: Property + /** + * Patterns of distribution files to include. + * Defaults to including all files. + * + * @see PatternFilterable.include + */ + val includes: ListProperty + + val webRoot: Property } } \ No newline at end of file diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/default-web-frontend-conventions.gradle.kts b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/default-web-frontend-conventions.gradle.kts index 434931a..a07123d 100644 --- a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/default-web-frontend-conventions.gradle.kts +++ b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/default-web-frontend-conventions.gradle.kts @@ -2,6 +2,7 @@ package com.huanshankeji plugins { id("com.huanshankeji.kotlin-multiplatform-js-browser-app-conventions") + kotlin("plugin.compose") id("org.jetbrains.compose") } diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/jvm/native/osandarch/DefaultSupported.kt b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/jvm/native/osandarch/DefaultSupported.kt index fc5a6cc..bdb6340 100644 --- a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/jvm/native/osandarch/DefaultSupported.kt +++ b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/jvm/native/osandarch/DefaultSupported.kt @@ -1,6 +1,5 @@ package com.huanshankeji.jvm.native.osandarch - object DefaultSupported { object ArchsByOs { val linux = listOf(CpuArchitecture.X8664, CpuArchitecture.Aarch64) diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/spark/Spark.kt b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/spark/Spark.kt new file mode 100644 index 0000000..418531e --- /dev/null +++ b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/spark/Spark.kt @@ -0,0 +1,19 @@ +package com.huanshankeji.spark + +// copied and adapted from https://stackoverflow.com/a/76805763/5082913 +val sparkJava17CompatibleJvmArgs = listOf( + "--add-opens=java.base/java.lang=ALL-UNNAMED", + "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED", + "--add-opens=java.base/java.lang.reflect=ALL-UNNAMED", + "--add-opens=java.base/java.io=ALL-UNNAMED", + "--add-opens=java.base/java.net=ALL-UNNAMED", + "--add-opens=java.base/java.nio=ALL-UNNAMED", + "--add-opens=java.base/java.util=ALL-UNNAMED", + "--add-opens=java.base/java.util.concurrent=ALL-UNNAMED", + "--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED", + "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED", + "--add-opens=java.base/sun.nio.cs=ALL-UNNAMED", + "--add-opens=java.base/sun.security.action=ALL-UNNAMED", + "--add-opens=java.base/sun.util.calendar=ALL-UNNAMED", + "--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED", +) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index fc53b84..75e9850 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,7 +1,7 @@ plugins { `kotlin-dsl` - // Gradle 8.1.1's dependent Kotlin version is 1.8.10. - //kotlin("jvm") version "1.8.10" + // Gradle 8.10's embedded Kotlin version is 1.9.24. + //kotlin("jvm") version "2.0.10" } repositories { @@ -24,14 +24,18 @@ dependencies { implementation("org.jetbrains.kotlin:kotlin-sam-with-receiver:1.8.0") } */ - // for `KotlinCompilationTask` and the version is for Compose 1.6.1 and 1.6.2 - implementation(kotlin("gradle-plugin", "1.9.24")) - implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:4.2.1") // This version has to be used for Gradle 8.6. + // for `KotlinCompilationTask` and the version is compatible with Compose 1.6.11 + // With Kotlin 2.0.20, a "Could not parse POM" build error occurs in the JVM projects of some dependent projects. + implementation(kotlin("gradle-plugin", "2.0.10")) + implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:4.5.0") // This version has to be used for Gradle 8.10. implementation("com.gradle.publish:plugin-publish-plugin:1.2.1") // This is a bootstrapping dependency (cross-version self-dependency). Try not to update its version unless necessary. implementation("com.huanshankeji.team:gradle-plugins:0.3.0") { exclude("org.jetbrains.kotlin") } + // This approach complicates the project is temporarily given up and commented out. Maybe readopt this when `common-gradle-dependencies` is moved to a separate project. + /* // This is also a bootstrapping dependency. implementation("com.huanshankeji:common-gradle-dependencies:0.7.1-20240314-boostrap") { exclude("org.jetbrains.kotlin") } + */ } diff --git a/buildSrc/src/main/kotlin/VersionsAndDependencies.kt b/buildSrc/src/main/kotlin/VersionsAndDependencies.kt index ef90e13..61a7078 100644 --- a/buildSrc/src/main/kotlin/VersionsAndDependencies.kt +++ b/buildSrc/src/main/kotlin/VersionsAndDependencies.kt @@ -1,18 +1,23 @@ -import com.huanshankeji.CommonGradleClasspathDependencies -import com.huanshankeji.CommonVersions - +/* +// Bootstrapping from "common-gradle-dependencies" val commonVersions = CommonVersions() val commonGradleClasspathDependencies = CommonGradleClasspathDependencies(commonVersions) +*/ + -val kotlinVersion = "1.9.23" // for Compose 1.6.1 and 1.6.2 +object DependencyVersions { + val kotlin = "2.0.10" // compatible with the compose version below + val composeMultiplatform = "1.7.0" + val kotlinxBenchmark = "0.4.11" +} val alignedPluginVersion = "0.6.0-SNAPSHOT" // "x.y.z" indicates the version of the way of organizing the code, // and the date indicates the version when the dependency versions are updated. -val commonGradleDependenciesVersion = "0.7.1-20240516" +val commonGradleDependenciesVersion = "0.8.0-20241016" // This is the source dependency version. There is another build source dependency in "buildSrc/build.gradle.kts". -val pluginProjectSourceDependentStableCommonGradleDependenciesVersion = "0.7.1-20240314-boostrap".apply { - require(!endsWith("SNAPSHOT")) +val pluginProjectSourceDependentStableCommonGradleDependenciesVersion = "0.8.0-20241016-SNAPSHOT".apply { + //require(!endsWith("SNAPSHOT")) // TODO } diff --git a/buildSrc/src/main/kotlin/conventions.gradle.kts b/buildSrc/src/main/kotlin/conventions.gradle.kts index 3bc48bb..a830671 100644 --- a/buildSrc/src/main/kotlin/conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/conventions.gradle.kts @@ -8,12 +8,16 @@ plugins { } repositories { + mavenLocal() // TODO comment out when not needed gradlePluginPortal() } dependencies { - // Not specifying version can cause build issues when added to a project's buildscript dependencies. - implementation(kotlin("gradle-plugin", kotlinVersion)) + // Not specifying version can cause build issues when added to a project's buildscript dependencies if the version in the "buildSrc" build script is different. + implementation(kotlin("gradle-plugin")) + // These 2 dependencies are implicitly added with the Gradle's embedded Kotlin version if not added explicitly. + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) } kotlin.jvmToolchain(8) diff --git a/common-gradle-dependencies/build.gradle.kts b/common-gradle-dependencies/build.gradle.kts index e9ca176..70f4d75 100644 --- a/common-gradle-dependencies/build.gradle.kts +++ b/common-gradle-dependencies/build.gradle.kts @@ -1,4 +1,6 @@ -import com.huanshankeji.generateKotlinVersion +import com.huanshankeji.SourceFile +import com.huanshankeji.generateKotlinSources +import kotlin.reflect.full.memberProperties plugins { conventions @@ -6,7 +8,23 @@ plugins { version = commonGradleDependenciesVersion -generateKotlinVersion(kotlinVersion) +generateKotlinSources( + sourceFiles = listOf( + SourceFile( + "GeneratedKotlinVersion.kt", + """ +internal object GeneratedVersions { +${ + DependencyVersions::class.memberProperties.joinToString("\n") { + " internal const val ${it.name} = \"${it(DependencyVersions)}\"" + } + } +} +""".drop(1) + ) + ) +) + gradlePlugin { plugins { diff --git a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt index b13aae1..ab7a045 100644 --- a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt +++ b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonDependencies.kt @@ -4,6 +4,14 @@ import org.gradle.api.artifacts.dsl.DependencyHandler // some but not all default dependencies class CommonDependencies(val versions: CommonVersions = CommonVersions()) { + interface SubgroupWithNameInArtifact { + val groupPrefix: String + val subgroupName: String + val defaultVersion: String + fun module(module: String, version: String = defaultVersion) = + "$groupPrefix.$subgroupName:$subgroupName-$module:$version" + } + inner class KotlinCommon internal constructor() { val defaultVersion = versions.kotlinCommon fun module(module: String, version: String = defaultVersion) = @@ -43,6 +51,8 @@ class CommonDependencies(val versions: CommonVersions = CommonVersions()) { val kotlinCommon = KotlinCommon() inner class Kotlinx internal constructor() { + // TODO can be refactored with `SubgroupWithNameInArtifact` + inner class Coroutines internal constructor() { val defaultVersion = versions.kotlinxCoroutines fun module(module: String, version: String = defaultVersion) = @@ -94,6 +104,7 @@ class CommonDependencies(val versions: CommonVersions = CommonVersions()) { // official libraries from JetBrains + // TODO can be refactored with `SubgroupWithNameInArtifact` inner class Exposed internal constructor() { val defaultVersion = versions.exposed fun module(module: String, version: String = defaultVersion) = @@ -105,6 +116,7 @@ class CommonDependencies(val versions: CommonVersions = CommonVersions()) { val exposed = Exposed() + // TODO can be refactored with `SubgroupWithNameInArtifact` inner class Ktor internal constructor() { val defaultVersion = versions.ktor fun module(module: String, version: String = defaultVersion) = @@ -123,9 +135,79 @@ class CommonDependencies(val versions: CommonVersions = CommonVersions()) { val ktor = Ktor() + // TODO consider refactoring other inner classes to this architecture too + + class JetbrainsAndroidx(defaultVersions: CommonVersions.JetbrainsAndroidx) { + interface Subgroup : CommonDependencies.SubgroupWithNameInArtifact { + override val groupPrefix: String get() = "org.jetbrains.androidx" + } + + class Lifecycle(override val defaultVersion: String) : Subgroup { + override val subgroupName: String get() = "lifecycle" + + fun viewmodel(version: String = defaultVersion) = + module("viewmodel", version) + + fun viewmodelCompose(version: String = defaultVersion) = + module("viewmodel-compose", version) + } + + val lifecycle = Lifecycle(defaultVersions.lifecycle) + + class Navigation(override val defaultVersion: String) : Subgroup { + override val subgroupName: String get() = "navigation" + + fun runtime(version: String = defaultVersion) = + module("runtime", version) + + fun compose(version: String = defaultVersion) = + module("compose", version) + } + + val navigation = Navigation(defaultVersions.navigation) + } + + val jetbrainsAndroidx = JetbrainsAndroidx(versions.jetBrainsAndroidx) + + class Androidx(defaultVersions: CommonVersions.Androidx) { + companion object { + val `package` = "androidx" + } + + interface Subgroup : SubgroupWithNameInArtifact { + override val groupPrefix get() = `package` + } + + class Activity(override val defaultVersion: String) : Subgroup { + override val subgroupName get() = "activity" + + fun compose(version: String = defaultVersion) = + module("compose", version) + } + + val activity = Activity(defaultVersions.activity) + + class Compose(defaultVersions: CommonVersions.Androidx.Compose) { + interface Subgroup : SubgroupWithNameInArtifact { + override val groupPrefix get() = "$`package`.compose" + } + + class Ui(override val defaultVersion: String) : Subgroup { + override val subgroupName get() = "ui" + } + + val ui = Ui(defaultVersions.common) + } + + val compose = Compose(defaultVersions.compose) + } + + val androidx = Androidx(versions.androidx) + // others + // TODO can be refactored with `SubgroupWithNameInArtifact` inner class Vertx internal constructor() { val defaultVersion = versions.vertx @@ -195,6 +277,7 @@ class CommonDependencies(val versions: CommonVersions = CommonVersions()) { val orgJunit = OrgJunit() + // TODO can be refactored with `SubgroupWithNameInArtifact` inner class Kotest internal constructor() { val defaultVersion = versions.kotest fun module(module: String, version: String = defaultVersion) = @@ -209,6 +292,7 @@ class CommonDependencies(val versions: CommonVersions = CommonVersions()) { fun postgreSql(version: String = versions.postgreSql) = "org.postgresql:postgresql:$version" + // TODO can be refactored with `SubgroupWithNameInArtifact` inner class Slf4j internal constructor() { val defaultVersion = versions.slf4j fun module(module: String, version: String = defaultVersion) = diff --git a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonGradleClasspathDependencies.kt b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonGradleClasspathDependencies.kt index c44d290..7d6717c 100644 --- a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonGradleClasspathDependencies.kt +++ b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonGradleClasspathDependencies.kt @@ -53,7 +53,7 @@ class CommonGradleClasspathDependencies(val versions: CommonVersions) { inner class Benchmark { val defaultVersion = versions.kotlinxBenchmark fun PluginDependenciesSpec.applyPluginWithVersion(version: String = defaultVersion) = - id("org.jetbrains.kotlinx.benchmark").version(defaultVersion) + id("org.jetbrains.kotlinx.benchmark").version(version) fun pluginProject(version: String = defaultVersion) = "org.jetbrains.kotlinx:kotlinx-benchmark-plugin:$version" diff --git a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonVersions.kt b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonVersions.kt index 1582894..a010b6c 100644 --- a/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonVersions.kt +++ b/common-gradle-dependencies/src/main/kotlin/com/huanshankeji/CommonVersions.kt @@ -1,26 +1,47 @@ package com.huanshankeji -import kotlinVersion - -class CommonVersions @JvmOverloads constructor( - val kotlin: String = kotlinVersion, +class CommonVersions( + val kotlin: String = GeneratedVersions.kotlin, val kotlinCommon: String = "0.4.0", - val kotlinxCoroutines: String = "1.8.1", + val kotlinxCoroutines: String = "1.9.0", val kotlinxHtml: String = "0.11.0", - val kotlinxSerialization: String = "1.6.3", - val kotlinxDatetime: String = "0.6.0", - val kotlinxBenchmark: String = "0.4.10", - val exposed: String = "0.50.1", - val ktor: String = "2.3.11", - val composeMultiplatform: String = "1.6.2", // this is usually only used in classpath dependencies + val kotlinxSerialization: String = "1.7.1", // "1.7.2" and "1.7.3" use Kotlin 2.0.20 and seem to cause problems with Kotlin 2.0.10 builds. + val kotlinxDatetime: String = "0.6.1", + val kotlinxBenchmark: String = GeneratedVersions.kotlinxBenchmark, + val exposed: String = "0.53.0", // "0.54.0" deprecates the old DSL APIs as errors while we still depend on them. + val ktor: String = "2.3.12", // "3.0.0" uses Kotlin 2.0.20 too. + val androidx: Androidx = Androidx(), - val vertx: String = "4.5.7", + val vertx: String = "4.5.10", val arrow: String = "1.2.4", - val orgJunit: String = "5.10.2", // JUnit 5 actually - val kotest: String = "5.9.0", - val postgreSql: String = "42.7.3", + val orgJunit: String = "5.11.2", // JUnit 5 actually + val kotest: String = "5.9.1", // v6.0.0.M1 is available already + val postgreSql: String = "42.7.4", val slf4j: String = "1.7.36", // TODO: consider replacing with kotlin-logging (https://github.com/oshai/kotlin-logging) - val testContainers: String = "1.19.8" -) \ No newline at end of file + val testContainers: String = "1.20.2" +) { + class JetbrainsAndroidx( + val composeMultiplatform: String = GeneratedVersions.composeMultiplatform, // this is usually only used in classpath dependencies + val lifecycle: String = "2.8.3", + val navigation: String = "2.8.0-alpha10", + ) + + val jetBrainsAndroidx = JetbrainsAndroidx() + + val composeMultiplatform get() = jetBrainsAndroidx.composeMultiplatform + + // https://developer.android.com/jetpack/androidx/versions + class Androidx( + val activity: String = "1.9.3", + val compose: Compose = Compose() + ) { + class Compose( + val compiler: String = "1.5.15", + val common: String = "1.7.4", // for "animation", "foundation", "material","runtime", and "ui" + val material3: String = "1.3.0", + val material3Adaptive: String = "1.0.0" + ) + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 52a5f31..6e2c210 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,4 @@ ## This is not working for plugins in project sources #kotlin.mpp.stability.nowarn=true +# More memory is needed to build "architecture-common-gradle-plugins" since Kotlin 2.0.0 +org.gradle.jvmargs=-Xmx2G diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd49..a4b76b9 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2ea3535..79eb9d0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a4..f5feea6 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 25da30d..9d21a21 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## diff --git a/kotlin-common-gradle-plugins/build.gradle.kts b/kotlin-common-gradle-plugins/build.gradle.kts index 129cdcf..409188d 100644 --- a/kotlin-common-gradle-plugins/build.gradle.kts +++ b/kotlin-common-gradle-plugins/build.gradle.kts @@ -5,9 +5,8 @@ plugins { dependencies { //implementation("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0") - implementation("org.jetbrains.kotlinx:kotlinx-benchmark-plugin:0.4.9") - implementation(commonGradleClasspathDependencies.kotlinx.benchmark.pluginProject()) - implementation("org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion") + implementation("org.jetbrains.kotlinx:kotlinx-benchmark-plugin:${DependencyVersions.kotlinxBenchmark}") + implementation(kotlin("allopen", DependencyVersions.kotlin)) testImplementation(kotlin("test")) }