Gradle is a build tool mainly oriented towards the JVM world (Java, Groovy, Scala, etc.) but it has some C/C++ support. It contains Ant, Ivy, and Maven in their entirety, but is much more elegant to use than those other tools. For example, it has plugins that apply Maven-style conventions (such as expecting all Java source to be in ./src/main/java) but it lets you change those conventions, which is a feature that most Maven fans seem to be opposed to for some reason.
I've made something that basically compiles, and tested that a project using Slick can also compile from a JAR made by this process.
Get and install Gradle:
http://www.gradle.org/Make a file "settings.gradle"
[code]
rootProject.name = 'slick'
[/code]
Then, make a file "build.gradle"
[code]
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
defaultTasks 'clean', 'copySlickData', 'build', 'javadoc', 'install'
/*
* If you want to make an Eclipse project, just run the task 'eclipse' as well
* The jar will appear as 'build/libs/slick-0.4.0.jar'
* The maven lookup info will be:
* group: "org.newdawn"
* artifact: "slick"
* version: "0.4.0"
* gradle should be able to look up the version with "0.4.+"
*/
group = 'org.newdawn'
version = '0.4.0'
description = 'Game library on top of lwjgl, by Kevin Glass.'
sourceCompatibility = '1.4'
targetCompatibility = '1.4'
repositories {
mavenCentral()
mavenLocal()
maven { url "http://b2s-repo.googlecode.com/svn/trunk/mvn-repo" }
maven { url "http://java.freehep.org/maven2" }
maven { url "http://download.java.net/maven/2" }
}
dependencies {
compile group: 'org.lwjgl.lwjgl', name: 'lwjgl', version: '2.+'
compile files('lib/ibxm.jar')
compile group: 'jcraft', name: 'jogg', version: '0.0.7'
compile group: 'jcraft', name: 'jorbis', version: '0.0.15'
compile group: 'javax.jnlp', name: 'jnlp', version: '1.2+'
// Need a more up-to-date maven repo for ibxm, so we can do away with the file dependency
// compile group: 'ibxm', name: 'ibxm', version: 'do not know'
}
sourceSets {
main {
java {
srcDir 'src'
}
}
test {
resources {
srcDir 'testdata'
}
}
}
task copySlickData(type: Copy, dependsOn: classes) {
from 'src/org/newdawn/slick/data'
into 'build/classes/main/org/newdawn/slick/data'
}
[/code]