Skip to content

Commit fcc504b

Browse files
committed
Update dependency scope
1 parent f4dae5b commit fcc504b

File tree

40 files changed

+211
-213
lines changed

40 files changed

+211
-213
lines changed

build.gradle

+11-11
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ buildscript {
1111
classpath "com.github.adrianbk:gradle-travisci-trigger-plugin:1.0.0"
1212
classpath "com.bmuschko:gradle-nexus-plugin:$gradleNexusPluginVersion"
1313
classpath "gradle.plugin.io.sdkman:gradle-sdkvendor-plugin:$gradleSdkVendorVersion"
14-
// classpath "io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1"
1514
classpath "javax.xml.bind:jaxb-api:$jaxbVersion"
1615
classpath "com.sun.xml.bind:jaxb-impl:$jaxbVersion"
1716
classpath "org.codehaus.groovy.modules.http-builder:http-builder:0.7.2"
@@ -284,6 +283,7 @@ subprojects { project ->
284283
project.ext.artifactoryPublishPassword = System.getenv("ARTIFACTORY_PASSWORD")
285284
}
286285

286+
apply plugin: 'java-library'
287287
apply plugin: 'groovy'
288288
// apply plugin: "io.github.groovylang.groovydoc"
289289
if(!isTestSuite) {
@@ -451,24 +451,24 @@ subprojects { project ->
451451
documentation "org.codehaus.groovy:groovy-cli-picocli:$groovyVersion"
452452
documentation ("com.github.javaparser:javaparser-core:$javaParserCoreVersion")
453453

454-
compile groovyDependency
454+
api groovyDependency
455455

456-
testCompile "org.codehaus.groovy:groovy-test-junit5:${groovyVersion}"
457-
testCompile "org.junit.jupiter:junit-jupiter-api:5.6.2"
458-
testCompile "org.junit.platform:junit-platform-runner:1.6.2"
456+
testImplementation "org.codehaus.groovy:groovy-test-junit5:${groovyVersion}"
457+
testImplementation "org.junit.jupiter:junit-jupiter-api:5.6.2"
458+
testImplementation "org.junit.platform:junit-platform-runner:1.6.2"
459459
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.6.2"
460460

461461
if (project.name != "grails-docs") {
462462
// Logging
463-
compile "org.slf4j:slf4j-api:$slf4jVersion"
464-
compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
463+
api "org.slf4j:slf4j-api:$slf4jVersion"
464+
api "org.slf4j:jcl-over-slf4j:$slf4jVersion"
465465

466466
// Testing
467-
testCompile "org.slf4j:slf4j-simple:$slf4jVersion"
468-
testCompile("org.spockframework:spock-core:${spockVersion}") { transitive = false }
467+
testImplementation "org.slf4j:slf4j-simple:$slf4jVersion"
468+
testImplementation("org.spockframework:spock-core:${spockVersion}") { transitive = false }
469469
// Required by Spock's Mocking
470-
testCompile "cglib:cglib-nodep:${cglibVersion}"
471-
testCompile "org.objenesis:objenesis:${objenesisVersion}"
470+
testImplementation "cglib:cglib-nodep:${cglibVersion}"
471+
testImplementation "org.objenesis:objenesis:${objenesisVersion}"
472472
}
473473
}
474474

gradle/docs.gradle

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ buildscript {
22
repositories {
33
maven { url "https://repo.grails.org/grails/core" }
44
}
5-
dependencies {
6-
// classpath "io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1"
7-
}
85
}
6+
97
/**
108
* Since Grails is a mixed Groovy/Java codebase the javadoc tool needs stubs in order for javadoc compilation to pass
119
* This target generates a set of stubs for the Groovy sources
@@ -52,7 +50,7 @@ task docs {
5250

5351
task javadoc(type:Javadoc) {
5452
def subs = subprojects.findAll { it.name != 'grails-dependencies' && it.name != 'grails-bom' && it.name != 'grails-compat' }
55-
classpath = files(subs.configurations.compile)
53+
classpath = files(subs.configurations.compileClasspath)
5654
dependsOn stubs
5755
maxMemory = '256M'
5856
destinationDir = file("$docs.destinationDir/javadoc")

gradle/integration-test.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ sourceSets {
1313
dependencies {
1414
integrationTestCompile sourceSets.main.output
1515
integrationTestCompile sourceSets.test.output
16-
integrationTestCompile configurations.testCompile
17-
integrationTestRuntime configurations.testRuntime
16+
integrationTestCompile configurations.testCompileClasspath
17+
integrationTestRuntime configurations.testRuntimeClasspath
1818
}
1919

2020
// Define integration test task

grails-bootstrap/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import org.apache.tools.ant.filters.ReplaceTokens
22

33
dependencies {
4-
compile ( "org.codehaus.groovy:groovy-xml:$groovyVersion" )
5-
compile ( "org.codehaus.groovy:groovy-templates:$groovyVersion" )
6-
compile "org.yaml:snakeyaml:1.23"
4+
api ( "org.codehaus.groovy:groovy-xml:$groovyVersion" )
5+
api ( "org.codehaus.groovy:groovy-templates:$groovyVersion" )
6+
api "org.yaml:snakeyaml:1.23"
77

88
compileOnly("io.methvin:directory-watcher:0.3.0")
99
compileOnly("org.fusesource.jansi:jansi:$jansiVersion")
@@ -13,8 +13,8 @@ dependencies {
1313
// Ant
1414
compileOnly "org.codehaus.groovy:groovy-ant:$groovyVersion"
1515

16-
testCompile("org.fusesource.jansi:jansi:$jansiVersion")
17-
testCompile("jline:jline:$jlineVersion")
16+
testImplementation("org.fusesource.jansi:jansi:$jansiVersion")
17+
testImplementation("jline:jline:$jlineVersion")
1818

1919
}
2020

grails-codecs/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
dependencies {
2-
compile 'commons-codec:commons-codec:1.10'
2+
api 'commons-codec:commons-codec:1.10'
33
}

grails-console/build.gradle

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
dependencies {
2-
compile project(":grails-core")
3-
compile "org.codehaus.groovy:groovy-console:$groovyVersion"
4-
compile "org.codehaus.groovy:groovy-swing:$groovyVersion"
5-
compile "org.codehaus.groovy:groovy-groovysh:$groovyVersion"
6-
compile "org.fusesource.jansi:jansi:$jansiVersion",
2+
api project(":grails-core")
3+
api "org.codehaus.groovy:groovy-console:$groovyVersion"
4+
api "org.codehaus.groovy:groovy-swing:$groovyVersion"
5+
api "org.codehaus.groovy:groovy-groovysh:$groovyVersion"
6+
implementation "org.fusesource.jansi:jansi:$jansiVersion",
77
"jline:jline:$jlineVersion",
88
"net.java.dev.jna:jna:$jnaVersion"
99

10-
compile("org.springframework.boot:spring-boot:$springBootVersion")
11-
compile "org.springframework:spring-test:${springVersion}"
10+
api("org.springframework.boot:spring-boot:$springBootVersion")
11+
api "org.springframework:spring-test:${springVersion}"
1212

13-
compile "org.springframework:spring-web:${springVersion}", optional
13+
api "org.springframework:spring-web:${springVersion}", optional
1414

15-
compile "javax.servlet:javax.servlet-api:$servletApiVersion", optional
15+
api "javax.servlet:javax.servlet-api:$servletApiVersion", optional
1616
}

grails-core/build.gradle

+16-16
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ dependencies {
66
"org.aspectj:aspectjweaver:$aspectjVersion"
77
annotationProcessor "io.micronaut:micronaut-inject-java:$micronautVersion"
88
annotationProcessor "io.micronaut.spring:micronaut-spring-annotation:$micronautSpringVersion"
9-
compile "io.micronaut:micronaut-inject:$micronautVersion"
10-
compile "io.micronaut.spring:micronaut-spring-context:$micronautSpringVersion"
11-
compile 'javax.persistence:javax.persistence-api:2.2'
12-
compile "javax.annotation:javax.annotation-api:$javaxAnnotationApiVersion"
9+
api "io.micronaut:micronaut-inject:$micronautVersion"
10+
api "io.micronaut.spring:micronaut-spring-context:$micronautSpringVersion"
11+
api 'javax.persistence:javax.persistence-api:2.2'
12+
api "javax.annotation:javax.annotation-api:$javaxAnnotationApiVersion"
1313

14-
compile "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"
15-
compile("org.springframework.boot:spring-boot:$springBootVersion")
16-
compile("org.springframework:spring-core:${springVersion}") {
14+
implementation "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"
15+
api("org.springframework.boot:spring-boot:$springBootVersion")
16+
api("org.springframework:spring-core:${springVersion}") {
1717
exclude group: 'commons-logging', module:'commons-logging'
1818
}
19-
compile("org.springframework:spring-tx:${springVersion}") {
19+
api("org.springframework:spring-tx:${springVersion}") {
2020
exclude group: 'commons-logging', module:'commons-logging'
2121
}
22-
compile("org.springframework:spring-beans:${springVersion}") {
22+
api("org.springframework:spring-beans:${springVersion}") {
2323
exclude group: 'commons-logging', module:'commons-logging'
2424
}
25-
compile("org.springframework:spring-context:${springVersion}") {
25+
api("org.springframework:spring-context:${springVersion}") {
2626
exclude group: 'commons-logging', module:'commons-logging'
2727
}
2828

@@ -32,7 +32,7 @@ dependencies {
3232
compileOnly("org.codehaus.groovy:groovy-templates:$groovyVersion")
3333

3434

35-
compile project(":grails-bootstrap"), {
35+
api project(":grails-bootstrap"), {
3636
exclude group:"org.fusesource.jansi", module:"jansi"
3737
exclude group:"jline", module:"jline"
3838
exclude group:"net.java.dev.jna", module:"jna"
@@ -48,21 +48,21 @@ dependencies {
4848
exclude group:"org.codehaus.gant", module:"gant_groovy1.8"
4949
}
5050

51-
compile project(":grails-spring"), {
51+
api project(":grails-spring"), {
5252
exclude group:'org.springframework', module:'spring-tx'
5353
exclude group:'org.springframework', module:'spring-web'
5454
exclude group:'org.grails', module:'grails-bootstrap'
5555
}
5656

57-
compile "org.grails:grails-datastore-core:$datastoreVersion"
57+
api "org.grails:grails-datastore-core:$datastoreVersion"
5858

59-
testCompile("org.springframework:spring-jdbc:${springVersion}") {
59+
testImplementation("org.springframework:spring-jdbc:${springVersion}") {
6060
exclude group: 'commons-logging', module:'commons-logging'
6161
}
6262

63-
testCompile "org.hamcrest:hamcrest-core:1.3"
63+
testImplementation "org.hamcrest:hamcrest-core:1.3"
6464

65-
testRuntime "com.h2database:h2:$h2Version"
65+
testRuntimeOnly "com.h2database:h2:$h2Version"
6666

6767
// These dependencies are not required, but due to a Groovy compiler bug they are loaded by Groovy and hence
6868
// have to be on the path for compilation even though they shouldn't be

grails-databinding/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
dependencies {
2-
compile "org.codehaus.groovy:groovy-xml:$groovyVersion"
2+
api "org.codehaus.groovy:groovy-xml:$groovyVersion"
33
}
44

grails-dependencies/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ publishing {
1616
delegate.groupId "org.grails"
1717
delegate.artifactId "grails-bootstrap"
1818
delegate.version( project.version )
19-
delegate.scope "compile"
19+
delegate.scope "api"
2020

2121
delegate.exclusions {
2222
delegate.exclusion {
@@ -42,14 +42,14 @@ publishing {
4242
delegate.groupId "org.grails"
4343
delegate.artifactId "grails-plugin-${sub}"
4444
delegate.version( project.version )
45-
delegate.scope "compile"
45+
delegate.scope "api"
4646
}
4747
}
4848
delegate.dependency {
4949
delegate.groupId "org.grails.plugins"
5050
delegate.artifactId "async"
5151
delegate.version asyncVersion
52-
delegate.scope "compile"
52+
delegate.scope "api"
5353
delegate.exclusions {
5454
delegate.exclusion {
5555
delegate.groupId 'javax'
@@ -61,7 +61,7 @@ publishing {
6161
delegate.groupId "org.grails.plugins"
6262
delegate.artifactId "gsp"
6363
delegate.version gspVersion
64-
delegate.scope "compile"
64+
delegate.scope "api"
6565
delegate.exclusions {
6666
delegate.exclusion {
6767
delegate.groupId 'javax'
@@ -73,7 +73,7 @@ publishing {
7373
delegate.groupId "com.h2database"
7474
delegate.artifactId "h2"
7575
delegate.version( h2Version )
76-
delegate.scope "runtime"
76+
delegate.scope "runtimeOnly"
7777
}
7878

7979
}

grails-docs/build.gradle

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
configurations {
22
// Required to keep Gradle classes off the test compile classpath.
3-
gradleConf.extendsFrom compile
3+
gradleConf.extendsFrom compileClasspath
44
}
55

66
dependencies {
77
gradleConf gradleApi()
8-
compile "commons-lang:commons-lang:$commonsLangVersion",
8+
api "commons-lang:commons-lang:$commonsLangVersion",
99
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
1010
"org.apache.ant:ant:$antVersion",
1111
'org.grails:grails-gdoc-engine:1.0.1',
1212
'org.yaml:snakeyaml:1.14',
1313
"org.codehaus.groovy:groovy-ant:$groovyVersion"
1414

15-
compile 'org.asciidoctor:asciidoctorj:1.5.4'
16-
compile('org.xhtmlrenderer:core-renderer:R8') {
15+
api 'org.asciidoctor:asciidoctorj:1.5.4'
16+
api('org.xhtmlrenderer:core-renderer:R8') {
1717
exclude group: 'bouncycastle', module:'bcprov-jdk14'
1818
}
1919

20-
runtime "org.slf4j:slf4j-api:$slf4jVersion"
20+
runtimeOnly "org.slf4j:slf4j-api:$slf4jVersion"
2121

22-
runtime('com.lowagie:itext:2.0.8')
22+
runtimeOnly('com.lowagie:itext:2.0.8')
2323

24-
compile 'org.jsoup:jsoup:1.7.3'
25-
testCompile("org.spockframework:spock-core:${spockVersion}") { transitive = false }
24+
api 'org.jsoup:jsoup:1.7.3'
25+
testImplementation("org.spockframework:spock-core:${spockVersion}") { transitive = false }
2626
}
2727

2828
sourceSets {

grails-encoder/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies {
2-
compile project(":grails-core")
2+
api project(":grails-core")
33
// HtmlUtils is used from spring-web
4-
compile "org.codehaus.groovy:groovy-json:$groovyVersion"
5-
compile "org.springframework:spring-web:${springVersion}"
4+
api "org.codehaus.groovy:groovy-json:$groovyVersion"
5+
api "org.springframework:spring-web:${springVersion}"
66
}

grails-gradle-plugin/build.gradle

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'groovy'
22

33
dependencies {
4-
compile gradleApi()
5-
compile project(":grails-gradle-model")
6-
compile project(":grails-shell"), {
4+
api gradleApi()
5+
api project(":grails-gradle-model")
6+
api project(":grails-shell"), {
77
exclude group:"org.slf4j", module:"slf4j-simple"
88
}
9-
compile project(":grails-bootstrap"), {
9+
api project(":grails-bootstrap"), {
1010
exclude group:"org.fusesource.jansi", module:"jansi"
1111
exclude group:"jline", module:"jline"
1212
exclude group:"net.java.dev.jna", module:"jna"
@@ -22,8 +22,8 @@ dependencies {
2222
exclude group:"org.codehaus.gant", module:"gant_groovy1.8"
2323
}
2424

25-
compile "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
26-
compile 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
27-
compile "io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE"
28-
compile 'com.netflix.nebula:gradle-extra-configurations-plugin:2.2.0'
25+
api "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
26+
api 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
27+
api "io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE"
28+
api 'com.netflix.nebula:gradle-extra-configurations-plugin:2.2.0'
2929
}

grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/IntegrationTestGradlePlugin.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ class IntegrationTestGradlePlugin implements Plugin<Project> {
6161
DependencyHandler dependencies = project.dependencies
6262
dependencies.add("integrationTestCompile", SourceSets.findMainSourceSet(project).output)
6363
dependencies.add("integrationTestCompile", SourceSets.findSourceSet(project, SourceSet.TEST_SOURCE_SET_NAME).output)
64-
dependencies.add("integrationTestCompile", project.configurations.findByName("testCompile"))
65-
dependencies.add("integrationTestRuntime", project.configurations.findByName("testRuntime"))
64+
dependencies.add("integrationTestCompile", project.configurations.findByName("testCompileClasspath"))
65+
dependencies.add("integrationTestRuntime", project.configurations.findByName("testRuntimeClasspath"))
6666

6767
TaskContainer tasks = project.tasks
6868
Test integrationTestTask = tasks.create('integrationTest', Test)

grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/web/gsp/GroovyPagePlugin.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class GroovyPagePlugin implements Plugin<Project> {
4343
File destDir = output?.dir("gsp-classes") ?: new File(project.buildDir, "gsp-classes/main")
4444

4545
Configuration providedConfig = project.configurations.findByName('provided')
46-
def allClasspath = project.configurations.compile + project.configurations.gspCompile + classesDirs
46+
def allClasspath = project.configurations.compileClasspath + project.configurations.gspCompile + classesDirs
4747
if(providedConfig) {
4848
allClasspath += providedConfig
4949
}

grails-logging/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
dependencies {
2-
compile project(":grails-core")
3-
}
2+
api project(":grails-core")
3+
}

grails-plugin-codecs/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ dependencies {
66
compileOnly "io.micronaut.spring:micronaut-spring-annotation:$micronautSpringVersion"
77
compileOnly "io.micronaut:micronaut-inject-groovy:$micronautVersion"
88

9-
compile project(":grails-web"), project(":grails-encoder")
10-
runtime project(":grails-codecs")
9+
api project(":grails-web"), project(":grails-encoder")
10+
runtimeOnly project(":grails-codecs")
1111
}
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
dependencies {
2-
compile project(":grails-core"),
2+
api project(":grails-core"),
33
project(":grails-web"),
44
project(':grails-plugin-mimetypes'),
55
project(':grails-plugin-validation'),
66
project(':grails-plugin-domain-class')
77

8-
compile("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")
9-
runtime project(':grails-plugin-i18n')
8+
api("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")
9+
runtimeOnly project(':grails-plugin-i18n')
1010

11-
testRuntime "jline:jline:$jlineVersion"
12-
testRuntime "org.fusesource.jansi:jansi:$jansiVersion"
11+
testRuntimeOnly "jline:jline:$jlineVersion"
12+
testRuntimeOnly "org.fusesource.jansi:jansi:$jansiVersion"
1313
}

0 commit comments

Comments
 (0)