Skip to content

Instantly share code, notes, and snippets.

@mariusk
Created January 22, 2014 08:13
Show Gist options
  • Save mariusk/8555165 to your computer and use it in GitHub Desktop.
Save mariusk/8555165 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
maven {
url 'https://github.com/steffenschaefer/gwt-gradle-plugin/raw/maven-repo/'
}
mavenCentral()
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.2'
classpath 'com.android.tools.build:gradle:0.7.3+'
classpath 'com.github.jtakakura:gradle-robovm-plugin:0.0.2'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = "1.0"
ext.appName = "test"
ext.gdxVersion = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
mavenLocal();
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
}
}
project(":desktop") {
apply plugin: "java"
apply plugin: "application"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
}
}
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
}
}
project(":gwt") {
apply plugin: "gwt"
apply plugin: "war"
webAppDirName = 'webapp'
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
}
gwt {
gwtVersion='2.5.0' // Should match the gwt version used for building the gwt backend
maxHeapSize="1G" // Default 256m is not enough for gwt compiler. GWT is HUNGRY
minHeapSize="1G"
src = files(file("src/")) // Needs to be in front of "modules" below.
modules 'com.foo.bar.GdxDefinition'
compiler {
strict = true;
enableClosureCompiler = true;
disableClassMetadata = true;
disableCastChecking = true;
}
}
}
project(":ios") {
apply plugin: 'java'
apply plugin: 'robovm'
//sourceSets.main.java.srcDirs = [ "src/" ]
ext {
mainClassName = "com.foo.bar.IOSLauncher"
roboVMVersion = "0.0.8"
}
task wrapper(type: Wrapper) {
gradleVersion = '1.9'
}
dependencies {
compile "org.robovm:robovm-rt:${roboVMVersion}"
compile "org.robovm:robovm-cocoatouch:${roboVMVersion}"
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
}
}
tasks.eclipse.doLast {
delete ".project"
}
sourceSets.main.resources.srcDirs = [file("../android/assets").getAbsolutePath()]
sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// idea doesn't like relative paths outside of content root...
tasks.ideaModule.doFirst {
sourceSets.main.resources.srcDirs = []
}
eclipse.project {
name = appName + "-ios"
}
Mariuss-MacBook-Pro:test2 marius$ tree ios/
ios/
├── build
│   ├── libs
│   │   └── ios-1.0.jar
│   ├── resources
│   │   └── main
│   │   └── badlogic.jpg
│   ├── robovm
│   └── tmp
│   └── jar
│   └── MANIFEST.MF
├── build.gradle
└── src
└── com
└── foo
└── bar
└── IOSLauncher.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment