From 3a9d83d2f13276649219fcf63114507f88670f36 Mon Sep 17 00:00:00 2001 From: Graeme Rocher Date: Wed, 11 Dec 2019 15:04:29 +0100 Subject: [PATCH] Cleanup dependencies --- bom/build.gradle | 1 + discovery-client/build.gradle | 6 +++--- function/build.gradle | 5 +++-- http-client/build.gradle | 18 ++++++++++-------- http-netty/build.gradle | 12 +++++++----- http-server-netty/build.gradle | 7 +++++-- http/build.gradle | 4 ++-- inject/build.gradle | 2 +- jdbc/build.gradle | 7 ++++--- management/build.gradle | 5 +++-- messaging/build.gradle | 1 - router/build.gradle | 5 +++-- runtime-osx/build.gradle | 4 ++-- runtime/build.gradle | 21 ++++++++++----------- session/build.gradle | 9 ++++----- spring/build.gradle | 9 +++++---- tracing/build.gradle | 4 ++-- validation/build.gradle | 6 ++++-- websocket/build.gradle | 3 +-- 19 files changed, 70 insertions(+), 59 deletions(-) diff --git a/bom/build.gradle b/bom/build.gradle index 6754cdfa39a..70484c8b976 100644 --- a/bom/build.gradle +++ b/bom/build.gradle @@ -11,6 +11,7 @@ profiles.load(new StringReader(new File("$projectDir/profiles.properties").text) boolean micronautSnapshot = rootProject.version.toString().endsWith("-SNAPSHOT") def excludedProjects = [ + "benchmarks", "test-suite", "test-suite-groovy", "test-suite-helper", diff --git a/discovery-client/build.gradle b/discovery-client/build.gradle index 5e25331105c..5d11bbd8c60 100644 --- a/discovery-client/build.gradle +++ b/discovery-client/build.gradle @@ -1,11 +1,11 @@ dependencies { annotationProcessor project(":inject-java") - compileOnly project(":graal") - compileOnly project(":management") api project(":http-client") api project(":validation") - + + compileOnly project(":graal") + compileOnly project(":management") compileOnly dependencyVersion("micronaut.aws"), { exclude module:'micronaut-http-client' exclude module:'micronaut-inject' diff --git a/function/build.gradle b/function/build.gradle index da13f45ba0f..25a6d245421 100644 --- a/function/build.gradle +++ b/function/build.gradle @@ -1,6 +1,7 @@ dependencies { - api project(":runtime") - annotationProcessor project(":inject-java") + annotationProcessor project(":inject-java") + + api project(":runtime") api project(":http") testAnnotationProcessor project(":inject-java") diff --git a/http-client/build.gradle b/http-client/build.gradle index 4eb50857e9a..0a31654d0d0 100644 --- a/http-client/build.gradle +++ b/http-client/build.gradle @@ -1,18 +1,20 @@ dependencies { annotationProcessor project(":inject-java") - api dependencyVersion("rxjava2") - api project(":http-netty") + api dependencyVersion("rxjava2") api project(":runtime") - api dependencyModuleVersion("netty", "netty-handler-proxy") - - compileOnly dependencyVersion("reactor") api project(":websocket") - testImplementation project(":inject-groovy") - testImplementation project(":validation") + implementation project(":http-netty") + implementation dependencyModuleVersion("netty", "netty-handler-proxy") + + compileOnly dependencyVersion("reactor") + testAnnotationProcessor project(":validation") - testImplementation project(":inject-java") testAnnotationProcessor project(":inject-java") + + testImplementation project(":inject-groovy") + testImplementation project(":validation") + testImplementation project(":inject-java") testImplementation dependencyVersion("rxjava2") testImplementation dependencyVersion("reactor") testImplementation project(":http-server-netty") diff --git a/http-netty/build.gradle b/http-netty/build.gradle index 357afd752e6..a703cdeb420 100644 --- a/http-netty/build.gradle +++ b/http-netty/build.gradle @@ -1,11 +1,13 @@ dependencies { + annotationProcessor project(":inject-java") compileOnly "com.oracle.substratevm:svm:$graalVersion" compileOnly project(":graal") - api project(":buffer-netty") + api project(":http") api project(":websocket") - annotationProcessor project(":inject-java") - api dependencyVersion("netty") - api dependencyVersion("rxjava2") - api dependencyModuleVersion("netty", "netty-handler") + api project(":buffer-netty") + + implementation dependencyVersion("netty") + implementation dependencyVersion("rxjava2") + implementation dependencyModuleVersion("netty", "netty-handler") } \ No newline at end of file diff --git a/http-server-netty/build.gradle b/http-server-netty/build.gradle index 18be4276b79..ec87c2d2665 100644 --- a/http-server-netty/build.gradle +++ b/http-server-netty/build.gradle @@ -1,8 +1,11 @@ dependencies { + annotationProcessor project(":inject-java") + api project(":http-server") - api project(":http-netty") + api project(":core") + implementation project(":http-netty") + implementation dependencyVersion("netty") - annotationProcessor project(":inject-java") compileOnly dependencyModuleVersion("netty", "netty-transport-native-epoll") compileOnly dependencyModuleVersion("netty", "netty-transport-native-kqueue") diff --git a/http/build.gradle b/http/build.gradle index 537320671d9..1c1e0377a44 100644 --- a/http/build.gradle +++ b/http/build.gradle @@ -1,6 +1,6 @@ dependencies { - api project(":inject") - annotationProcessor project(":inject-java") + annotationProcessor project(":inject-java") + api project(":inject") compileOnly project(":graal") testImplementation project(":inject-groovy") diff --git a/inject/build.gradle b/inject/build.gradle index 70aeaf8c66a..433bbf59114 100644 --- a/inject/build.gradle +++ b/inject/build.gradle @@ -5,7 +5,7 @@ dependencies { api dependencyVersion("javax.annotation-api") api group: 'javax.inject', name: 'javax.inject', version: '1' api project(':core') - api dependencyVersion("snakeyaml") + implementation dependencyVersion("snakeyaml") compileOnly "javax.persistence:javax.persistence-api:2.2" compileOnly dependencyVersion("groovy") diff --git a/jdbc/build.gradle b/jdbc/build.gradle index c8b7ab70bb4..d475bbf698c 100644 --- a/jdbc/build.gradle +++ b/jdbc/build.gradle @@ -1,8 +1,9 @@ dependencies { - annotationProcessor project(":inject-java") + annotationProcessor project(":inject-java") + + api project(":inject") + compileOnly project(":spring") compileOnly dependencyModuleVersion("spring", "spring-jdbc") compileOnly dependencyModuleVersion("spring", "spring-tx") - - api project(":inject") } \ No newline at end of file diff --git a/management/build.gradle b/management/build.gradle index 15525d380e4..6d39a862cf4 100644 --- a/management/build.gradle +++ b/management/build.gradle @@ -1,8 +1,9 @@ dependencies { - api project(":router") - api project(":runtime") annotationProcessor project(":inject-java") annotationProcessor project(":graal") + + api project(":router") + api project(":runtime") testImplementation project(":http-client") testImplementation project(":inject-groovy") diff --git a/messaging/build.gradle b/messaging/build.gradle index d92a9cc9d1b..7253bad14e8 100644 --- a/messaging/build.gradle +++ b/messaging/build.gradle @@ -1,5 +1,4 @@ dependencies { - compileOnly project(":inject-java") annotationProcessor project(":inject-java") api project(":inject") api project(":runtime") diff --git a/router/build.gradle b/router/build.gradle index fbb52769164..285b30777dd 100644 --- a/router/build.gradle +++ b/router/build.gradle @@ -1,8 +1,9 @@ dependencies { - compileOnly dependencyVersion("groovy") + annotationProcessor project(":inject-java") + api project(":inject") api project(":http") - annotationProcessor project(":inject-java") + compileOnly dependencyVersion("groovy") testImplementation project(":inject-groovy") testImplementation project(":inject-java") diff --git a/runtime-osx/build.gradle b/runtime-osx/build.gradle index e43fcdb1821..a126180bee0 100644 --- a/runtime-osx/build.gradle +++ b/runtime-osx/build.gradle @@ -2,6 +2,6 @@ dependencies { annotationProcessor project(":inject-java") api project(":runtime") - api dependencyVersion("methvin.directory-watcher") - api dependencyVersion("jna") + implementation dependencyVersion("methvin.directory-watcher") + implementation dependencyVersion("jna") } \ No newline at end of file diff --git a/runtime/build.gradle b/runtime/build.gradle index b878851b509..abe0bb6726a 100644 --- a/runtime/build.gradle +++ b/runtime/build.gradle @@ -2,19 +2,19 @@ ext { shadowJarEnabled = true } dependencies { - for(proj in ['http']) { - api project(":$proj") - } + annotationProcessor project(":inject-java") + api project(":http") api project(':inject') api project(':aop') - compileOnly "com.oracle.substratevm:svm:$graalVersion" - compileOnly project(":graal") - compileOnly dependencyVersion("jcache") api dependencyVersion("validation") api dependencyVersion("jackson.databind") api dependencyVersion("rxjava2") - compile([ + compileOnly "com.oracle.substratevm:svm:$graalVersion" + compileOnly project(":graal") + compileOnly dependencyVersion("jcache") + + implementation([ dependencyVersion('jackson.datatype'), dependencyModuleVersion('jackson.datatype', 'jackson-datatype-jsr310') ]) @@ -38,15 +38,14 @@ dependencies { compileOnly 'org.glassfish:javax.el:3.0.1-b09' compileOnly dependencyVersion("reactor") compileOnly dependencyVersion("rxjava1.interop") - compileOnly "com.github.ben-manes.caffeine:caffeine:$caffeineVersion" - annotationProcessor project(":inject-java") + compileOnly "com.github.ben-manes.caffeine:caffeine:$caffeineVersion" + testAnnotationProcessor project(":inject-java") testImplementation 'org.jsr107.ri:cache-ri-impl:1.1.0' testImplementation dependencyVersion("jcache") testImplementation dependencyVersion("rxjava1.interop") testImplementation dependencyVersion("reactor") - testImplementation project(":inject-java") - testAnnotationProcessor project(":inject-java") + testImplementation project(":inject-java") testImplementation project(":inject-java-test") testImplementation project(":inject-groovy") testImplementation dependencyModuleVersion("gorm", "grails-datastore-gorm") diff --git a/session/build.gradle b/session/build.gradle index 279db9e50f5..5fa49ba538e 100644 --- a/session/build.gradle +++ b/session/build.gradle @@ -2,19 +2,18 @@ ext { shadowJarEnabled = true } dependencies { + annotationProcessor project(":inject-java") api project(":runtime") api project(":http") - - annotationProcessor project(":inject-java") + compileOnly project(":http-server") + + testAnnotationProcessor project(":inject-java") testImplementation project(":inject-groovy") testImplementation project(":inject-java") testImplementation project(":http-server-netty") testImplementation project(":http-client") - - testAnnotationProcessor project(":inject-groovy") - testAnnotationProcessor project(":inject-java") } diff --git a/spring/build.gradle b/spring/build.gradle index 693a2476197..de38e564482 100644 --- a/spring/build.gradle +++ b/spring/build.gradle @@ -1,16 +1,17 @@ dependencies { + annotationProcessor project(":inject-java") api dependencyVersion("spring") api dependencyModuleVersion("spring", "spring-tx") api dependencyModuleVersion("spring", "spring-context") api project(":inject") - annotationProcessor project(":inject-java") - compileOnly dependencyModuleVersion("spring", "spring-jdbc") api project(':aop') + compileOnly dependencyModuleVersion("spring", "spring-jdbc") + + testAnnotationProcessor project(':inject-java') testImplementation project(':runtime') testImplementation project(':inject-groovy') - testImplementation project(':inject-java') - testAnnotationProcessor project(':inject-java') + testImplementation project(':inject-java') testImplementation dependencyVersion('spock') testImplementation dependencyModuleVersion('spock', 'spock-spring') testImplementation dependencyModuleVersion('spring', 'spring-test') diff --git a/tracing/build.gradle b/tracing/build.gradle index 3a53ea821c5..8a90072c65c 100644 --- a/tracing/build.gradle +++ b/tracing/build.gradle @@ -1,5 +1,5 @@ dependencies { - + annotationProcessor project(":inject-java") api dependencyVersion("opentracing") api dependencyModuleVersion('opentracing', 'opentracing-util') api project(":runtime") @@ -8,7 +8,7 @@ dependencies { // the following are Tracing implementations and instrumentations which // are optionally loaded and not required - annotationProcessor project(":inject-java") + compileOnly dependencyModuleVersion('micronaut.netflix', 'micronaut-netflix-hystrix'), { exclude group:"io.micronaut", module:'micronaut-runtime' exclude group:"io.micronaut.configuration", module:'micronaut-netflix-archaius' diff --git a/validation/build.gradle b/validation/build.gradle index 2faa01c142a..833c4167515 100644 --- a/validation/build.gradle +++ b/validation/build.gradle @@ -1,11 +1,14 @@ dependencies { annotationProcessor project(":inject-java") - compileOnly project(":http-server") + api project(":inject") api project(":http") api dependencyVersion("validation") + compileOnly dependencyVersion("gorm") + compileOnly project(":http-server") + testAnnotationProcessor project(":inject-java") testImplementation project(":http-server-netty") testImplementation project(":websocket") testImplementation project(":http-client") @@ -13,6 +16,5 @@ dependencies { testImplementation dependencyModuleVersion("groovy", "groovy-json") testImplementation project(":inject-java-test") - testAnnotationProcessor project(":inject-java") } //compileTestGroovy.groovyOptions.forkOptions.jvmArgs = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'] \ No newline at end of file diff --git a/websocket/build.gradle b/websocket/build.gradle index 71b7cb5c6a0..7d0d1d1b28c 100644 --- a/websocket/build.gradle +++ b/websocket/build.gradle @@ -1,10 +1,9 @@ dependencies { + annotationProcessor project(":inject-java") api project(":http") api project(":inject") api project(':aop') - api dependencyVersion("rxjava2") - annotationProcessor project(":inject-java") testImplementation project(":inject-groovy") } \ No newline at end of file