-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
because 1.30 is missing the 'android' classifier See related issues: - https://bitbucket.org/snakeyaml/snakeyaml/issues/519/release-130-is-missing-android-classifier - spring-projects/spring-boot#30586 - gradle/gradle#20417
- Loading branch information
1 parent
f0c5948
commit 6749f2c
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
src/integTest/groovy/nebula/plugin/resolutionrules/SubstituteSnakeyamlSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package nebula.plugin.resolutionrules | ||
|
||
import org.gradle.testkit.runner.BuildResult | ||
import spock.lang.Unroll | ||
|
||
class SubstituteSnakeyamlSpec extends RulesBaseSpecification { | ||
def setup() { | ||
def ruleFile = new File(getClass().getResource('/substitute-snakeyaml.json').toURI()) | ||
buildFile << """\ | ||
dependencies { | ||
resolutionRules files('${ruleFile.absolutePath}') | ||
} | ||
""".stripIndent() | ||
} | ||
|
||
@Unroll | ||
def 'substitute version from #snakeyamlVersion to 1.29'() { | ||
given: | ||
buildFile << """\ | ||
dependencies { | ||
implementation "org.yaml:snakeyaml:${snakeyamlVersion}" | ||
} | ||
""".stripIndent() | ||
|
||
when: | ||
BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') | ||
|
||
then: | ||
result.output.contains "org.yaml:snakeyaml:1.30 -> 1.29" | ||
|
||
where: | ||
snakeyamlVersion << ['1.30'] | ||
} | ||
|
||
@Unroll | ||
def 'do not substitute other versions'() { | ||
given: | ||
buildFile << """\ | ||
dependencies { | ||
implementation "org.yaml:snakeyaml:${snakeyamlVersion}" | ||
} | ||
""".stripIndent() | ||
|
||
when: | ||
BuildResult result = runWithArgumentsSuccessfully('dependencies', '--configuration', 'compileClasspath') | ||
|
||
then: | ||
result.output.contains "org.yaml:snakeyaml:1.29" | ||
|
||
where: | ||
snakeyamlVersion << ['1.29'] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"align": [], | ||
"deny": [], | ||
"exclude": [], | ||
"reject": [], | ||
"replace": [], | ||
"substitute": [ | ||
{ | ||
"module": "org.yaml:snakeyaml:1.30", | ||
"with": "org.yaml:snakeyaml:1.29", | ||
"reason": "release 1.30 is missing 'android' (classifier) variant jar", | ||
"author": "Aubrey Chipman", | ||
"date": "2022-04-13" | ||
} | ||
] | ||
} |