Skip to content

Commit

Permalink
Stop using deprecated configurations in integration tests
Browse files Browse the repository at this point in the history
Closes gh-334
  • Loading branch information
wilkinsona committed Jul 1, 2022
1 parent a69cd90 commit 452f946
Show file tree
Hide file tree
Showing 47 changed files with 111 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ void directProjectDependenciesTakePrecedenceOverDependencyManagement() {
void transitiveProjectDependenciesTakePrecedenceOverDependencyManagement() {
writeLines(Paths.get("settings.gradle"), "include ':child'", "include ':grandchild'");
writeLines(Paths.get("child", "build.gradle"), "group = 'test'", "version = '1.1.0'", "apply plugin: 'java'",
"dependencies {", "\tcompile project([path: ':grandchild'])", "}");
"dependencies {", "\timplementation project([path: ':grandchild'])", "}");
writeLines(Paths.get("grandchild", "build.gradle"), "group = 'test-other'", "version = '1.1.0'",
"apply plugin: 'java'", "dependencies {", "\tcompile project([path: ':grandchild'])", "}");
"apply plugin: 'java'", "dependencies {", "\timplementation project([path: ':grandchild'])", "}");
this.gradleBuild.runner().withArguments("resolve").build();
assertThat(readLines("resolved.txt")).containsOnly("child-1.1.0.jar", "grandchild-1.1.0.jar");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ repositories {
}

dependencies {
compile ':foo:1.0.0'
implementation ':foo:1.0.0'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {
}

dependencyManagement {
configurations("compile") {
configurations("implementation") {
dependencies {
dependency 'org.springframework:spring-core:4.0.0.RELEASE'
}
Expand All @@ -19,7 +19,7 @@ task managedVersions {
doFirst {
def output = new File("${buildDir}/managed-versions.txt")
output.parentFile.mkdirs()
dependencyManagement.compile.managedVersions.each { key, value ->
dependencyManagement.implementation.managedVersions.each { key, value ->
output << "${key} -> ${value}\n"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {
}

dependencyManagement {
configurations(project.configurations.getByName("compile")) {
configurations(project.configurations.getByName("implementation")) {
dependencies {
dependency 'org.springframework:spring-core:4.0.0.RELEASE'
}
Expand All @@ -19,7 +19,7 @@ task managedVersions {
doFirst {
def output = new File("${buildDir}/managed-versions.txt")
output.parentFile.mkdirs()
dependencyManagement.compile.managedVersions.each { key, value ->
dependencyManagement.implementation.managedVersions.each { key, value ->
output << "${key} -> ${value}\n"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ repositories {
}

dependencyManagement {
compile {
implementation {
dependencies {
dependency 'commons-logging:commons-logging:1.1.1'
}
}
}

dependencies {
testRuntime 'commons-logging:commons-logging'
testRuntimeOnly 'commons-logging:commons-logging'
}

task resolve {
doFirst {
def files = project.configurations.testRuntime.resolve()
def files = project.configurations.testRuntimeClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ dependencyManagement {
dependencies {
dependency 'commons-logging:commons-logging:1.1.2'
}
compile {
implementation {
dependencies {
dependency 'commons-logging:commons-logging:1.1.1'
}
}
}

dependencies {
compile 'org.springframework:spring-core:4.0.6.RELEASE'
implementation 'org.springframework:spring-core:4.0.6.RELEASE'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ dependencyManagement {
}

dependencies {
compile 'org.springframework:spring-core:4.0.4.RELEASE'
implementation 'org.springframework:spring-core:4.0.4.RELEASE'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ dependencyManagement {
}

dependencies {
compile 'org.springframework:spring-core'
implementation 'org.springframework:spring-core'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ dependencyManagement {
}

dependencies {
compile 'org.assertj:assertj-guava:3.0.0'
implementation 'org.assertj:assertj-guava:3.0.0'
}

task resolve {
doFirst {
def files = project.configurations.runtime.resolve()
def files = project.configurations.runtimeClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ dependencyManagement {
}

dependencies {
compile "commons-logging:commons-logging:latest.integration"
implementation "commons-logging:commons-logging:latest.integration"
}

task resolve {
doFirst {
def files = project.configurations.runtime.resolve()
def files = project.configurations.runtimeClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ dependencyManagement {
}

dependencies {
compile "commons-logging:commons-logging:latest.integration"
implementation "commons-logging:commons-logging:latest.integration"
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ dependencyManagement {
}

dependencies {
compile 'org.springframework:spring-core'
implementation 'org.springframework:spring-core'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ dependencyManagement {
}

dependencies {
compile 'org.slf4j:slf4j-api'
compile 'org.slf4j:slf4j-simple'
implementation 'org.slf4j:slf4j-api'
implementation 'org.slf4j:slf4j-simple'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ repositories {
}

dependencies {
compile 'test:direct-exclude:1.0'
compile 'org.springframework:spring-core:4.1.2.RELEASE'
implementation 'test:direct-exclude:1.0'
implementation 'org.springframework:spring-core:4.1.2.RELEASE'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ dependencyManagement {
}
}
dependencies {
compile 'org.springframework:spring-tx:4.1.2.RELEASE'
implementation 'org.springframework:spring-tx:4.1.2.RELEASE'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ dependencyManagement {
}

dependencies {
compile project([path: ':child'])
implementation project([path: ':child'])
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {
}

dependencies {
compile 'commons-logging:commons-logging:latest.integration'
implementation 'commons-logging:commons-logging:latest.integration'
}

task managedVersions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ dependencyManagement {
}

dependencies {
compile 'org.springframework:spring-core'
implementation 'org.springframework:spring-core'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ repositories {
}

dependencies {
compile 'test:direct-exclude:1.0'
implementation 'test:direct-exclude:1.0'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ repositories {
}

dependencies {
compile 'test:transitive-exclude:1.0'
implementation 'test:transitive-exclude:1.0'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ repositories {
}

dependencies {
compile 'test:malformed-exclude:1.0'
implementation 'test:malformed-exclude:1.0'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ repositories {
}

dependencies {
compile 'org.springframework.boot:spring-boot-starter-remote-shell:1.2.0.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-remote-shell:1.2.0.RELEASE'
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ repositories {
}

dependencies {
compile("org.springframework.cloud:spring-cloud-starter-eureka:1.0.0.RELEASE")
compile("org.springframework.boot:spring-boot-starter-web:1.2.3.RELEASE")
implementation("org.springframework.cloud:spring-cloud-starter-eureka:1.0.0.RELEASE")
implementation("org.springframework.boot:spring-boot-starter-web:1.2.3.RELEASE")
}

task resolve {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ repositories {
}

dependencies {
compile 'test:direct-exclude:1.0'
testCompile 'commons-logging:commons-logging:1.1.3'
implementation 'test:direct-exclude:1.0'
testImplementation 'commons-logging:commons-logging:1.1.3'
}

task resolveCompile {
doFirst {
def files = project.configurations.compile.resolve()
def files = project.configurations.compileClasspath.resolve()
def output = new File("${buildDir}/resolved-compile.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand All @@ -26,7 +26,7 @@ task resolveCompile {

task resolveTestCompile {
doFirst {
def files = project.configurations.testCompile.resolve()
def files = project.configurations.testCompileClasspath.resolve()
def output = new File("${buildDir}/resolved-test-compile.txt")
output.parentFile.mkdirs()
files.collect { it.name }.each { output << "${it}\n" }
Expand Down
Loading

0 comments on commit 452f946

Please sign in to comment.