From 0df29309b89e113008b6c66a95655902f130016b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:52:05 +0000 Subject: [PATCH 1/4] Update dependency gradle to v8.10.1 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae08049..d642e7f8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 8817b1905ee95418fd1bb104198724cacfbc91ac Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Tue, 10 Sep 2024 10:23:59 +0200 Subject: [PATCH 2/4] fix gradle update, publication no longer includes runtime scope --- .../build-logic.gradle-plugin.gradle.kts | 2 +- .../build-logic.kotlin-conventions.gradle.kts | 1 - .../PublishPlugin.kt | 11 +++++++++ .../publish/PublishPluginIntTest.groovy | 24 ++++++++++++------- tutteli-gradle-spek/build.gradle.kts | 2 +- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/gradle/build-logic/dev/src/main/kotlin/build-logic.gradle-plugin.gradle.kts b/gradle/build-logic/dev/src/main/kotlin/build-logic.gradle-plugin.gradle.kts index b52396c5..e922e683 100644 --- a/gradle/build-logic/dev/src/main/kotlin/build-logic.gradle-plugin.gradle.kts +++ b/gradle/build-logic/dev/src/main/kotlin/build-logic.gradle-plugin.gradle.kts @@ -11,7 +11,7 @@ gradlePlugin { } val createClasspathManifest = tasks.register("createClasspathManifest") { - val outputDir = file("${buildDir}/${name}") + val outputDir = file(project.layout.buildDirectory.file(name)) inputs.files(sourceSets.main.get().runtimeClasspath) outputs.dir(outputDir) diff --git a/gradle/build-logic/dev/src/main/kotlin/build-logic.kotlin-conventions.gradle.kts b/gradle/build-logic/dev/src/main/kotlin/build-logic.kotlin-conventions.gradle.kts index 3009edfa..085ad1fa 100644 --- a/gradle/build-logic/dev/src/main/kotlin/build-logic.kotlin-conventions.gradle.kts +++ b/gradle/build-logic/dev/src/main/kotlin/build-logic.kotlin-conventions.gradle.kts @@ -1,4 +1,3 @@ -import gradle.kotlin.dsl.accessors._81cadab438125fe32232621fe97f8fea.testImplementation import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { diff --git a/tutteli-gradle-publish/src/main/kotlin/ch.tutteli.gradle.plugins.publish/PublishPlugin.kt b/tutteli-gradle-publish/src/main/kotlin/ch.tutteli.gradle.plugins.publish/PublishPlugin.kt index 8766297f..941c4324 100644 --- a/tutteli-gradle-publish/src/main/kotlin/ch.tutteli.gradle.plugins.publish/PublishPlugin.kt +++ b/tutteli-gradle-publish/src/main/kotlin/ch.tutteli.gradle.plugins.publish/PublishPlugin.kt @@ -42,8 +42,19 @@ class PublishPlugin : Plugin { // as well as https://github.com/gradle/gradle/issues/10900 isPreserveFileTimestamps = false isReproducibleFileOrder = true + + // TODO 6.0.0 switch to the following once we drop support for gradle 6, require 7.4 at least + @Suppress("DEPRECATION") dirMode = "775".toInt(8) + @Suppress("DEPRECATION") fileMode = "664".toInt(8) +// dirPermissions { +// unix("rwxrwxr-x") +// } +// +// filePermissions { +// unix("rw-rw-r--") +// } } project.tasks.withType() diff --git a/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/plugins/publish/PublishPluginIntTest.groovy b/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/plugins/publish/PublishPluginIntTest.groovy index b6754477..c9289f4e 100644 --- a/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/plugins/publish/PublishPluginIntTest.groovy +++ b/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/plugins/publish/PublishPluginIntTest.groovy @@ -148,7 +148,7 @@ class PublishPluginIntTest { } def result = builder .withProjectDir(settingsSetup.tmp) - .withArguments("publishAllPublicationsToMavenRepository", "--stacktrace") + .withArguments("publishAllPublicationsToMavenRepository", "--stacktrace") .build() //assert @@ -303,6 +303,7 @@ class PublishPluginIntTest { //assert def dependentReleasePath = getReleasePath(settingsSetup, dependentName, groupId, version, dependentName) def (dependentPom, dependentPomName) = getPomInclFileNameAndAssertBasicPomProperties(dependentReleasePath, dependentName, groupId, version, githubUser, rootProjectName) + assertContainsRegex(dependentPom, "licenses", "$NL_INDENT" + "$NL_INDENT" + "${StandardLicenses.EUPL_1_2.longName}$NL_INDENT" + @@ -319,6 +320,18 @@ class PublishPluginIntTest { "https://tutteli.ch$NL_INDENT" + "$NL_INDENT" + "") + + String runtimeDependency = "" + if (gradleVersion != null && (gradleVersion.startsWith("6") || gradleVersion.startsWith("7"))) { + runtimeDependency = "$NL_INDENT" + + "$groupId$NL_INDENT" + + "$subprojectName$NL_INDENT" + + "$version$NL_INDENT" + + "runtime$NL_INDENT" + + "$NL_INDENT" + + "" + } + assertContainsRegex(dependentPom, "dependencies", "$NL_INDENT" + "$NL_INDENT" + "$groupId$NL_INDENT" + @@ -331,14 +344,7 @@ class PublishPluginIntTest { "kotlin-stdlib-jdk8$NL_INDENT" + "$KOTLIN_VERSION$NL_INDENT" + "compile$NL_INDENT" + - "$NL_INDENT" + - "$NL_INDENT" + - "$groupId$NL_INDENT" + - "$subprojectName$NL_INDENT" + - "$version$NL_INDENT" + - "runtime$NL_INDENT" + - "$NL_INDENT" + - "" + "$NL_INDENT" + runtimeDependency ) def repoUrl = "https://github.com/$githubUser/$rootProjectName" diff --git a/tutteli-gradle-spek/build.gradle.kts b/tutteli-gradle-spek/build.gradle.kts index ee69025d..2f25a0fd 100644 --- a/tutteli-gradle-spek/build.gradle.kts +++ b/tutteli-gradle-spek/build.gradle.kts @@ -59,7 +59,7 @@ afterEvaluate { sourceSets { main { groovy { - srcDirs("src/main/generated/") + srcDirs("src/main/generated/groovy") } } } From 1135a6754b217cfc9cc678bd8bbff8a28b40e384 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Tue, 10 Sep 2024 10:42:10 +0200 Subject: [PATCH 3/4] drop support for gradle 8.1.1 in spek plugin --- .../ch/tutteli/gradle/plugins/spek/SpekPluginIntTest.groovy | 6 +++--- .../tutteli/gradle/plugins/spek/SpekPluginSmokeTest.groovy | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tutteli-gradle-spek/src/test/groovy/ch/tutteli/gradle/plugins/spek/SpekPluginIntTest.groovy b/tutteli-gradle-spek/src/test/groovy/ch/tutteli/gradle/plugins/spek/SpekPluginIntTest.groovy index e1dfc08b..143f0f85 100644 --- a/tutteli-gradle-spek/src/test/groovy/ch/tutteli/gradle/plugins/spek/SpekPluginIntTest.groovy +++ b/tutteli-gradle-spek/src/test/groovy/ch/tutteli/gradle/plugins/spek/SpekPluginIntTest.groovy @@ -56,7 +56,7 @@ class SpekPluginIntTest { } def result = builder .withProjectDir(settingsSetup.tmp) - .withArguments("clean", "build") + .withArguments("clean", "build", "--stacktrace") .build() assertTrue(result.output.contains("was here"), "println in output:\n" + result.output) def failed = result.taskPaths(TaskOutcome.FAILED) @@ -64,8 +64,8 @@ class SpekPluginIntTest { } static List kotlinVersionAndGradle() { - return ['1.7.20', '1.8.10', '1.9.10'].collectMany { kotlinVersion -> - def gradleVersions = ['8.1.1', '8.3'] + return ['1.8.10', '1.9.10', '2.0.20'].collectMany { kotlinVersion -> + def gradleVersions = ['8.3', '8.10'] gradleVersions.collect { gradleVersion -> Arguments.of(kotlinVersion, gradleVersion) } diff --git a/tutteli-gradle-spek/src/test/groovy/ch/tutteli/gradle/plugins/spek/SpekPluginSmokeTest.groovy b/tutteli-gradle-spek/src/test/groovy/ch/tutteli/gradle/plugins/spek/SpekPluginSmokeTest.groovy index 331c3526..34b320ce 100644 --- a/tutteli-gradle-spek/src/test/groovy/ch/tutteli/gradle/plugins/spek/SpekPluginSmokeTest.groovy +++ b/tutteli-gradle-spek/src/test/groovy/ch/tutteli/gradle/plugins/spek/SpekPluginSmokeTest.groovy @@ -20,10 +20,6 @@ class SpekPluginSmokeTest { smokeTest(KotlinPluginWrapper) } - @Test - void smokeTest_KotlinPlatformJvmPlugin() { - smokeTest(KotlinPlatformJvmPlugin) - } @Test void smokeTest_KotlinMultiPlatformPlugin() { smokeTest(KotlinMultiplatformPluginWrapper) From 32c652470b5c45b913d753f5ed92d977d71470af Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Tue, 10 Sep 2024 11:11:22 +0200 Subject: [PATCH 4/4] drop test for old platform plugins --- .../plugins/publish/PublishPluginSmokeTest.groovy | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/plugins/publish/PublishPluginSmokeTest.groovy b/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/plugins/publish/PublishPluginSmokeTest.groovy index 55e975b8..dbfbe1ef 100644 --- a/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/plugins/publish/PublishPluginSmokeTest.groovy +++ b/tutteli-gradle-publish/src/test/groovy/ch/tutteli/gradle/plugins/publish/PublishPluginSmokeTest.groovy @@ -64,18 +64,6 @@ class PublishPluginSmokeTest { assertExtensionAndTaskDefinedAfterEvaluate(project) } - @Test - void kotlinOldPlatformJs_TasksAndExtensionPresent() { - //arrange & act - Project project = setUp { project -> - project.plugins.apply('kotlin-platform-js') - } - project.evaluate() - //assert - assertExtensionAndTaskDefinedAfterEvaluate(project) - } - - @Test void kotlinMultiplatform_TasksAndExtensionPresent() { //arrange & act