From 7afa9b18ab80670e2cde6adcc53b8f09ca6f0855 Mon Sep 17 00:00:00 2001 From: FKHals <30548867+FKHals@users.noreply.github.com> Date: Wed, 24 Feb 2021 09:15:55 +0100 Subject: [PATCH] [BUILD] Prevent the core from exporting commons-io and instead let every project get it by itself, since it is not part of the cores public api and it further reduces the coupling between the core and these projects. We decided that this should be a separate commit from the previous ones (that also change the build-system) since it changes different files and could not be integrated coherently. Co-authored-by: Eik0fresh <39055879+Eik0fresh@users.noreply.github.com> Co-authored-by: paun42 <75132590+paun42@users.noreply.github.com> Co-authored-by: panphil <74254708+panphil@users.noreply.github.com> --- build.gradle.kts | 1 + core/META-INF/MANIFEST.MF | 6 ------ core/build.gradle.kts | 3 ++- eclipse/build.gradle.kts | 3 +++ intellij/build.gradle.kts | 3 +++ server/build.gradle.kts | 3 +++ 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 57d883c1e5..c66522ac92 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -144,6 +144,7 @@ subprojects { val log4j2Bridge = "org.apache.logging.log4j:log4j-1.2-api:$log4j2VersionNr" projectToConf.extra["commons-lang3"] = "org.apache.commons:commons-lang3:3.8.1" + projectToConf.extra["commons-io2"] = "commons-io:commons-io:2.0.1" projectToConf.extra["junitVersion"] = junitVersion projectToConf.extra["log4j2ApiVersion"] = log4j2Api diff --git a/core/META-INF/MANIFEST.MF b/core/META-INF/MANIFEST.MF index 3ccc7f8814..fb79027478 100644 --- a/core/META-INF/MANIFEST.MF +++ b/core/META-INF/MANIFEST.MF @@ -59,12 +59,6 @@ Export-Package: saros, saros.ui.util, saros.util, saros.versioning, - org.apache.commons.io, - org.apache.commons.io.comparator, - org.apache.commons.io.filefilter, - org.apache.commons.io.input, - org.apache.commons.io.monitor, - org.apache.commons.io.output, org.apache.commons.lang3, org.apache.commons.lang3.exception, org.apache.commons.lang3.time, diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 713cfba289..056662ec6b 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -5,6 +5,7 @@ plugins { val versionQualifier = ext.get("versionQualifier") as String val commonsLang = ext.get("commons-lang3") as String +val commonsIo = ext.get("commons-io2") as String val log4j2ApiVersion = ext.get("log4j2ApiVersion") as String val log4j2CoreVersion = ext.get("log4j2CoreVersion") as String @@ -40,7 +41,7 @@ sarosEclipse { dependencies { bundle("commons-codec:commons-codec:1.3") - bundleApi("commons-io:commons-io:2.0.1") + bundle(commonsIo) bundleApi(commonsLang) bundle("javax.jmdns:jmdns:3.4.1") diff --git a/eclipse/build.gradle.kts b/eclipse/build.gradle.kts index 2ddf6d5b04..1ab4822f00 100644 --- a/eclipse/build.gradle.kts +++ b/eclipse/build.gradle.kts @@ -10,6 +10,8 @@ import com.diffplug.gradle.pde.EclipseRelease val versionQualifier = ext.get("versionQualifier") as String val eclipseVersionNr = ext.get("eclipseVersion") as String +val commonsIo = ext.get("commons-io2") as String + configurations { val testConfig by getting {} getByName("testImplementation") { @@ -40,6 +42,7 @@ sourceSets { dependencies { implementation(project(":saros.core")) + implementation(commonsIo) // This is a workaround for https://github.com/saros-project/saros/issues/1086 implementation("org.eclipse.platform:org.eclipse.urischeme:1.1.0") // This is a workaround for https://github.com/saros-project/saros/issues/1114 diff --git a/intellij/build.gradle.kts b/intellij/build.gradle.kts index dba4be097b..516e33ad41 100644 --- a/intellij/build.gradle.kts +++ b/intellij/build.gradle.kts @@ -6,6 +6,8 @@ val versionQualifier: String? = ext.get("versionQualifier") as String? val intellijHome: String? = ext.get("intellijHome") as String? val intellijSandboxDir: String? = ext.get("intellijSandboxDir") as String? +val commonsIo = ext.get("commons-io2") as String + configurations { val testConfig by getting {} val testCompile by getting { @@ -15,6 +17,7 @@ configurations { dependencies { compile(project(path = ":saros.core", configuration = "plain")) + implementation(commonsIo) compile("org.easytesting:fest-assert:1.2") compile("org.easytesting:fest-reflect:1.2") diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 34033242a7..8ddc716cc7 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -1,5 +1,7 @@ val versionQualifier = ext.get("versionQualifier") +val commonsIo = ext.get("commons-io2") as String + configurations { val testConfig by getting {} val testCompile by getting { @@ -10,6 +12,7 @@ configurations { dependencies { compile(project(":saros.core")) compile("org.apache.commons:commons-collections4:4.2") + implementation(commonsIo) } sourceSets {