diff --git a/.github/workflows/nebula.yml b/.github/workflows/nebula.yml index 8781024..bb6f338 100644 --- a/.github/workflows/nebula.yml +++ b/.github/workflows/nebula.yml @@ -50,15 +50,6 @@ jobs: - ${{ runner.os }}-gradlewrapper- - name: Gradle build run: ./gradlew --info --stacktrace build --scan - - name: Post-success actions - if: success() - run: ./gradlew jacocoTestReport coveralls - env: - CI_NAME: github_actions - CI_BUILD_NUMBER: ${{ github.sha }} - CI_BUILD_URL: 'https://github.com/${{ github.repository }}' - CI_BRANCH: ${{ github.ref }} - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish: if: startsWith(github.ref, 'refs/tags/v') needs: validation diff --git a/build.gradle b/build.gradle index dcf69d8..971c25f 100644 --- a/build.gradle +++ b/build.gradle @@ -16,8 +16,8 @@ */ plugins { - id 'com.netflix.nebula.plugin-plugin' version '20.0.0' - id "org.jetbrains.kotlin.jvm" version "1.6.21" + id 'com.netflix.nebula.plugin-plugin' version '20.2.2' + id "org.jetbrains.kotlin.jvm" version "1.8.0" id 'java-gradle-plugin' } @@ -65,8 +65,9 @@ gradlePlugin { } java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + toolchain { + languageVersion = JavaLanguageVersion.of(8) + } } idea { @@ -80,3 +81,7 @@ idea { tasks.withType(GenerateModuleMetadata).configureEach { suppressedValidationErrors.add('enforced-platform') } + +javaCrossCompile { + disableKotlinSupport = true +} diff --git a/gradle.lockfile b/gradle.lockfile index c075198..c7b9a73 100644 --- a/gradle.lockfile +++ b/gradle.lockfile @@ -8,7 +8,7 @@ com.fasterxml.jackson.core:jackson-databind:2.9.10.8=compileClasspath,integTestC com.fasterxml.jackson.module:jackson-module-kotlin:2.9.10=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.fasterxml.jackson:jackson-bom:2.9.10.20210106=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.google.guava:guava:20.0=integTestRuntimeClasspath,runtimeClasspath,testRuntimeClasspath -com.netflix.nebula:gradle-dependency-lock-plugin:13.0.0=integTestRuntimeClasspath,testRuntimeClasspath +com.netflix.nebula:gradle-dependency-lock-plugin:13.1.0=integTestRuntimeClasspath,testRuntimeClasspath com.netflix.nebula:gradle-scm-plugin:7.0.0=integTestRuntimeClasspath,testRuntimeClasspath com.netflix.nebula:nebula-dependencies-comparison:0.2.1=integTestRuntimeClasspath,testRuntimeClasspath com.netflix.nebula:nebula-dependency-recommender:12.0.0=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath @@ -31,15 +31,11 @@ org.codehaus.plexus:plexus-utils:3.3.0=integTestRuntimeClasspath,runtimeClasspat org.eclipse.sisu:org.eclipse.sisu.inject:0.3.5=integTestRuntimeClasspath,runtimeClasspath,testRuntimeClasspath org.hamcrest:hamcrest-core:1.3=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.hamcrest:hamcrest:2.2=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-reflect:1.6.21=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=compileClasspath,integTestCompileClasspath,runtimeClasspath,testCompileClasspath -org.jetbrains.kotlin:kotlin-stdlib-common:1.7.20=integTestRuntimeClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21=compileClasspath,integTestCompileClasspath,runtimeClasspath,testCompileClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20=integTestRuntimeClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21=compileClasspath,integTestCompileClasspath,runtimeClasspath,testCompileClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20=integTestRuntimeClasspath,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.6.21=compileClasspath,integTestCompileClasspath,runtimeClasspath,testCompileClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.7.20=integTestRuntimeClasspath,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-reflect:1.8.0=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-common:1.8.0=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib:1.8.0=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.jetbrains:annotations:13.0=compileClasspath,integTestCompileClasspath,integTestRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-commons:1.8.1=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.8.1=integTestCompileClasspath,integTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f398c33..d603f1a 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-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-rc-1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/integTest/groovy/nebula/plugin/resolutionrules/AbstractRulesWithSpringBootPluginSpec.groovy b/src/integTest/groovy/nebula/plugin/resolutionrules/AbstractRulesWithSpringBootPluginSpec.groovy index 774da8f..b417c76 100644 --- a/src/integTest/groovy/nebula/plugin/resolutionrules/AbstractRulesWithSpringBootPluginSpec.groovy +++ b/src/integTest/groovy/nebula/plugin/resolutionrules/AbstractRulesWithSpringBootPluginSpec.groovy @@ -31,7 +31,7 @@ class AbstractRulesWithSpringBootPluginSpec extends IntegrationTestKitSpec { return [ 'dependencyInsight', '--dependency', - groupForInsight + groupForInsight, '-s' ] } @@ -79,7 +79,7 @@ class AbstractRulesWithSpringBootPluginSpec extends IntegrationTestKitSpec { buildscript { dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:$extSpringBootVersion") - classpath "io.spring.gradle:dependency-management-plugin:1.0.7.RELEASE" + classpath "io.spring.gradle:dependency-management-plugin:1.1.0" } repositories { maven { diff --git a/src/integTest/groovy/nebula/plugin/resolutionrules/AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec.groovy b/src/integTest/groovy/nebula/plugin/resolutionrules/AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec.groovy index e5f3f6d..82997cf 100644 --- a/src/integTest/groovy/nebula/plugin/resolutionrules/AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec.groovy +++ b/src/integTest/groovy/nebula/plugin/resolutionrules/AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec.groovy @@ -35,8 +35,8 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' - managedSpringVersion = '5.1.6.RELEASE' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom + extSpringBootVersion = '2.7.0' + managedSpringVersion = '5.3.20' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = '' forcedVersion = '' @@ -66,8 +66,8 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' - managedSpringVersion = '5.1.6.RELEASE' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom + extSpringBootVersion = '2.7.0' + managedSpringVersion = '5.3.20' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = ':\${springVersion}' forcedVersion = '' @@ -96,9 +96,9 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab output.findAll("org.springframework.*:${managedSpringVersion}\n").size() == 0 where: - extSpringVersion = '5.1.8.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' - managedSpringVersion = '5.1.6.RELEASE' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom + extSpringVersion = '5.3.24' + extSpringBootVersion = '2.7.0' + managedSpringVersion = '5.3.20' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = ':\${springVersion}' forcedVersion = '' @@ -126,8 +126,8 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' - managedSpringVersion = '5.1.6.RELEASE' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom + extSpringBootVersion = '2.7.0' + managedSpringVersion = '5.3.20' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = '' forcedVersion = '4.2.9.RELEASE' @@ -158,8 +158,8 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' - managedSpringVersion = '5.1.6.RELEASE' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom + extSpringBootVersion = '2.7.0' + managedSpringVersion = '5.3.20' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = ':\${springVersion}' forcedVersion = '4.2.9.RELEASE' @@ -191,8 +191,8 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' - managedSpringVersion = '5.1.6.RELEASE' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom + extSpringBootVersion = '2.7.0' + managedSpringVersion = '5.3.20' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = ':\${springVersion}' forcedVersion = extSpringVersion @@ -222,10 +222,9 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.6.0' - managedSlf4jVersion = '1.7.26' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom - + managedSlf4jVersion = '1.7.36' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = '' forcedVersion = '' } @@ -254,10 +253,9 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.6.0' - managedSlf4jVersion = '1.7.26' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom - + managedSlf4jVersion = '1.7.36' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = ':\$slf4jVersion' forcedVersion = '' } @@ -286,9 +284,9 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.6.0' - managedSlf4jVersion = '1.7.26' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom + managedSlf4jVersion = '1.7.36' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = '' forcedVersion = '1.7.10' @@ -318,7 +316,7 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.6.0' managedSlf4jVersion = '1.7.26' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom @@ -350,7 +348,7 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.8.0-beta4' managedSlf4jVersion = '1.7.26' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom @@ -382,7 +380,7 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginAndManagedDepsSpec extends Ab where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.6.0' managedSlf4jVersion = '1.7.26' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom diff --git a/src/integTest/groovy/nebula/plugin/resolutionrules/AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec.groovy b/src/integTest/groovy/nebula/plugin/resolutionrules/AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec.groovy index 7c1b761..6f4a1bf 100644 --- a/src/integTest/groovy/nebula/plugin/resolutionrules/AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec.groovy +++ b/src/integTest/groovy/nebula/plugin/resolutionrules/AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec.groovy @@ -40,8 +40,8 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec extend where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' - managedSpringVersion = '5.1.6.RELEASE' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom + extSpringBootVersion = '2.7.0' + managedSpringVersion = '5.3.20' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = ':\${springVersion}' forcedVersion = '' @@ -73,9 +73,9 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec extend dependencyInsightContains(output, 'org.springframework:spring-core', extSpringVersion) where: - extSpringVersion = '5.1.8.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' - managedSpringVersion = '5.1.6.RELEASE' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.4.RELEASE/spring-boot-dependencies-2.1.4.RELEASE.pom + extSpringVersion = '5.3.24' + extSpringBootVersion = '2.7.0' + managedSpringVersion = '5.3.20' // from https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/5.3.20/spring-boot-dependencies-5.3.20.pom requestedVersion = ':\${springVersion}' forcedVersion = '' } @@ -107,7 +107,7 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec extend where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' requestedVersion = ':\${springVersion}' forcedVersion = '4.2.4.RELEASE' @@ -136,7 +136,7 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec extend where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.6.0' requestedVersion = ':\$slf4jVersion' @@ -166,7 +166,7 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec extend where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.6.0' requestedVersion = '' @@ -196,7 +196,7 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec extend where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.6.0' requestedVersion = ':\$slf4jVersion' @@ -226,7 +226,7 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec extend where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.8.0-beta4' requestedVersion = ':\$slf4jVersion' @@ -256,7 +256,7 @@ class AlignAndSubstituteRulesWithSpringBoot2xPluginWithoutManagedDepsSpec extend where: extSpringVersion = '4.2.4.RELEASE' - extSpringBootVersion = '2.1.4.RELEASE' + extSpringBootVersion = '2.7.0' extSlf4jVersion = '1.6.0' requestedVersion = ':\$slf4jVersion' diff --git a/src/integTest/groovy/nebula/plugin/resolutionrules/AlignRulesForceSpec.groovy b/src/integTest/groovy/nebula/plugin/resolutionrules/AlignRulesForceSpec.groovy index 36153f7..9712e71 100644 --- a/src/integTest/groovy/nebula/plugin/resolutionrules/AlignRulesForceSpec.groovy +++ b/src/integTest/groovy/nebula/plugin/resolutionrules/AlignRulesForceSpec.groovy @@ -52,7 +52,7 @@ class AlignRulesForceSpec extends AbstractAlignRulesSpec { """.stripIndent() when: - def tasks = ['dependencies', '--configuration', 'compileClasspath', '--warning-mode', 'none'] + def tasks = ['dependencies', '--configuration', 'compileClasspath', '--warning-mode', 'none', '-s'] def result = runTasks(*tasks) @@ -66,7 +66,6 @@ class AlignRulesForceSpec extends AbstractAlignRulesSpec { name | force "all" | "configurations.all { resolutionStrategy { force 'test.nebula:a:0.15.0' } }" "configuration" | "configurations.compileClasspath { resolutionStrategy { force 'test.nebula:a:0.15.0' } }" - "dependency" | "dependencies { implementation ('test.nebula:a:0.15.0') { force = true } }" } @Unroll diff --git a/src/integTest/groovy/nebula/plugin/resolutionrules/AlignRulesForceStrictlyWithSubstitutionSpec.groovy b/src/integTest/groovy/nebula/plugin/resolutionrules/AlignRulesForceStrictlyWithSubstitutionSpec.groovy index 8a284d6..5a4839e 100644 --- a/src/integTest/groovy/nebula/plugin/resolutionrules/AlignRulesForceStrictlyWithSubstitutionSpec.groovy +++ b/src/integTest/groovy/nebula/plugin/resolutionrules/AlignRulesForceStrictlyWithSubstitutionSpec.groovy @@ -26,87 +26,6 @@ class AlignRulesForceStrictlyWithSubstitutionSpec extends AbstractAlignRulesSpec debug = true } - @Unroll - def 'force to good version while substitution is triggered by a transitive dependency'() { - buildFile << """\ - dependencies { - implementation('test.nebula:a:1.1.0') { - force = true - } - implementation 'test.nebula:b:1.0.0' // added for alignment - implementation 'test.nebula:c:1.0.0' // added for alignment - implementation 'test.other:z:1.0.0' // brings in bad version - } - """.stripIndent() - - when: - def tasks = ['dependencyInsight', '--dependency', 'test.nebula', '--warning-mode', 'none'] - def results = runTasks(*tasks) - - then: - // force to an okay version is the primary contributor; the substitution rule was a secondary contributor - results.output.contains 'test.nebula:a:1.2.0 -> 1.1.0\n' - results.output.contains 'test.nebula:b:1.0.0 -> 1.1.0\n' - results.output.contains 'test.nebula:c:1.0.0 -> 1.1.0\n' - - results.output.contains 'aligned' - results.output.contains '- Forced' - results.output.contains "- Selected by rule: substituted test.nebula:a:1.2.0 with test.nebula:a:1.3.0 because '★ custom substitution reason'" - } - - @Unroll - def 'force to bad version triggers a substitution'() { - buildFile << """\ - dependencies { - implementation('test.nebula:a:1.2.0') { - force = true // force to bad version triggers a substitution - } - implementation 'test.nebula:b:1.0.0' // added for alignment - implementation 'test.nebula:c:1.0.0' // added for alignment - } - """.stripIndent() - - when: - def tasks = ['dependencyInsight', '--dependency', 'test.nebula', '--warning-mode', 'none'] - def results = runTasks(*tasks) - - then: - // substitution rule to a known-good-version was the primary contributor; force to a bad version was a secondary contributor - assert results.output.contains('test.nebula:a:1.2.0 -> 1.3.0\n') - assert results.output.contains('test.nebula:b:1.0.0 -> 1.3.0\n') - assert results.output.contains('test.nebula:c:1.0.0 -> 1.3.0\n') - results.output.contains 'aligned' - results.output.contains('- Forced') - results.output.contains "- Selected by rule: substituted test.nebula:a:1.2.0 with test.nebula:a:1.3.0 because '★ custom substitution reason'" - } - - @Unroll - def 'force to a good version while substitution is triggered by a direct dependency'() { - buildFile << """\ - dependencies { - implementation('test.nebula:a:1.1.0') { - force = true // force to good version - } - implementation 'test.nebula:b:1.0.0' // added for alignment - implementation 'test.nebula:c:1.2.0' // bad version - } - """.stripIndent() - - when: - def tasks = ['dependencyInsight', '--dependency', 'test.nebula', '--warning-mode', 'none'] - def results = runTasks(*tasks) - - then: - // force to an okay version is the primary contributor; the substitution rule was a secondary contributor - results.output.contains 'test.nebula:a:1.1.0\n' - results.output.contains 'test.nebula:b:1.0.0 -> 1.1.0\n' - results.output.contains 'test.nebula:c:1.2.0 -> 1.1.0\n' - - results.output.contains 'aligned' - results.output.toLowerCase().contains 'forced' - results.output.contains "- Selected by rule: substituted test.nebula:c:1.2.0 with test.nebula:c:1.3.0 because '★ custom substitution reason'" - } - @Unroll def 'resolution strategy force to good version while substitution is triggered by a transitive dependency'() { buildFile << """\