build.gradle 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. apply plugin: 'java'
  2. // note from smelC: starting with Eclipse Neon, you should not use
  3. // gradle's Eclipse plugin. Instead you should use Eclipse's buildship project:
  4. // https://projects.eclipse.org/projects/tools.buildship
  5. // buildship takes care of generating .classpath and .project files according to your build.gradle files
  6. // (right-click on a project > Gradle > Refresh Gradle Project).
  7. // In this section you declare where to find the dependencies of your project
  8. repositories {
  9. // Use 'jcenter' for resolving your dependencies.
  10. // You can declare any Maven/Ivy/file repository here.
  11. jcenter()
  12. }
  13. project.ext.assetsDir = new File("assets");
  14. sourceSets {
  15. main {
  16. java {
  17. srcDirs 'squidlib/src/main/java'
  18. srcDirs 'squidlib-util/src/main/java'
  19. srcDirs 'squidlib-util/src/main/resources'
  20. // srcDirs 'squidlib-util/etc' <- No. Solely contains TilesetsGenerator
  21. // which isn't useful anymore.
  22. }
  23. }
  24. }
  25. // define 'gdxVersion' if not defined yet. This allows
  26. // a project depending on SquidLib (like: your game) to define
  27. // 'gdxVersion' itself, and yet be able to build SquidLib standalone too.
  28. def gdxVersion = System.getenv("gdxVersion") ?: "1.9.6" // As in pom.xml
  29. project.targetCompatibility = '1.7'
  30. // project.sourceCompatibility = '1.6' // For android. Commented because not honored (diamonds) :-(
  31. dependencies {
  32. compile "com.badlogicgames.gdx:gdx:$gdxVersion"
  33. }