apply plugin: 'java' apply plugin: 'eclipse' // note from smelC: I did not add a plugin for 'idea' as I don't use it. // Please add it if you do. // In this section you declare where to find the dependencies of your project repositories { // Use 'jcenter' for resolving your dependencies. // You can declare any Maven/Ivy/file repository here. jcenter() } project.ext.assetsDir = new File("assets"); sourceSets { main { java { srcDirs 'squidlib/src/main/java' srcDirs 'squidlib-util/src/main/java' srcDirs 'squidlib-util/src/main/resources' // srcDirs 'squidlib-util/etc' <- No. Solely contains TilesetsGenerator // which isn't useful anymore. } } test { java { srcDirs 'squidlib/src/test/java' srcDirs 'squidlib-util/src/test/java' srcDirs 'squidlib-util/src/test/resources' // srcDirs 'squidlib-performance/src/main/java' <- requires org.openjdk } } } // define 'gdxVersion' if not defined yet. This allows // a project depending on SquidLib (like: your game) to define // 'gdxVersion' itself, and yet be able to build SquidLib standalone too. def gdxVersion = System.getenv("gdxVersion") ?: "1.9.6" // As in pom.xml // In this section you declare the dependencies for your production and test code dependencies { compile "com.badlogicgames.gdx:gdx:$gdxVersion" testCompile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" testCompile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" testCompile 'junit:junit:4.12' } // Execute with 'gradle everythingDemo' (add --info to get debug info) task(everythingDemo, type: JavaExec) { main = 'squidpony.gdx.examples.desktop.EverythingDemoLauncher' // smelC: It would be nice to automatically add the three following // lines to any 'JavaExec' task, but I could not find how to do it. classpath(sourceSets.test.runtimeClasspath,project.assetsDir) standardInput = System.in ignoreExitValue = true }