Skip to content

Commit

Permalink
[Misc] Update gradle build and use concept of api/implementation depe…
Browse files Browse the repository at this point in the history
…ndencies (which is missing in Maven)
  • Loading branch information
vmassol committed May 19, 2018
1 parent 7213733 commit af21259
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 26 deletions.
15 changes: 10 additions & 5 deletions build.gradle
Expand Up @@ -21,17 +21,19 @@
// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

ext {
junitVersion = '4.12'
junit4Version = '4.12'
junit5Version = '5.2.0'
slf4jVersion = '1.7.25'
commonsLang3Version = '3.5'
mockitoVersion= '2.6.3'
commonsLang3Version = '3.7'
mockitoVersion= '2.18.3'
}

allprojects {
group = 'org.xwiki.commons'
version = '9.3-SNAPSHOT'
version = '10.5-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven'

sourceCompatibility = 1.8
Expand All @@ -42,6 +44,9 @@ allprojects {
}

dependencies {
testCompile "junit:junit:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junit5Version}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit5Version}"
testCompileOnly "junit:junit:${junit4Version}"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit5Version}"
}
}
Expand Up @@ -21,7 +21,7 @@
// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile project(':xwiki-component-api')
compile 'com.googlecode.java-diff-utils:diffutils:1.3.0'
testCompile project(':xwiki-test-component')
api project(':xwiki-component-api')
implementation 'com.googlecode.java-diff-utils:diffutils:1.3.0'
testImplementation project(':xwiki-test-component')
}
Expand Up @@ -21,7 +21,8 @@
// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile project(':xwiki-stability')
compile project(':xwiki-text')
compile 'javax.inject:javax.inject:1'
api project(':xwiki-stability')
api 'javax.inject:javax.inject:1'
implementation project(':xwiki-text')
implementation "org.apache.commons:commons-lang3:${commonsLang3Version}"
}
Expand Up @@ -21,9 +21,10 @@
// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile project(':xwiki-component-api')
compile project(':xwiki-component-observation')
compile "org.slf4j:slf4j-api:${slf4jVersion}"
testCompile project(':xwiki-test-simple')
testCompile 'com.google.inject:guice:3.0'
api project(':xwiki-component-api')
implementation project(':xwiki-component-observation')
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
implementation "org.apache.commons:commons-lang3:${commonsLang3Version}"
testImplementation project(':xwiki-test-simple')
testImplementation 'com.google.inject:guice:3.0'
}
Expand Up @@ -21,7 +21,7 @@
// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile project(':xwiki-component-api')
compile project(':xwiki-observation-api')
compile "org.apache.commons:commons-lang3:${commonsLang3Version}"
api project(':xwiki-component-api')
api project(':xwiki-observation-api')
implementation "org.apache.commons:commons-lang3:${commonsLang3Version}"
}
6 changes: 3 additions & 3 deletions xwiki-commons-core/xwiki-commons-context/build.gradle
Expand Up @@ -21,7 +21,7 @@
// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile project(':xwiki-component-api')
compile "org.slf4j:slf4j-api:${slf4jVersion}"
testCompile project(':xwiki-test-simple')
api project(':xwiki-component-api')
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
testImplementation project(':xwiki-test-simple')
}
Expand Up @@ -21,6 +21,7 @@
// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile project(':xwiki-component-api')
testCompile project(':xwiki-test-simple')
api project(':xwiki-component-api')
implementation "org.apache.commons:commons-lang3:${commonsLang3Version}"
testImplementation project(':xwiki-test-simple')
}
2 changes: 1 addition & 1 deletion xwiki-commons-core/xwiki-commons-text/build.gradle
Expand Up @@ -21,5 +21,5 @@
// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile "org.apache.commons:commons-lang3:${commonsLang3Version}"
implementation "org.apache.commons:commons-lang3:${commonsLang3Version}"
}
Expand Up @@ -21,7 +21,8 @@
// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile "junit:junit:${junitVersion}"
compile "junit:junit:${junit4Version}"
compile "org.junit.jupiter:junit-jupiter-api:${junit5Version}"
compile "org.slf4j:slf4j-api:${slf4jVersion}"
compile 'ch.qos.logback:logback-classic:1.2.3'
compile 'commons-io:commons-io:2.5'
Expand Down

0 comments on commit af21259

Please sign in to comment.