2017-08-21 20:41:46 +08:00
|
|
|
description = "Spring Beans"
|
|
|
|
|
|
|
|
apply plugin: "groovy"
|
2019-08-21 02:26:43 +08:00
|
|
|
apply plugin: "kotlin"
|
2017-08-21 20:41:46 +08:00
|
|
|
|
|
|
|
dependencies {
|
2018-08-16 21:32:44 +08:00
|
|
|
compile(project(":spring-core"))
|
2019-08-27 03:13:12 +08:00
|
|
|
optional("javax.inject:javax.inject")
|
2019-09-26 05:49:15 +08:00
|
|
|
optional("org.yaml:snakeyaml")
|
2019-08-27 03:13:12 +08:00
|
|
|
optional("org.codehaus.groovy:groovy-xml")
|
2019-07-19 16:20:35 +08:00
|
|
|
optional("org.jetbrains.kotlin:kotlin-reflect")
|
|
|
|
optional("org.jetbrains.kotlin:kotlin-stdlib")
|
2019-12-28 18:44:40 +08:00
|
|
|
testCompile(testFixtures(project(":spring-core")))
|
2019-12-13 00:21:41 +08:00
|
|
|
testCompile("javax.annotation:javax.annotation-api")
|
2019-12-29 00:13:39 +08:00
|
|
|
testFixturesApi("org.junit.jupiter:junit-jupiter-api")
|
|
|
|
testFixturesImplementation("org.assertj:assertj-core")
|
2017-08-21 20:41:46 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 18:08:26 +08:00
|
|
|
// This module does joint compilation for Java and Groovy code with the compileGroovy task.
|
2017-08-21 20:41:46 +08:00
|
|
|
sourceSets {
|
|
|
|
main.groovy.srcDirs += "src/main/java"
|
|
|
|
main.java.srcDirs = []
|
|
|
|
}
|
|
|
|
|
|
|
|
compileGroovy {
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
}
|
|
|
|
|
2018-08-16 18:08:26 +08:00
|
|
|
// This module also builds Kotlin code and the compileKotlin task naturally depends on
|
|
|
|
// compileJava. We need to redefine dependencies to break task cycles.
|
2018-03-30 10:41:01 +08:00
|
|
|
def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues
|
2018-08-16 21:32:44 +08:00
|
|
|
compileGroovy.dependsOn = deps - "compileJava"
|
2017-08-21 20:41:46 +08:00
|
|
|
compileKotlin.dependsOn(compileGroovy)
|
|
|
|
compileKotlin.classpath += files(compileGroovy.destinationDir)
|