diff --git a/PLUGINS_CHANGELOG.md b/PLUGINS_CHANGELOG.md index 21ce0a9..442a340 100644 --- a/PLUGINS_CHANGELOG.md +++ b/PLUGINS_CHANGELOG.md @@ -1,5 +1,12 @@ # "Gradle plugins" change log +## v0.8.0 / 2024-12-03 + +* bump Kotlin to 2.1.0, Gradle to v8.1.11, kotlinx-benchmark to v0.4.13, and Compose Multiplatform to v1.7.1 +* remove the `*-app-conventions` plugins that are not necessary and buggy + + The JVM dependency configuration line `implementation(platform(kotlin("bom")))` without a Kotlin version has introduced "Could not parse POM" build error in projects consuming the `kotlin-jvm-*-app-conventions` plugins + ## v0.7.0 / 2024-11-20 * do not configure the signing DSL at all when the version is a snapshot in the `com.huanshankeji.sonatype-ossrh-publish` plugin, so `publishToMavenLocal` becomes significantly faster diff --git a/README.md b/README.md index f3d9d1c..b865a26 100644 --- a/README.md +++ b/README.md @@ -53,3 +53,4 @@ configurations.all { 1. IntelliJ IDEA doesn't work well with applying plugins to script plugins in project sources. If a script plugin's code does not resolve, try restarting IntelliJ IDEA. 1. `./gradlew build` (and tasks depending on it) somehow has to run twice to work. I haven't identified the cause yet. +1. IntelliJ IDEA 2024.3 doesn't load this project, which is reported at [IDEA-363846](https://youtrack.jetbrains.com/issue/IDEA-363846/Loading-a-Gradle-project-of-Gradle-plugins-changes-a-final-Kotlin-freeCompilerArgs-since-IntelliJ-IDEA-2024.3). diff --git a/architecture-common-gradle-plugins/api/architecture-common-gradle-plugins.api b/architecture-common-gradle-plugins/api/architecture-common-gradle-plugins.api index 6c9c584..57ecb6c 100644 --- a/architecture-common-gradle-plugins/api/architecture-common-gradle-plugins.api +++ b/architecture-common-gradle-plugins/api/architecture-common-gradle-plugins.api @@ -43,72 +43,6 @@ public final class com/huanshankeji/GenerateKotlinJsBrowserWebrootForVertxWebPlu public final synthetic fun execute (Ljava/lang/Object;)V } -public final class com/huanshankeji/KotlinJvmApplicationAppConventionsPlugin : org/gradle/api/Plugin { - public fun ()V - public synthetic fun apply (Ljava/lang/Object;)V - public fun apply (Lorg/gradle/api/Project;)V -} - -public final class com/huanshankeji/KotlinJvmCommonAppConventionsPlugin : org/gradle/api/Plugin { - public fun ()V - public synthetic fun apply (Ljava/lang/Object;)V - public fun apply (Lorg/gradle/api/Project;)V -} - -public final class com/huanshankeji/KotlinJvmLibraryAppConventionsPlugin : org/gradle/api/Plugin { - public fun ()V - public synthetic fun apply (Ljava/lang/Object;)V - public fun apply (Lorg/gradle/api/Project;)V -} - -public final class com/huanshankeji/KotlinMultiplatformAppConventionsPlugin : org/gradle/api/Plugin { - public fun ()V - public synthetic fun apply (Ljava/lang/Object;)V - public fun apply (Lorg/gradle/api/Project;)V -} - -public final class com/huanshankeji/KotlinMultiplatformAppConventionsWithConventionalTargetsPlugin : org/gradle/api/Plugin { - public fun ()V - public synthetic fun apply (Ljava/lang/Object;)V - public fun apply (Lorg/gradle/api/Project;)V -} - -public final class com/huanshankeji/KotlinMultiplatformJsBrowserAppConventionsPlugin : org/gradle/api/Plugin { - public fun ()V - public synthetic fun apply (Ljava/lang/Object;)V - public fun apply (Lorg/gradle/api/Project;)V -} - -public final class com/huanshankeji/Kotlin_jvm_application_app_conventions_gradle : org/gradle/kotlin/dsl/precompile/v1/PrecompiledProjectScript { - public fun (Lorg/gradle/api/Project;Lorg/gradle/api/Project;)V - public static final fun main ([Ljava/lang/String;)V -} - -public final class com/huanshankeji/Kotlin_jvm_common_app_conventions_gradle : org/gradle/kotlin/dsl/precompile/v1/PrecompiledProjectScript { - public fun (Lorg/gradle/api/Project;Lorg/gradle/api/Project;)V - public static final fun main ([Ljava/lang/String;)V -} - -public final class com/huanshankeji/Kotlin_jvm_library_app_conventions_gradle : org/gradle/kotlin/dsl/precompile/v1/PrecompiledProjectScript { - public fun (Lorg/gradle/api/Project;Lorg/gradle/api/Project;)V - public static final fun main ([Ljava/lang/String;)V -} - -public final class com/huanshankeji/Kotlin_multiplatform_app_conventions_gradle : org/gradle/kotlin/dsl/precompile/v1/PrecompiledProjectScript { - public fun (Lorg/gradle/api/Project;Lorg/gradle/api/Project;)V - public static final fun main ([Ljava/lang/String;)V -} - -public final class com/huanshankeji/Kotlin_multiplatform_app_conventions_with_conventional_targets_gradle : org/gradle/kotlin/dsl/precompile/v1/PrecompiledProjectScript { - public fun (Lorg/gradle/api/Project;Lorg/gradle/api/Project;)V - public static final fun main ([Ljava/lang/String;)V -} - -public final class com/huanshankeji/Kotlin_multiplatform_js_browser_app_conventions_gradle : org/gradle/kotlin/dsl/precompile/v1/PrecompiledProjectScript { - public fun (Lorg/gradle/api/Project;Lorg/gradle/api/Project;)V - public static final fun main ([Ljava/lang/String;)V -} - public final class com/huanshankeji/OptInsKt { public static final fun defaultOptIns (Lorg/jetbrains/kotlin/gradle/plugin/LanguageSettingsBuilder;)V } diff --git a/architecture-common-gradle-plugins/build.gradle.kts b/architecture-common-gradle-plugins/build.gradle.kts index 8faa1fc..daa46be 100644 --- a/architecture-common-gradle-plugins/build.gradle.kts +++ b/architecture-common-gradle-plugins/build.gradle.kts @@ -23,32 +23,6 @@ gradlePlugin { fun scriptConventionsPlugin(idSuffix: String, displayName: String, description: String = displayName) = scriptPlugin(`package`, idSuffix, displayName, description) - scriptConventionsPlugin( - "kotlin-jvm-common-app-conventions", - "Kotlin/JVM common app conventions" - ) - scriptConventionsPlugin( - "kotlin-jvm-application-app-conventions", - "Kotlin/JVM application app conventions" - ) - scriptConventionsPlugin( - "kotlin-jvm-library-app-conventions", - "Kotlin/JVM library app conventions" - ) - - scriptConventionsPlugin( - "kotlin-multiplatform-app-conventions", - "Kotlin Multiplatform app conventions" - ) - scriptConventionsPlugin( - "kotlin-multiplatform-js-browser-app-conventions", - "Kotlin Multiplatform app conventions with the JS browser target" - ) - scriptConventionsPlugin( - "kotlin-multiplatform-app-conventions-with-conventional-targets", - "Kotlin Multiplatform app conventions with the conventional targets JVM, JS (browser), iOS (`iosX64`, `iosArm64`, and `iosSimulatorArm64`), and Wasm JS" - ) - scriptConventionsPlugin( "default-web-frontend-conventions", "Default web frontend conventions for our projects with Compose for Web and kotlinx.html HTML generation" 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 cfea229..92c58f5 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 @@ -1,7 +1,7 @@ package com.huanshankeji plugins { - id("com.huanshankeji.kotlin-multiplatform-js-browser-app-conventions") + id("com.huanshankeji.kotlin-multiplatform-js-browser-conventions") kotlin("plugin.compose") id("org.jetbrains.compose") } diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-jvm-application-app-conventions.gradle.kts b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-jvm-application-app-conventions.gradle.kts deleted file mode 100644 index 9f14629..0000000 --- a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-jvm-application-app-conventions.gradle.kts +++ /dev/null @@ -1,13 +0,0 @@ -package com.huanshankeji - -/* - * This file was generated by the Gradle 'init' task. - */ - -plugins { - // Apply the common convention plugin for shared build configuration between library and application projects. - id("com.huanshankeji.kotlin-jvm-common-app-conventions") - - // Apply the application plugin to add support for building a CLI application in Java. - application -} diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-jvm-common-app-conventions.gradle.kts b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-jvm-common-app-conventions.gradle.kts deleted file mode 100644 index 07d2a4f..0000000 --- a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-jvm-common-app-conventions.gradle.kts +++ /dev/null @@ -1,29 +0,0 @@ -package com.huanshankeji - -plugins { - kotlin("jvm") -} - -dependencies { - implementation(platform(kotlin("bom"))) - - testImplementation(kotlin("test")) - with(commonDependencies.orgJunit.jupiter) { - testImplementation(apiWithVersion()) - testRuntimeOnly(engineWithoutVersion()) - } - - with(commonDependencies.kotlinx.coroutines) { - implementation(core()) - testImplementation(test()) - } -} - -tasks.test { - // Use junit platform for unit tests. - useJUnitPlatform() -} - -kotlin.sourceSets.all { - languageSettings.defaultOptIns() -} diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-jvm-library-app-conventions.gradle.kts b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-jvm-library-app-conventions.gradle.kts deleted file mode 100644 index 6a5be43..0000000 --- a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-jvm-library-app-conventions.gradle.kts +++ /dev/null @@ -1,13 +0,0 @@ -package com.huanshankeji - -/* - * This file was generated by the Gradle 'init' task. - */ - -plugins { - // Apply the common convention plugin for shared build configuration between library and application projects. - id("com.huanshankeji.kotlin-jvm-common-app-conventions") - - // Apply the java-library plugin for API and implementation separation. - `java-library` -} diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-app-conventions-with-conventional-targets.gradle.kts b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-app-conventions-with-conventional-targets.gradle.kts deleted file mode 100644 index 682bb07..0000000 --- a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-app-conventions-with-conventional-targets.gradle.kts +++ /dev/null @@ -1,6 +0,0 @@ -package com.huanshankeji - -plugins { - id("com.huanshankeji.kotlin-multiplatform-app-conventions") - id("com.huanshankeji.kotlin-multiplatform-conventional-targets") -} diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-app-conventions.gradle.kts b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-app-conventions.gradle.kts deleted file mode 100644 index 4f4eefb..0000000 --- a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-app-conventions.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -package com.huanshankeji - -plugins { - kotlin("multiplatform") -} - -kotlin { - sourceSets { - val commonMain by getting { - dependencies { - //implementation(platform(kotlin("bom", kotlinVersion))) - implementation(commonDependencies.kotlinx.coroutines.core()) - } - } - - val commonTest by getting { - dependencies { - implementation(kotlin("test")) - implementation(commonDependencies.kotlinx.coroutines.test()) - } - } - - all { - languageSettings.defaultOptIns() - } - } -} diff --git a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-js-browser-app-conventions.gradle.kts b/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-js-browser-app-conventions.gradle.kts deleted file mode 100644 index 38fc82a..0000000 --- a/architecture-common-gradle-plugins/src/main/kotlin/com/huanshankeji/kotlin-multiplatform-js-browser-app-conventions.gradle.kts +++ /dev/null @@ -1,6 +0,0 @@ -package com.huanshankeji - -plugins { - id("com.huanshankeji.kotlin-multiplatform-app-conventions") - id("com.huanshankeji.kotlin-multiplatform-js-browser-conventions") -} diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index db36dd1..520ca0f 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -26,8 +26,8 @@ dependencies { */ // 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(kotlin("gradle-plugin", "2.1.0")) + implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:5.1.1") // This version has to be used for Gradle 8.11.2. implementation("com.gradle.publish:plugin-publish-plugin:1.3.0") diff --git a/buildSrc/src/main/kotlin/VersionsAndDependencies.kt b/buildSrc/src/main/kotlin/VersionsAndDependencies.kt index 54b74db..b1af8a9 100644 --- a/buildSrc/src/main/kotlin/VersionsAndDependencies.kt +++ b/buildSrc/src/main/kotlin/VersionsAndDependencies.kt @@ -6,18 +6,18 @@ val commonGradleClasspathDependencies = CommonGradleClasspathDependencies(common object DependencyVersions { - val kotlin = "2.0.10" // compatible with the compose version below - val composeMultiplatform = "1.7.0" - val kotlinxBenchmark = "0.4.11" + val kotlin = "2.1.0" // compatible with the compose version below + val composeMultiplatform = "1.7.1" + val kotlinxBenchmark = "0.4.13" val dokka = "2.0.0-Beta" val binaryCompatibilityValidator = "0.16.3" } -val alignedPluginVersion = "0.7.0" +val alignedPluginVersion = "0.8.0" // "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.8.0-20241129-SNAPSHOT" +val commonGradleDependenciesVersion = "0.8.0-20241201-SNAPSHOT" // This is the source dependency version. There is another build source dependency in "buildSrc/build.gradle.kts". val pluginProjectSourceDependentStableCommonGradleDependenciesVersion = "0.8.0-20241016".apply { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 79eb9d0..c1d5e01 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.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/Internal.kt b/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/Internal.kt index cd5f39e..29de1d2 100644 --- a/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/Internal.kt +++ b/kotlin-common-gradle-plugins/src/main/kotlin/com/huanshankeji/Internal.kt @@ -1,6 +1,5 @@ package com.huanshankeji -@RequiresOptIn +@RequiresOptIn("This API is internal in this project.") @Retention(AnnotationRetention.BINARY) -@Target(AnnotationTarget.PROPERTY) annotation class InternalApi \ No newline at end of file