Skip to content

Commit

Permalink
Update dependency scope
Browse files Browse the repository at this point in the history
  • Loading branch information
puneetbehl committed Jun 17, 2020
1 parent f4dae5b commit fcc504b
Show file tree
Hide file tree
Showing 40 changed files with 211 additions and 213 deletions.
22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ buildscript {
classpath "com.github.adrianbk:gradle-travisci-trigger-plugin:1.0.0"
classpath "com.bmuschko:gradle-nexus-plugin:$gradleNexusPluginVersion"
classpath "gradle.plugin.io.sdkman:gradle-sdkvendor-plugin:$gradleSdkVendorVersion"
// classpath "io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1"
classpath "javax.xml.bind:jaxb-api:$jaxbVersion"
classpath "com.sun.xml.bind:jaxb-impl:$jaxbVersion"
classpath "org.codehaus.groovy.modules.http-builder:http-builder:0.7.2"
Expand Down Expand Up @@ -284,6 +283,7 @@ subprojects { project ->
project.ext.artifactoryPublishPassword = System.getenv("ARTIFACTORY_PASSWORD")
}

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

compile groovyDependency
api groovyDependency

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

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

// Testing
testCompile "org.slf4j:slf4j-simple:$slf4jVersion"
testCompile("org.spockframework:spock-core:${spockVersion}") { transitive = false }
testImplementation "org.slf4j:slf4j-simple:$slf4jVersion"
testImplementation("org.spockframework:spock-core:${spockVersion}") { transitive = false }
// Required by Spock's Mocking
testCompile "cglib:cglib-nodep:${cglibVersion}"
testCompile "org.objenesis:objenesis:${objenesisVersion}"
testImplementation "cglib:cglib-nodep:${cglibVersion}"
testImplementation "org.objenesis:objenesis:${objenesisVersion}"
}
}

Expand Down
6 changes: 2 additions & 4 deletions gradle/docs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
// classpath "io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1"
}
}

