Move away from deprecated Gradle configurations

Closes gh-14593
pull/14639/merge
jnizet 6 years ago committed by Andy Wilkinson
parent 1d49352778
commit eee07a840f

@ -21,12 +21,12 @@ repositories {
} }
dependencies { dependencies {
compile localGroovy() implementation localGroovy()
compile gradleApi() implementation gradleApi()
compile fileTree(dir: 'target/dependencies/compile', include: '*.jar') implementation fileTree(dir: 'target/dependencies/compile', include: '*.jar')
testCompile gradleTestKit() testImplementation gradleTestKit()
testCompile 'org.apache.commons:commons-compress:1.13' testImplementation 'org.apache.commons:commons-compress:1.13'
testCompile fileTree(dir: 'target/dependencies/test', include: '*.jar') testImplementation fileTree(dir: 'target/dependencies/test', include: '*.jar')
} }
jar { jar {

@ -13,7 +13,7 @@ apply plugin: 'io.spring.dependency-management'
// tag::dependencies[] // tag::dependencies[]
dependencies { dependencies {
compile 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
} }
// end::dependencies[] // end::dependencies[]

@ -12,7 +12,7 @@ repositories {
} }
dependencies { dependencies {
runtime 'org.jruby:jruby-complete:1.7.25' runtimeOnly 'org.jruby:jruby-complete:1.7.25'
} }
bootJar { bootJar {

@ -13,7 +13,7 @@ apply plugin: 'io.spring.dependency-management'
// tag::dependencies[] // tag::dependencies[]
dependencies { dependencies {
compile 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
} }
// end::dependencies[] // end::dependencies[]

@ -44,9 +44,8 @@ public class KotlinPluginActionIntegrationTests {
@Test @Test
public void kotlinVersionMatchesKotlinPluginVersion() { public void kotlinVersionMatchesKotlinPluginVersion() {
String output = this.gradleBuild String output = this.gradleBuild.build("kotlinVersion", "dependencies",
.build("kotlinVersion", "dependencies", "--configuration", "compile") "--configuration", "compileClasspath").getOutput();
.getOutput();
assertThat(output).contains("Kotlin version: 1.2.10"); assertThat(output).contains("Kotlin version: 1.2.10");
assertThat(output) assertThat(output)
.containsPattern("org.jetbrains.kotlin:kotlin-stdlib-jdk8:* -> 1.2.10"); .containsPattern("org.jetbrains.kotlin:kotlin-stdlib-jdk8:* -> 1.2.10");

@ -12,5 +12,5 @@ repositories {
} }
dependencies { dependencies {
compile 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
} }

@ -12,7 +12,7 @@ repositories {
} }
dependencies { dependencies {
def configurationName = GradleVersion.current().compareTo(GradleVersion.version("4.6")) >= 0 ? 'annotationProcessor': 'compile' def configurationName = GradleVersion.current().compareTo(GradleVersion.version("4.6")) >= 0 ? 'annotationProcessor': 'implementation'
add(configurationName, [name: 'spring-boot-configuration-processor-1.2.3']) add(configurationName, [name: 'spring-boot-configuration-processor-1.2.3'])
} }

@ -28,7 +28,7 @@ repositories {
} }
dependencies { dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
task kotlinVersion { task kotlinVersion {

@ -12,5 +12,5 @@ repositories {
} }
dependencies { dependencies {
compile 'org.springframework.boot:spring-boot-starter' implementation 'org.springframework.boot:spring-boot-starter'
} }

@ -26,6 +26,6 @@ repositories {
} }
dependencies { dependencies {
compile "org.apache.commons:commons-lang3:3.6" implementation "org.apache.commons:commons-lang3:3.6"
provided "org.apache.commons:commons-lang3:3.6" provided "org.apache.commons:commons-lang3:3.6"
} }

Loading…
Cancel
Save