| /* |
| * Copyright 2011 See AUTHORS file. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| apply plugin: "java" |
| apply plugin: "jetty" |
| |
| gwt { |
| gwtVersion='2.6.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.badlogic.gdx.tests.gwt.GdxTestsGwt' |
| devModules 'com.badlogic.gdx.tests.gwt.GdxTestsGwt' |
| project.webAppDirName = 'webapp' |
| |
| compiler { |
| strict = true; |
| enableClosureCompiler = true; |
| disableCastChecking = true; |
| } |
| } |
| |
| task draftRun(type: JettyRunWar) { |
| dependsOn draftWar |
| dependsOn.remove('war') |
| webApp=draftWar.archivePath |
| daemon=true |
| } |
| |
| task superDev(type: de.richsource.gradle.plugins.gwt.GwtSuperDev) { |
| dependsOn draftRun |
| doFirst { |
| gwt.modules = gwt.devModules |
| } |
| } |
| |
| |
| draftWar { |
| from "war" |
| } |
| |
| task addSource << { |
| sourceSets.main.compileClasspath += files(project(':tests:gdx-tests').sourceSets.main.allJava.srcDirs) |
| sourceSets.main.compileClasspath += files(project(':backends:gdx-backends-gwt').sourceSets.main.allJava.srcDirs) |
| sourceSets.main.compileClasspath += files(project(':extensions:gdx-box2d:gdx-box2d-gwt').sourceSets.main.allJava.srcDirs) |
| sourceSets.main.compileClasspath += files(project(':extensions:gdx-controllers:gdx-controllers-gwt').sourceSets.main.allJava.srcDirs) |
| sourceSets.main.compileClasspath += files(project(':gdx').sourceSets.main.allJava.srcDirs) |
| } |
| |
| tasks.compileGwt.dependsOn(addSource) |
| tasks.draftCompileGwt.dependsOn(addSource) |
| |
| sourceCompatibility = 1.6 |
| sourceSets.main.java.srcDirs = [ "src/" ] |