/**
* Since Grails is a mixed Groovy/Java codebase the javadoc tool needs stubs in order for javadoc compilation to pass
* This target generates a set of stubs for the Groovy sources
Expand Down Expand Up @@ -52,7 +50,7 @@ task docs {

task javadoc(type:Javadoc) {
def subs = subprojects.findAll { it.name != 'grails-dependencies' && it.name != 'grails-bom' && it.name != 'grails-compat' }
classpath = files(subs.configurations.compile)
classpath = files(subs.configurations.compileClasspath)
dependsOn stubs
maxMemory = '256M'
destinationDir = file("$docs.destinationDir/javadoc")
Expand Down
4 changes: 2 additions & 2 deletions gradle/integration-test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ sourceSets {
dependencies {
integrationTestCompile sourceSets.main.output
integrationTestCompile sourceSets.test.output
integrationTestCompile configurations.testCompile
integrationTestRuntime configurations.testRuntime
integrationTestCompile configurations.testCompileClasspath
integrationTestRuntime configurations.testRuntimeClasspath
}

// Define integration test task
Expand Down
10 changes: 5 additions & 5 deletions grails-bootstrap/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import org.apache.tools.ant.filters.ReplaceTokens

dependencies {
compile ( "org.codehaus.groovy:groovy-xml:$groovyVersion" )
compile ( "org.codehaus.groovy:groovy-templates:$groovyVersion" )
compile "org.yaml:snakeyaml:1.23"
api ( "org.codehaus.groovy:groovy-xml:$groovyVersion" )
api ( "org.codehaus.groovy:groovy-templates:$groovyVersion" )
api "org.yaml:snakeyaml:1.23"

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

testCompile("org.fusesource.jansi:jansi:$jansiVersion")
testCompile("jline:jline:$jlineVersion")
testImplementation("org.fusesource.jansi:jansi:$jansiVersion")
testImplementation("jline:jline:$jlineVersion")

}

Expand Down
2 changes: 1 addition & 1 deletion grails-codecs/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies {
compile 'commons-codec:commons-codec:1.10'
api 'commons-codec:commons-codec:1.10'
}
18 changes: 9 additions & 9 deletions grails-console/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
dependencies {
compile project(":grails-core")
compile "org.codehaus.groovy:groovy-console:$groovyVersion"
compile "org.codehaus.groovy:groovy-swing:$groovyVersion"
compile "org.codehaus.groovy:groovy-groovysh:$groovyVersion"
compile "org.fusesource.jansi:jansi:$jansiVersion",
api project(":grails-core")
api "org.codehaus.groovy:groovy-console:$groovyVersion"
api "org.codehaus.groovy:groovy-swing:$groovyVersion"
api "org.codehaus.groovy:groovy-groovysh:$groovyVersion"
implementation "org.fusesource.jansi:jansi:$jansiVersion",
"jline:jline:$jlineVersion",
"net.java.dev.jna:jna:$jnaVersion"

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

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

compile "javax.servlet:javax.servlet-api:$servletApiVersion", optional
api "javax.servlet:javax.servlet-api:$servletApiVersion", optional
}
32 changes: 16 additions & 16 deletions grails-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ dependencies {
"org.aspectj:aspectjweaver:$aspectjVersion"
annotationProcessor "io.micronaut:micronaut-inject-java:$micronautVersion"
annotationProcessor "io.micronaut.spring:micronaut-spring-annotation:$micronautSpringVersion"
compile "io.micronaut:micronaut-inject:$micronautVersion"
compile "io.micronaut.spring:micronaut-spring-context:$micronautSpringVersion"
compile 'javax.persistence:javax.persistence-api:2.2'
compile "javax.annotation:javax.annotation-api:$javaxAnnotationApiVersion"
api "io.micronaut:micronaut-inject:$micronautVersion"
api "io.micronaut.spring:micronaut-spring-context:$micronautSpringVersion"
api 'javax.persistence:javax.persistence-api:2.2'
api "javax.annotation:javax.annotation-api:$javaxAnnotationApiVersion"

compile "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"
compile("org.springframework.boot:spring-boot:$springBootVersion")
compile("org.springframework:spring-core:${springVersion}") {
implementation "com.github.ben-manes.caffeine:caffeine:$caffeineVersion"
api("org.springframework.boot:spring-boot:$springBootVersion")
api("org.springframework:spring-core:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
}
compile("org.springframework:spring-tx:${springVersion}") {
api("org.springframework:spring-tx:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
}
compile("org.springframework:spring-beans:${springVersion}") {
api("org.springframework:spring-beans:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
}
compile("org.springframework:spring-context:${springVersion}") {
api("org.springframework:spring-context:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
}

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


compile project(":grails-bootstrap"), {
api project(":grails-bootstrap"), {
exclude group:"org.fusesource.jansi", module:"jansi"
exclude group:"jline", module:"jline"
exclude group:"net.java.dev.jna", module:"jna"
Expand All @@ -48,21 +48,21 @@ dependencies {
exclude group:"org.codehaus.gant", module:"gant_groovy1.8"
}

compile project(":grails-spring"), {
api project(":grails-spring"), {
exclude group:'org.springframework', module:'spring-tx'
exclude group:'org.springframework', module:'spring-web'
exclude group:'org.grails', module:'grails-bootstrap'
}

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

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

testCompile "org.hamcrest:hamcrest-core:1.3"
testImplementation "org.hamcrest:hamcrest-core:1.3"

testRuntime "com.h2database:h2:$h2Version"
testRuntimeOnly "com.h2database:h2:$h2Version"

// These dependencies are not required, but due to a Groovy compiler bug they are loaded by Groovy and hence
// have to be on the path for compilation even though they shouldn't be
Expand Down
2 changes: 1 addition & 1 deletion grails-databinding/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
compile "org.codehaus.groovy:groovy-xml:$groovyVersion"
api "org.codehaus.groovy:groovy-xml:$groovyVersion"
}

10 changes: 5 additions & 5 deletions grails-dependencies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publishing {
delegate.groupId "org.grails"
delegate.artifactId "grails-bootstrap"
delegate.version( project.version )
delegate.scope "compile"
delegate.scope "api"

delegate.exclusions {
delegate.exclusion {
Expand All @@ -42,14 +42,14 @@ publishing {
delegate.groupId "org.grails"
delegate.artifactId "grails-plugin-${sub}"
delegate.version( project.version )
delegate.scope "compile"
delegate.scope "api"
}
}
delegate.dependency {
delegate.groupId "org.grails.plugins"
delegate.artifactId "async"
delegate.version asyncVersion
delegate.scope "compile"
delegate.scope "api"
delegate.exclusions {
delegate.exclusion {
delegate.groupId 'javax'
Expand All @@ -61,7 +61,7 @@ publishing {
delegate.groupId "org.grails.plugins"
delegate.artifactId "gsp"
delegate.version gspVersion
delegate.scope "compile"
delegate.scope "api"
delegate.exclusions {
delegate.exclusion {
delegate.groupId 'javax'
Expand All @@ -73,7 +73,7 @@ publishing {
delegate.groupId "com.h2database"
delegate.artifactId "h2"
delegate.version( h2Version )
delegate.scope "runtime"
delegate.scope "runtimeOnly"
}

}
Expand Down
16 changes: 8 additions & 8 deletions grails-docs/build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
configurations {
// Required to keep Gradle classes off the test compile classpath.
gradleConf.extendsFrom compile
gradleConf.extendsFrom compileClasspath
}

dependencies {
gradleConf gradleApi()
compile "commons-lang:commons-lang:$commonsLangVersion",
api "commons-lang:commons-lang:$commonsLangVersion",
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
"org.apache.ant:ant:$antVersion",
'org.grails:grails-gdoc-engine:1.0.1',
'org.yaml:snakeyaml:1.14',
"org.codehaus.groovy:groovy-ant:$groovyVersion"

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

runtime "org.slf4j:slf4j-api:$slf4jVersion"
runtimeOnly "org.slf4j:slf4j-api:$slf4jVersion"

runtime('com.lowagie:itext:2.0.8')
runtimeOnly('com.lowagie:itext:2.0.8')

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

sourceSets {
Expand Down
6 changes: 3 additions & 3 deletions grails-encoder/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
compile project(":grails-core")
api project(":grails-core")
// HtmlUtils is used from spring-web
compile "org.codehaus.groovy:groovy-json:$groovyVersion"
compile "org.springframework:spring-web:${springVersion}"
api "org.codehaus.groovy:groovy-json:$groovyVersion"
api "org.springframework:spring-web:${springVersion}"
}
16 changes: 8 additions & 8 deletions grails-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'groovy'

dependencies {
compile gradleApi()
compile project(":grails-gradle-model")
compile project(":grails-shell"), {
api gradleApi()
api project(":grails-gradle-model")
api project(":grails-shell"), {
exclude group:"org.slf4j", module:"slf4j-simple"
}
compile project(":grails-bootstrap"), {
api project(":grails-bootstrap"), {
exclude group:"org.fusesource.jansi", module:"jansi"
exclude group:"jline", module:"jline"
exclude group:"net.java.dev.jna", module:"jna"
Expand All @@ -22,8 +22,8 @@ dependencies {
exclude group:"org.codehaus.gant", module:"gant_groovy1.8"
}

compile "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
compile 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
compile "io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE"
compile 'com.netflix.nebula:gradle-extra-configurations-plugin:2.2.0'
api "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
api 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
api "io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE"
api 'com.netflix.nebula:gradle-extra-configurations-plugin:2.2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class IntegrationTestGradlePlugin implements Plugin<Project> {
DependencyHandler dependencies = project.dependencies
dependencies.add("integrationTestCompile", SourceSets.findMainSourceSet(project).output)
dependencies.add("integrationTestCompile", SourceSets.findSourceSet(project, SourceSet.TEST_SOURCE_SET_NAME).output)
dependencies.add("integrationTestCompile", project.configurations.findByName("testCompile"))
dependencies.add("integrationTestRuntime", project.configurations.findByName("testRuntime"))
dependencies.add("integrationTestCompile", project.configurations.findByName("testCompileClasspath"))
dependencies.add("integrationTestRuntime", project.configurations.findByName("testRuntimeClasspath"))

TaskContainer tasks = project.tasks
Test integrationTestTask = tasks.create('integrationTest', Test)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class GroovyPagePlugin implements Plugin<Project> {
File destDir = output?.dir("gsp-classes") ?: new File(project.buildDir, "gsp-classes/main")

Configuration providedConfig = project.configurations.findByName('provided')
def allClasspath = project.configurations.compile + project.configurations.gspCompile + classesDirs
def allClasspath = project.configurations.compileClasspath + project.configurations.gspCompile + classesDirs
if(providedConfig) {
allClasspath += providedConfig
}
Expand Down
4 changes: 2 additions & 2 deletions grails-logging/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies {
compile project(":grails-core")
}
api project(":grails-core")
}
4 changes: 2 additions & 2 deletions grails-plugin-codecs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ dependencies {
compileOnly "io.micronaut.spring:micronaut-spring-annotation:$micronautSpringVersion"
compileOnly "io.micronaut:micronaut-inject-groovy:$micronautVersion"

compile project(":grails-web"), project(":grails-encoder")
runtime project(":grails-codecs")
api project(":grails-web"), project(":grails-encoder")
runtimeOnly project(":grails-codecs")
}
10 changes: 5 additions & 5 deletions grails-plugin-controllers/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
dependencies {
compile project(":grails-core"),
api project(":grails-core"),
project(":grails-web"),
project(':grails-plugin-mimetypes'),
project(':grails-plugin-validation'),
project(':grails-plugin-domain-class')

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

testRuntime "jline:jline:$jlineVersion"
testRuntime "org.fusesource.jansi:jansi:$jansiVersion"
testRuntimeOnly "jline:jline:$jlineVersion"
testRuntimeOnly "org.fusesource.jansi:jansi:$jansiVersion"
}
Loading

0 comments on commit fcc504b

Please sign in to comment.