From e45a3f4738af820ac60b7fb944c5dbd98cff613c Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 21 Aug 2019 14:28:42 +0200 Subject: [PATCH] Rename non-Framework project modules Prior to this commit, the Spring Framework build would mix proper framework modules (spring-* modules published to maven central) and internal modules such as: * "spring-framework-bom" (which publishes the Framework BOM with all modules) * "spring-core-coroutines" which is an internal modules for Kotlin compilation only This commit renames these modules so that they don't start with "spring-*"; we're also moving the "kotlin-coroutines" module under "spring-core", since it's merged in the resulting JAR. See gh-23282 --- .gitignore | 2 ++ build.gradle | 4 +--- .../framework-bom.gradle | 0 .../spring-framework-bom.txt | 0 settings.gradle | 5 +++-- .../kotlin-coroutines/kotlin-coroutines.gradle | 2 +- .../main/kotlin/org/springframework/core/CoroutinesUtils.kt | 0 spring-core/spring-core.gradle | 6 +++--- spring-messaging/spring-messaging.gradle | 4 ++-- spring-webflux/spring-webflux.gradle | 4 ++-- 10 files changed, 14 insertions(+), 13 deletions(-) rename spring-framework-bom/spring-framework-bom.gradle => framework-bom/framework-bom.gradle (100%) rename {spring-framework-bom => framework-bom}/spring-framework-bom.txt (100%) rename spring-core-coroutines/spring-core-coroutines.gradle => spring-core/kotlin-coroutines/kotlin-coroutines.gradle (94%) rename {spring-core-coroutines => spring-core/kotlin-coroutines}/src/main/kotlin/org/springframework/core/CoroutinesUtils.kt (100%) diff --git a/.gitignore b/.gitignore index a098e24827..3f904904f7 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ classes/ /build buildSrc/build /spring-*/build +/spring-core/kotlin-coroutines/build +/framework-bom/build /integration-tests/build /src/asciidoc/build target/ diff --git a/build.gradle b/build.gradle index d3b94613e0..e2cd92acf4 100644 --- a/build.gradle +++ b/build.gradle @@ -17,9 +17,7 @@ plugins { } ext { - moduleProjects = subprojects.findAll { - (it.name != "spring-framework-bom") && (it.name != "spring-core-coroutines") && (it.name != "integration-tests") - } + moduleProjects = subprojects.findAll { it.name.startsWith("spring-") } aspectjVersion = "1.9.4" coroutinesVersion = "1.3.0-RC2" diff --git a/spring-framework-bom/spring-framework-bom.gradle b/framework-bom/framework-bom.gradle similarity index 100% rename from spring-framework-bom/spring-framework-bom.gradle rename to framework-bom/framework-bom.gradle diff --git a/spring-framework-bom/spring-framework-bom.txt b/framework-bom/spring-framework-bom.txt similarity index 100% rename from spring-framework-bom/spring-framework-bom.txt rename to framework-bom/spring-framework-bom.txt diff --git a/settings.gradle b/settings.gradle index e95a79b313..abae79ca67 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,7 +5,8 @@ include "spring-context" include "spring-context-support" include "spring-context-indexer" include "spring-core" -include "spring-core-coroutines" +include "kotlin-coroutines" +project(':kotlin-coroutines').projectDir = file('spring-core/kotlin-coroutines') include "spring-expression" include "spring-instrument" include "spring-jcl" @@ -20,7 +21,7 @@ include "spring-web" include "spring-webmvc" include "spring-webflux" include "spring-websocket" -include "spring-framework-bom" +include "framework-bom" include "integration-tests" rootProject.name = "spring" diff --git a/spring-core-coroutines/spring-core-coroutines.gradle b/spring-core/kotlin-coroutines/kotlin-coroutines.gradle similarity index 94% rename from spring-core-coroutines/spring-core-coroutines.gradle rename to spring-core/kotlin-coroutines/kotlin-coroutines.gradle index 5fa2184862..16b11d554f 100644 --- a/spring-core-coroutines/spring-core-coroutines.gradle +++ b/spring-core/kotlin-coroutines/kotlin-coroutines.gradle @@ -11,7 +11,7 @@ dependencies { } // Avoid publishing coroutines JAR to the artifact repository -if (project.hasProperty("artifactoryPublish")) { +if (pluginManager.hasPlugin("artifactoryPublish")) { artifactoryPublish.skip = true } diff --git a/spring-core-coroutines/src/main/kotlin/org/springframework/core/CoroutinesUtils.kt b/spring-core/kotlin-coroutines/src/main/kotlin/org/springframework/core/CoroutinesUtils.kt similarity index 100% rename from spring-core-coroutines/src/main/kotlin/org/springframework/core/CoroutinesUtils.kt rename to spring-core/kotlin-coroutines/src/main/kotlin/org/springframework/core/CoroutinesUtils.kt diff --git a/spring-core/spring-core.gradle b/spring-core/spring-core.gradle index 7014bae4d4..cd303ae2b1 100644 --- a/spring-core/spring-core.gradle +++ b/spring-core/spring-core.gradle @@ -70,12 +70,12 @@ dependencies { cglib("cglib:cglib:${cglibVersion}@jar") objenesis("org.objenesis:objenesis:${objenesisVersion}@jar") jarjar("org.pantsbuild:jarjar:1.7.2") - coroutines(project(":spring-core-coroutines")) + coroutines(project(":kotlin-coroutines")) compile(files(cglibRepackJar)) compile(files(objenesisRepackJar)) compile(project(":spring-jcl")) - compileOnly(project(":spring-core-coroutines")) + compileOnly(project(":kotlin-coroutines")) optional("net.sf.jopt-simple:jopt-simple:5.0.4") optional("org.aspectj:aspectjweaver:${aspectjVersion}") optional("org.jetbrains.kotlin:kotlin-reflect") @@ -94,7 +94,7 @@ dependencies { testCompile("com.fasterxml.woodstox:woodstox-core:5.2.0") { exclude group: "stax", module: "stax-api" } - testCompile(project(":spring-core-coroutines")) + testCompile(project(":kotlin-coroutines")) } jar { diff --git a/spring-messaging/spring-messaging.gradle b/spring-messaging/spring-messaging.gradle index c244b398ff..b86ea05351 100644 --- a/spring-messaging/spring-messaging.gradle +++ b/spring-messaging/spring-messaging.gradle @@ -12,7 +12,7 @@ dependencyManagement { dependencies { compile(project(":spring-beans")) compile(project(":spring-core")) - compileOnly(project(":spring-core-coroutines")) + compileOnly(project(":kotlin-coroutines")) optional(project(":spring-context")) optional(project(":spring-oxm")) optional("io.projectreactor.netty:reactor-netty") @@ -37,7 +37,7 @@ dependencies { testCompile("org.jetbrains.kotlin:kotlin-stdlib") testCompile("org.xmlunit:xmlunit-assertj:2.6.2") testCompile("org.xmlunit:xmlunit-matchers:2.6.2") - testCompile(project(":spring-core-coroutines")) + testCompile(project(":kotlin-coroutines")) testRuntime("com.sun.xml.bind:jaxb-core:2.3.0.1") testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0.1") testRuntime("com.sun.activation:javax.activation:1.2.0") diff --git a/spring-webflux/spring-webflux.gradle b/spring-webflux/spring-webflux.gradle index 9fe8f05803..5168cb5c43 100644 --- a/spring-webflux/spring-webflux.gradle +++ b/spring-webflux/spring-webflux.gradle @@ -15,7 +15,7 @@ dependencies { compile(project(":spring-core")) compile(project(":spring-web")) compile("io.projectreactor:reactor-core") - compileOnly(project(":spring-core-coroutines")) + compileOnly(project(":kotlin-coroutines")) optional(project(":spring-context")) optional(project(":spring-context-support")) // for FreeMarker support optional("javax.servlet:javax.servlet-api:4.0.1") @@ -57,7 +57,7 @@ dependencies { testCompile("org.eclipse.jetty:jetty-servlet") testCompile("org.eclipse.jetty:jetty-reactive-httpclient:1.0.3") testCompile("com.squareup.okhttp3:mockwebserver:3.14.2") - testCompile(project(":spring-core-coroutines")) + testCompile(project(":kotlin-coroutines")) testCompile("org.jetbrains.kotlin:kotlin-script-runtime") testRuntime("org.jetbrains.kotlin:kotlin-scripting-jsr223-embeddable") testRuntime("org.jruby:jruby:9.2.7.0")