Skip to content

Commit

Permalink
[BUILD] Prevent the core from exporting commons-io
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
4 people committed Feb 24, 2021
1 parent d8dba44 commit 7afa9b1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions eclipse/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions intellij/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -10,6 +12,7 @@ configurations {
dependencies {
compile(project(":saros.core"))
compile("org.apache.commons:commons-collections4:4.2")
implementation(commonsIo)
}

sourceSets {
Expand Down

0 comments on commit 7afa9b1

Please sign in to comment.