--- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -include 'desktop', 'ios', 'html', 'core' \ No newline at end of file +include 'html', 'core' --- a/build.gradle +++ b/build.gradle @@ -1,93 +1,45 @@ buildscript { - - repositories { - mavenLocal() mavenCentral() - maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } - jcenter() + gradlePluginPortal() } dependencies { - classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6' - classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1' - - + classpath 'org.wisepersist:gwt-gradle-plugin:1.1.16' } } allprojects { apply plugin: "eclipse" - apply plugin: "idea" version = '1.0' ext { appName = "TheBurdenedLair" - gdxVersion = '1.9.7' - roboVMVersion = '2.3.1' - box2DLightsVersion = '1.4' - ashleyVersion = '1.7.0' - aiVersion = '1.8.0' + gdxVersion = '1.14.2' } repositories { - mavenLocal() mavenCentral() - maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } - maven { url "https://oss.sonatype.org/content/repositories/releases/" } - } -} - -project(":desktop") { - apply plugin: "java" - - - dependencies { - compile project(":core") - compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" - compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" - - } -} - -project(":ios") { - apply plugin: "java" - apply plugin: "robovm" - - - dependencies { - compile project(":core") - compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion" - compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion" - compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" - compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" - + gradlePluginPortal() } } project(":html") { + apply plugin: "java-library" apply plugin: "gwt" apply plugin: "war" - 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" - + implementation project(":core") + api "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" + api "com.badlogicgames.gdx:gdx:$gdxVersion:sources" + api "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" } } project(":core") { - apply plugin: "java" - + apply plugin: "java-library" dependencies { - compile "com.badlogicgames.gdx:gdx:$gdxVersion" - + api "com.badlogicgames.gdx:gdx:$gdxVersion" } } - -tasks.eclipse.doLast { - delete ".project" -} \ No newline at end of file --- a/core/build.gradle +++ b/core/build.gradle @@ -1,11 +1,6 @@ -apply plugin: "java" +apply plugin: "java-library" -sourceCompatibility = 1.6 +sourceCompatibility = 1.8 [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' sourceSets.main.java.srcDirs = [ "src/" ] - - -eclipse.project { - name = appName + "-core" -} --- a/html/build.gradle +++ b/html/build.gradle @@ -1,33 +1,16 @@ -apply plugin: "java" -apply plugin: "jetty" - gwt { - gwtVersion='2.8.0' // Should match the gwt version used for building the gwt backend + gwtVersion='2.10.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 'net.evgiz.ld40.GdxDefinition' - devModules 'net.evgiz.ld40.GdxDefinitionSuperdev' project.webAppDirName = 'webapp' compiler { strict = 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 + localWorkers = 1 // one worker thread: with several the generated JavaScript differs from build to build } } @@ -41,7 +24,7 @@ copy { from "webapp" into "build/dist" - } + } copy { from "war" into "build/dist" @@ -49,21 +32,18 @@ } } -draftWar { - from "war" -} - -task addSource << { - sourceSets.main.compileClasspath += files(project(':core').sourceSets.main.allJava.srcDirs) +task addSource { + doLast { + sourceSets.main.compileClasspath += files(project(':core').sourceSets.main.allJava.srcDirs) + } } tasks.compileGwt.dependsOn(addSource) tasks.draftCompileGwt.dependsOn(addSource) +tasks.checkGwt.dependsOn(addSource) +checkGwt.war = file("war") -sourceCompatibility = 1.6 +sourceCompatibility = 1.8 sourceSets.main.java.srcDirs = [ "src/" ] - -eclipse.project { - name = appName + "-html" -} +eclipse.project.name = appName + "-html" --- a/html/src/net/evgiz/ld40/GdxDefinition.gwt.xml +++ b/html/src/net/evgiz/ld40/GdxDefinition.gwt.xml @@ -1,5 +1,5 @@ - + @@ -7,4 +7,6 @@ + + --- a/html/src/net/evgiz/ld40/client/HtmlLauncher.java +++ b/html/src/net/evgiz/ld40/client/HtmlLauncher.java @@ -9,7 +9,10 @@ @Override public GwtApplicationConfiguration getConfig () { - return new GwtApplicationConfiguration(480, 320); + GwtApplicationConfiguration config = new GwtApplicationConfiguration(true); + config.padHorizontal = 0; + config.padVertical = 0; + return config; } @Override --- a/core/src/net/evgiz/ld40/game/Game.java +++ b/core/src/net/evgiz/ld40/game/Game.java @@ -89,7 +89,7 @@ player.health = health[diff]; - frameBuffer = FrameBuffer.createFrameBuffer(Pixmap.Format.RGBA8888, Gdx.graphics.getWidth()/downscale, Gdx.graphics.getHeight()/downscale, true); + frameBuffer = new FrameBuffer(Pixmap.Format.RGBA8888, Gdx.graphics.getWidth()/downscale, Gdx.graphics.getHeight()/downscale, true); frameBuffer.getColorBufferTexture().setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest); intro = new Intro(); @@ -99,7 +99,7 @@ downscale = scales[retro]; player.cameraController = new CameraController(camera, lookSensitivity); - frameBuffer = FrameBuffer.createFrameBuffer(Pixmap.Format.RGBA8888, Gdx.graphics.getWidth()/downscale, Gdx.graphics.getHeight()/downscale, true); + frameBuffer = new FrameBuffer(Pixmap.Format.RGBA8888, Gdx.graphics.getWidth()/downscale, Gdx.graphics.getHeight()/downscale, true); frameBuffer.getColorBufferTexture().setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest); } --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,5 @@ distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531