Skip to content

Commit

Permalink
[Misc] Very early exploration of using Gradle for XWiki. Mostly to ge…
Browse files Browse the repository at this point in the history
…t the XWiki dev team familiarized with Gradle in case we need/want to switch to it one day. This could be reverted at any time should we decide to not go forward, to stop the exploration or to move it to a branch instead.
  • Loading branch information
vmassol committed Apr 12, 2017
1 parent 496208a commit de3b11c
Show file tree
Hide file tree
Showing 13 changed files with 386 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Build
# Maven Build
target
target-eclipse

# Gradle Build
build
.gradle

# IDEA
*.iml
*.ipr
Expand Down
47 changes: 47 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

ext {
junitVersion = '4.12'
slf4jVersion = '1.7.25'
commonsLang3Version = '3.5'
mockitoVersion= '2.6.3'
}

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

apply plugin: 'java'
apply plugin: 'maven'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenCentral()
}

dependencies {
testCompile "junit:junit:${junitVersion}"
}
}
58 changes: 58 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

if ( !JavaVersion.current().java8Compatible ) {
throw new GradleException( "Gradle must be run with Java 8" )
}

include 'xwiki-blame-api'
project(':xwiki-blame-api').projectDir = new File(rootProject.projectDir, "xwiki-commons-core/xwiki-commons-blame/xwiki-commons-blame-api")

include 'xwiki-component-api'
project(':xwiki-component-api').projectDir = new File(rootProject.projectDir, "xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api")

include 'xwiki-stability'
project(':xwiki-stability').projectDir = new File(rootProject.projectDir, "xwiki-commons-core/xwiki-commons-stability")

include 'xwiki-text'
project(':xwiki-text').projectDir = new File(rootProject.projectDir, "xwiki-commons-core/xwiki-commons-text")

include 'xwiki-test-component'
project(':xwiki-test-component').projectDir = new File(rootProject.projectDir, "xwiki-commons-tools/xwiki-commons-tool-test/xwiki-commons-tool-test-component")

include 'xwiki-observation-api'
project(':xwiki-observation-api').projectDir = new File(rootProject.projectDir, "xwiki-commons-core/xwiki-commons-observation/xwiki-commons-observation-api")

include 'xwiki-test-simple'
project(':xwiki-test-simple').projectDir = new File(rootProject.projectDir, "xwiki-commons-tools/xwiki-commons-tool-test/xwiki-commons-tool-test-simple")

include 'xwiki-component-default'
project(':xwiki-component-default').projectDir = new File(rootProject.projectDir, "xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default")

include 'xwiki-component-observation'
project(':xwiki-component-observation').projectDir = new File(rootProject.projectDir, "xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-observation")

include 'xwiki-configuration-api'
project(':xwiki-configuration-api').projectDir = new File(rootProject.projectDir, "xwiki-commons-core/xwiki-commons-configuration/xwiki-commons-configuration-api")

include 'xwiki-context'
project(':xwiki-context').projectDir = new File(rootProject.projectDir, "xwiki-commons-core/xwiki-commons-context")
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// 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')
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// 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'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// 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'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// 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}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile project(':xwiki-component-api')
compile 'commons-beanutils:commons-beanutils:1.9.3'
}
27 changes: 27 additions & 0 deletions xwiki-commons-core/xwiki-commons-context/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// 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')
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// 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')
}
25 changes: 25 additions & 0 deletions xwiki-commons-core/xwiki-commons-text/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// 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}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

// WARNING: NOT WORKING, WORK IN PROGRESS. USE THE MAVEN BUILD WHICH IS THE XWIKI OFFICIAL BUILD TOOL.

dependencies {
compile project(':xwiki-observation-api')
compile project(':xwiki-test-simple')
compile project(':xwiki-component-default')
compile project(':xwiki-configuration-api')
compile project(':xwiki-context')
}
Loading

0 comments on commit de3b11c

Please sign in to comment.