Skip to content

Commit 736bf1c

Browse files
committed
Fix Kotlin dependencies
Avoid importing Kotlin 1.0.x from Mockito Kotlin and only depends on kotlin-stdlib instead of kotlin-stdlib-jre8 since we don't use additional jre7 or jre8 API.
1 parent 8579ae6 commit 736bf1c

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

build.gradle

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,11 @@ configure(allprojects) { project ->
184184
testCompile("org.mockito:mockito-core:2.6.1") {
185185
exclude group:'org.hamcrest', module:'hamcrest-core'
186186
}
187-
testCompile("com.nhaarman:mockito-kotlin:1.5.0")
187+
testCompile("com.nhaarman:mockito-kotlin:1.5.0") {
188+
exclude module:'kotlin-stdlib'
189+
exclude module:'kotlin-reflect'
190+
exclude module:'mockito-core'
191+
}
188192
testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}")
189193
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
190194
}
@@ -378,7 +382,7 @@ project("spring-core") {
378382
optional("net.sf.jopt-simple:jopt-simple:5.0.3")
379383
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
380384
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
381-
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
385+
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
382386
optional("org.reactivestreams:reactive-streams")
383387
optional("io.projectreactor:reactor-core")
384388
optional("io.reactivex:rxjava:${rxjavaVersion}")
@@ -416,7 +420,7 @@ project("spring-beans") {
416420
compile(files(project(":spring-core").cglibRepackJar))
417421
optional("javax.inject:javax.inject:1")
418422
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
419-
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
423+
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
420424
optional("org.yaml:snakeyaml:${snakeyamlVersion}")
421425
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
422426
}
@@ -511,7 +515,7 @@ project("spring-context") {
511515
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
512516
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
513517
optional("org.beanshell:bsh:2.0b5")
514-
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
518+
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
515519
testCompile("org.apache.commons:commons-pool2:2.4.2")
516520
testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
517521
testCompile("javax.inject:javax.inject-tck:1")
@@ -589,7 +593,7 @@ project("spring-messaging") {
589593
testCompile("io.netty:netty-all")
590594
testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
591595
testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
592-
testCompile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
596+
testCompile("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
593597
testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
594598
testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
595599
}
@@ -646,7 +650,7 @@ project("spring-jdbc") {
646650
optional("org.apache.derby:derby:10.13.1.1")
647651
optional("org.apache.derby:derbyclient:10.13.1.1")
648652
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
649-
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
653+
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
650654
}
651655
}
652656

@@ -748,7 +752,7 @@ project("spring-web") {
748752
optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
749753
optional("javax.xml.ws:jaxws-api:${jaxwsVersion}")
750754
optional("javax.mail:javax.mail-api:${javamailVersion}")
751-
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
755+
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
752756
testCompile("io.projectreactor.addons:reactor-test")
753757
testCompile("org.apache.taglibs:taglibs-standard-jstlel:1.2.1") {
754758
exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
@@ -806,7 +810,7 @@ project("spring-webflux") {
806810
exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec"
807811
}
808812
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
809-
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
813+
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
810814
testCompile("io.projectreactor.addons:reactor-test")
811815
testCompile("javax.validation:validation-api:${beanvalVersion}")
812816
testCompile("org.hibernate:hibernate-validator:${hibvalVersion}")

0 commit comments

Comments
 (0)