From bfebd47fd8880bc8f888639aa42eeb887bf9d13a Mon Sep 17 00:00:00 2001 From: Klaus Lehner <172195+klu2@users.noreply.github.com> Date: Mon, 6 Mar 2023 09:02:16 +0100 Subject: [PATCH] #24 ensure compatibility with Gradle 8.0.2 --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../cloudflight/license/gradle/LicensePluginTest.kt | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fc..3796d3c 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-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/test/kotlin/io/cloudflight/license/gradle/LicensePluginTest.kt b/src/test/kotlin/io/cloudflight/license/gradle/LicensePluginTest.kt index 9008a57..71441ae 100644 --- a/src/test/kotlin/io/cloudflight/license/gradle/LicensePluginTest.kt +++ b/src/test/kotlin/io/cloudflight/license/gradle/LicensePluginTest.kt @@ -8,6 +8,8 @@ import org.assertj.core.api.Assertions.assertThat import org.gradle.testkit.runner.TaskOutcome import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.ValueSource import java.nio.file.Paths import kotlin.io.path.exists @@ -23,9 +25,10 @@ class LicensePluginTest { assertThat(result2.task(":clfLicenseReport")?.outcome).isEqualTo(TaskOutcome.UP_TO_DATE) } - @Test - fun `clfLicenseReport is called with clean build`(): Unit = - licenseFixture("single-java-module") { + @ParameterizedTest + @ValueSource(strings = ["7.4.2", "7.6", "8.0.2"]) + fun `clfLicenseReport is called with clean build`(gradleVersion: String): Unit = + licenseFixture("single-java-module", gradleVersion = gradleVersion) { val result = run("clean", "build", "clfCreateTrackerReport") assertThat(result.task(":clfLicenseReport")?.outcome).isEqualTo(TaskOutcome.SUCCESS) } @@ -154,7 +157,7 @@ class LicensePluginTest { } @Test - fun `android-module build`():Unit = licenseFixture("android-module") { + fun `android-module build`(): Unit = licenseFixture("android-module") { val result = runCleanBuild() assertThat(result.task(":app:clfLicenseReport")?.outcome).isEqualTo(TaskOutcome.SUCCESS)