gradle works again

This commit is contained in:
Armin Benz 2017-11-22 19:14:24 +01:00
parent d1df61d8dc
commit 6078009368
54 changed files with 270 additions and 2206 deletions

104
.gitignore vendored
View File

@ -5,63 +5,121 @@
*.ear
hs_err_pid*
## Robovm
/ios/robovm-build/
## GWT
war/
html/war/gwt_bree/
html/gwt-unitCache/
/html/war/
/html/gwt-unitCache/
.apt_generated/
html/war/WEB-INF/deploy/
html/war/WEB-INF/classes/
.gwt/
gwt-unitCache/
www-test/
.gwt-tmp/
## Android Studio and Intellij and Android in general
android/libs/armeabi/
android/libs/armeabi-v7a/
android/libs/x86/
android/gen/
/android/libs/armeabi/
/android/libs/armeabi-v7a/
/android/libs/arm64-v8a/
/android/libs/x86/
/android/libs/x86_64/
/android/gen/
.idea/
*.ipr
*.iws
*.iml
out/
/android/out/
com_crashlytics_export_strings.xml
## Eclipse
.classpath
.project
.metadata
**/bin/
tmp/
.metadata/
/android/bin/
/core/bin/
/desktop/bin/
/html/bin/
/ios/bin/
/ios-moe/bin/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.externalToolBuilders/
*.launch
## NetBeans
**/nbproject/private/
build/
nbbuild/
dist/
nbdist/
/nbproject/private/
/android/nbproject/private/
/core/nbproject/private/
/desktop/nbproject/private/
/html/nbproject/private/
/ios/nbproject/private/
/ios-moe/nbproject/private/
/build/
/android/build/
/core/build/
/desktop/build/
/html/build/
/ios/build/
/ios-moe/build/
/nbbuild/
/android/nbbuild/
/core/nbbuild/
/desktop/nbbuild/
/html/nbbuild/
/ios/nbbuild/
/ios-moe/nbbuild/
/dist/
/android/dist/
/core/dist/
/desktop/dist/
/html/dist/
/ios/dist/
/ios-moe/dist/
/nbdist/
/android/nbdist/
/core/nbdist/
/desktop/nbdist/
/html/nbdist/
/ios/nbdist/
/ios-moe/nbdist/
nbactions.xml
nb-configuration.xml
## Gradle
.gradle
build/
/local.properties
.gradle/
gradle-app.setting
/build/
/android/build/
/core/build/
/desktop/build/
/html/build/
/ios/build/
/ios-moe/build/
## OS Specific
.DS_Store
Thumbs.db
###########################
## iOS
/ios/xcode/*.xcodeproj/*
!/ios/xcode/*.xcodeproj/xcshareddata
!/ios/xcode/*.xcodeproj/project.pbxproj
/ios/xcode/native/
libgdx/
/ios-moe/xcode/*.xcodeproj/*
!/ios-moe/xcode/*.xcodeproj/xcshareddata
!/ios-moe/xcode/*.xcodeproj/project.pbxproj
/ios-moe/xcode/native/

View File

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.samdev.colorrunner.android"
android:versionCode="1"
android:versionName="1.0" >
package="de.samdev.colorrunner" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="24" />
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="20" />
<application
android:allowBackup="true"
@ -12,7 +10,7 @@
android:label="@string/app_name"
android:theme="@style/GdxTheme" >
<activity
android:name="de.samdev.colorrunner.android.AndroidLauncher"
android:name="de.samdev.colorrunner.AndroidLauncher"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@ -1,11 +0,0 @@
{
"com.badlogic.gdx.graphics.g2d.BitmapFont": {
"font": { "file": "fonts/font.fnt" },
},
"com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle": {
"default": { "up": "blue_button2" , "down": "blue_button3", "font": font, "pressedOffsetY": -4 }
},
"com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle": {
"default": { "font": font}
}
}

View File

@ -1,155 +0,0 @@
menuSkin.png
format: RGBA8888
filter: Nearest,Nearest
repeat: none
blue_panel
rotate: false
xy: 1, 23
size: 100, 100
split: 39, 60, 42, 57
orig: 100, 100
offset: 0, 0
index: -1
blue_button1
rotate: false
xy: 103, 74
size: 49, 49
split: 6, 6, 7, 10
orig: 49, 49
offset: 0, 0
index: -1
blue_button2
rotate: false
xy: 103, 23
size: 49, 49
split: 7, 7, 5, 9
orig: 49, 49
offset: 0, 0
index: -1
blue_button4
rotate: false
xy: 154, 74
size: 49, 49
split: 12, 19, 7, 10
orig: 49, 49
offset: 0, 0
index: -1
blue_button6
rotate: false
xy: 154, 23
size: 49, 49
split: 9, 12, 6, 10
orig: 49, 49
offset: 0, 0
index: -1
blue_button3
rotate: false
xy: 205, 78
size: 49, 45
split: 15, 15, 5, 7
orig: 49, 45
offset: 0, 0
index: -1
blue_button5
rotate: false
xy: 205, 31
size: 49, 45
split: 7, 8, 7, 8
orig: 49, 45
offset: 0, 0
index: -1
blue_button7
rotate: false
xy: 256, 78
size: 49, 45
split: 9, 11, 5, 5
orig: 49, 45
offset: 0, 0
index: -1
blue_boxCheckmark
rotate: false
xy: 256, 40
size: 38, 36
orig: 38, 36
offset: 0, 0
index: -1
blue_boxCross
rotate: false
xy: 307, 87
size: 38, 36
orig: 38, 36
offset: 0, 0
index: -1
grey_box
rotate: false
xy: 347, 87
size: 38, 36
orig: 38, 36
offset: 0, 0
index: -1
blue_circle
rotate: false
xy: 387, 87
size: 36, 36
split: 17, 18, 17, 18
orig: 36, 36
offset: 0, 0
index: -1
blue_sliderLeft
rotate: false
xy: 425, 92
size: 39, 31
orig: 39, 31
offset: 0, 0
index: -1
blue_sliderRight
rotate: false
xy: 466, 92
size: 39, 31
orig: 39, 31
offset: 0, 0
index: -1
blue_sliderDown
rotate: false
xy: 296, 34
size: 28, 42
orig: 28, 42
offset: 0, 0
index: -1
blue_sliderUp
rotate: false
xy: 326, 43
size: 28, 42
orig: 28, 42
offset: 0, 0
index: -1
blue_checkmark
rotate: false
xy: 1, 1
size: 21, 20
orig: 21, 20
offset: 0, 0
index: -1
blue_cross
rotate: false
xy: 356, 67
size: 18, 18
orig: 18, 18
offset: 0, 0
index: -1
blue_selection
rotate: false
xy: 24, 4
size: 17, 17
split: 8, 8, 8, 8
orig: 17, 17
offset: 0, 0
index: -1
blue_selection
rotate: false
xy: 24, 4
size: 17, 17
orig: 17, 17
offset: 0, 0
index: -1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -1,33 +0,0 @@
menupack.png
format: RGBA8888
filter: Nearest,Nearest
repeat: none
blau
rotate: false
xy: 1, 1
size: 128, 128
orig: 128, 128
offset: 0, 0
index: -1
gelb
rotate: false
xy: 131, 1
size: 128, 128
orig: 128, 128
offset: 0, 0
index: -1
grün
rotate: false
xy: 261, 1
size: 128, 128
orig: 128, 128
offset: 0, 0
index: -1
rot
rotate: false
xy: 391, 1
size: 128, 128
orig: 128, 128
offset: 0, 0
index: -1

View File

@ -1,20 +0,0 @@
{
"com.badlogic.gdx.graphics.g2d.BitmapFont": {
"font": { "file": "fonts/font.fnt" },
},
"com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle": {
"default": { "up": "blau" , "down": "blau", "font": font, "pressedOffsetY": -4 }
},
"com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle": {
"default": { "up": "grün" , "down": "grün", "font": font, "pressedOffsetY": -4 }
},
"com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle": {
"default": { "up": "gelb" , "down": "gelb", "font": font, "pressedOffsetY": -4 }
},
"com.badlogic.gdx.scenes.scene2d.ui.TextButton$TextButtonStyle": {
"default": { "up": "rot" , "down": "rot", "font": font, "pressedOffsetY": -4 }
},
"com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle": {
"default": { "font": font}
}
}

View File

@ -1,33 +0,0 @@
menupack.png
format: RGBA8888
filter: Nearest,Nearest
repeat: none
blau
rotate: false
xy: 1, 1
size: 128, 128
orig: 128, 128
offset: 0, 0
index: -1
gelb
rotate: false
xy: 131, 1
size: 128, 128
orig: 128, 128
offset: 0, 0
index: -1
grün
rotate: false
xy: 261, 1
size: 128, 128
orig: 128, 128
offset: 0, 0
index: -1
rot
rotate: false
xy: 391, 1
size: 128, 128
orig: 128, 128
offset: 0, 0
index: -1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

View File

@ -1,6 +1,6 @@
android {
buildToolsVersion '26.0.2'
compileSdkVersion 24
buildToolsVersion "23.0.1"
compileSdkVersion 20
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
@ -14,21 +14,41 @@ android {
instrumentTest.setRoot('tests')
}
packagingOptions {
exclude 'META-INF/robovm/ios/robovm.xml'
}
defaultConfig {
applicationId "de.samdev.colorrunner"
minSdkVersion 9
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
// called every time gradle gets executed, takes the native dependencies of
// the natives configuration, and extracts them to the proper libs/ folders
// so they get packed with the APK.
task copyAndroidNatives() {
task copyAndroidNatives() {
file("libs/armeabi/").mkdirs();
file("libs/armeabi-v7a/").mkdirs();
file("libs/arm64-v8a/").mkdirs();
file("libs/x86_64/").mkdirs();
file("libs/x86/").mkdirs();
configurations.natives.files.each { jar ->
def outputDir = null
if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
if(outputDir != null) {
copy {
@ -59,16 +79,45 @@ task run(type: Exec) {
}
def adb = path + "/platform-tools/adb"
commandLine "$adb", 'shell', 'am', 'start', '-n', 'de.samdev.colorrunner.android/de.samdev.colorrunner.android.AndroidLauncher'
commandLine "$adb", 'shell', 'am', 'start', '-n', 'de.samdev.colorrunner/de.samdev.colorrunner.AndroidLauncher'
}
// sets up the Android Eclipse project, using the old Ant based build.
eclipse {
// need to specify Java source sets explicitly, SpringSource Gradle Eclipse plugin
// ignores any nodes added in classpath.file.withXml
sourceSets {
main {
java.srcDirs "src", 'gen'
}
}
jdt {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
classpath {
plusConfigurations += [ project.configurations.compile ]
containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES'
}
project {
name = appName + "-android"
natures 'com.android.ide.eclipse.adt.AndroidNature'
buildCommands.clear();
buildCommand "com.android.ide.eclipse.adt.ResourceManagerBuilder"
buildCommand "com.android.ide.eclipse.adt.PreCompilerBuilder"
buildCommand "org.eclipse.jdt.core.javabuilder"
buildCommand "com.android.ide.eclipse.adt.ApkBuilder"
}
}
// sets up the Android Idea project, using the old Ant based build.
idea {
module {
sourceDirs += file("src");
scopes = [ COMPILE: [plus:[project.configurations.compile]]]
scopes = [ COMPILE: [plus:[project.configurations.compile]]]
iml {
withXml {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -26,6 +26,9 @@
-dontwarn com.badlogic.gdx.utils.GdxBuild
-dontwarn com.badlogic.gdx.physics.box2d.utils.Box2DBuild
-dontwarn com.badlogic.gdx.jnigen.BuildTarget*
-dontwarn com.badlogic.gdx.graphics.g2d.freetype.FreetypeBuild
-keep class com.badlogic.gdx.controllers.android.AndroidControllers
-keepclassmembers class com.badlogic.gdx.backends.android.AndroidInput* {
<init>(com.badlogic.gdx.Application, android.content.Context, java.lang.Object, com.badlogic.gdx.backends.android.AndroidApplicationConfiguration);

View File

@ -1,14 +1,9 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# This file is used by the Eclipse ADT plugin. It is unnecessary for IDEA and Android Studio projects, which
# configure Proguard and the Android target via the build.gradle file.
# To enable ProGuard to work with Eclipse ADT, uncomment this (available properties: sdk.dir, user.home)
# and ensure proguard.jar in the Android SDK is up to date (or alternately reduce the android target to 23 or lower):
# proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-rules.pro
# Project target.
target=android-19

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ColorRunner</string>
<string name="app_name">colorrunner</string>
</resources>

View File

@ -1,10 +1,9 @@
package de.samdev.colorrunner.android;
package de.samdev.colorrunner;
import android.os.Bundle;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import de.samdev.colorrunner.CRGame;
public class AndroidLauncher extends AndroidApplication {
@Override

View File

@ -1,31 +1,38 @@
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'org.robovm:robovm-gradle-plugin:1.12.0'
classpath 'com.android.tools.build:gradle:2.2.0'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = 'ColorRunner'
gdxVersion = '1.6.1'
roboVMVersion = '1.2.0'
appName = "colorrunner"
gdxVersion = '1.9.7'
roboVMVersion = '2.3.1'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.0'
aiVersion = '1.8.0'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
google()
}
}
@ -37,7 +44,7 @@ project(":desktop") {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
}
}
@ -51,11 +58,10 @@ project(":android") {
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"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
}
}
@ -65,22 +71,10 @@ project(":core") {
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
}
}
project(":ios") {
apply plugin: "java"
apply plugin: "robovm"
configurations { natives }
dependencies {
compile project(":core")
compile "org.robovm:robovm-rt:${roboVMVersion}"
compile "org.robovm:robovm-cocoatouch:${roboVMVersion}"
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios"
}
tasks.eclipse.doLast {
delete ".project"
}

View File

@ -3,4 +3,9 @@ apply plugin: "java"
sourceCompatibility = 1.6
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.java.srcDirs = [ "src/" ]
sourceSets.main.java.srcDirs = [ "src/" ]
eclipse.project {
name = appName + "-core"
}

View File

@ -12,7 +12,7 @@ public class CRGame extends Game {
public final static boolean DEBUG = true;
public static AssetManager manager;
@Override
public void create() {
//if (DEBUG)
@ -21,7 +21,7 @@ public class CRGame extends Game {
manager = new AssetManager();
manager.load("sound/mainsound.mp3", Music.class);
manager.load("sound/menusound.mp3", Music.class);
//manager.load("sound/menusound.mp3", Music.class);
manager.finishLoading();
Preferences endlessGameInfos = Gdx.app.getPreferences("endlessGameInfos");

View File

@ -1,6 +1,5 @@
package de.samdev.colorrunner.game.renderer;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
@ -16,8 +15,6 @@ import de.samdev.colorrunner.game.world.entities.MovingEntity;
import de.samdev.colorrunner.game.world.entities.gameentities.floor.FloorTileEntity;
import de.samdev.colorrunner.game.world.map.provider.EndlessMapProvider;
import de.samdev.colorrunner.game.world.map.provider.StaticMapProvider;
import de.samdev.colorrunner.screens.gameScreen.GameScreen;
import de.samdev.colorrunner.screens.menu.MainMenu;
public class CRGameRenderer extends AbstractGameRenderer {
private CRGameWorld gameworld;

View File

@ -18,7 +18,6 @@ import de.samdev.colorrunner.game.world.entities.gameentities.controller.FlyPlay
import de.samdev.colorrunner.game.world.entities.gameentities.controller.RunTopPlayerController;
import de.samdev.colorrunner.game.world.entities.gameentities.floor.FloorTileEntity;
import de.samdev.colorrunner.game.world.map.CRMapStorage;
import de.samdev.colorrunner.game.world.map.provider.MapProvider;
import de.samdev.colorrunner.game.world.map.provider.StaticMapProvider;
import de.samdev.colorrunner.game.world.map.provider.TriggerType;
import de.samdev.colorrunner.screens.gameScreen.GameScreen;

View File

@ -152,4 +152,9 @@ public class CRGameInputProcessor implements InputProcessor, GestureListener {
return false;
}
@Override
public void pinchStop() {
// NOP
}
}

View File

@ -3,18 +3,13 @@ package de.samdev.colorrunner.screens.gameScreen;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.input.GestureDetector;
import de.samdev.colorrunner.CRGame;
import de.samdev.colorrunner.game.renderer.CRGameRenderer;
import de.samdev.colorrunner.game.world.AverageExecutionLogger;
import de.samdev.colorrunner.game.world.CRGameWorld;
import de.samdev.colorrunner.game.world.map.provider.MapProvider;
import de.samdev.colorrunner.input.CRGameInputProcessor;
import de.samdev.colorrunner.screens.menu.SplashScreen;
public class GameScreen implements Screen {
private CRGameWorld world;

View File

@ -9,6 +9,8 @@ import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.MathUtils;
import de.samdev.colorrunner.CRGame;
public class SplashScreen implements Screen {
@ -29,12 +31,10 @@ public class SplashScreen implements Screen {
sB.begin();
sB.draw(logo, -9,-8, 18, 16);
sB.end();
}
public void update(float delta) {
loadTime += delta;
if (loadTime > 0.9)
((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu());
CRGame.Inst().setScreen(new MainMenu());
}
@Override

View File

@ -1,8 +1,10 @@
apply plugin: "java"
sourceCompatibility = 1.6
sourceSets.main.java.srcDirs = ["src/"]
sourceSets.main.java.srcDirs = [ "src/" ]
project.ext.mainClassName = "de.samdev.colorrunner.desktop.DesktopLauncher"
project.ext.assetsDir = new File("../android/assets")
project.ext.assetsDir = new File("../android/assets");
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
@ -12,15 +14,42 @@ task run(dependsOn: classes, type: JavaExec) {
ignoreExitValue = true
}
task debug(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
debug = true
}
task dist(type: Jar) {
from files(sourceSets.main.output.classesDir)
from files(sourceSets.main.output.resourcesDir)
from { configurations.compile.collect { zipTree(it) } }
from {configurations.compile.collect {zipTree(it)}}
from files(project.assetsDir);
manifest {
attributes 'Main-Class': project.mainClassName
}
}
dist.dependsOn classes
eclipse {
project {
name = appName + "-desktop"
linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/android/assets'
}
}
task afterEclipseImport(description: "Post processing after project generation", group: "IDE") {
doLast {
def classpath = new XmlParser().parse(file(".classpath"))
new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]);
def writer = new FileWriter(file(".classpath"))
def printer = new XmlNodePrinter(new PrintWriter(writer))
printer.setPreserveWhitespace(true)
printer.print(classpath)
}
}

View File

@ -2,24 +2,15 @@ package de.samdev.colorrunner.desktop;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import de.samdev.colorrunner.CRGame;
public class DesktopLauncher {
public static void main (String[] arg) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.title = "ColorRunner";
config.width = 1000;
config.height = 563;
/*
* For FPS Independence Testing
*/
// config.vSyncEnabled = false; // Setting to false disables vertical sync
// config.foregroundFPS = 0; // Setting to 0 disables foreground fps throttling
// config.backgroundFPS = 0; // Setting to 0 disables background fps throttling
new LwjglApplication(new CRGame(), config);
}
}

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms128m -Xmx512m
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xms128m -Xmx1500m
org.gradle.configureondemand=true

Binary file not shown.

View File

@ -1,6 +1,6 @@
#Wed Nov 22 17:23:18 CET 2017
#Fri Jun 09 23:06:52 EDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip

68
gradlew vendored
View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
##############################################################################
##
@ -6,12 +6,30 @@
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@ -40,26 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@ -85,7 +89,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@ -150,11 +154,19 @@ if $cygwin ; then
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

14
gradlew.bat vendored
View File

@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@ -46,10 +46,9 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line

View File

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${app.name}</string>
<key>CFBundleExecutable</key>
<string>${app.executable}</string>
<key>CFBundleIdentifier</key>
<string>${app.id}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${app.name}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${app.version}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${app.build}</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>opengles-2</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon</string>
<string>Icon-72</string>
</array>
</dict>
</dict>
</dict>
</plist>

View File

@ -1,58 +0,0 @@
sourceSets.main.java.srcDirs = [ "src/" ]
sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
ext {
mainClassName = "de.samdev.colorrunner.IOSLauncher"
}
// Extracts native libs (*.a) from the native-ios.jar and places them
// under build/libs/ios/.
task copyNatives << {
file("build/libs/ios/").mkdirs();
configurations.natives.files.each { jar ->
def outputDir = null
if (jar.name.endsWith("natives-ios.jar")) outputDir = file("build/libs/ios")
if (outputDir != null) {
copy {
from zipTree(jar)
into outputDir
include "*.a"
}
}
}
}
// Updates a robovm.xml file.
task updateRoboVMXML << {
def xml = file('robovm.xml')
if (!xml.exists()) {
return
}
// Find all native (*.a) libraries beneath libs
def libtree = fileTree(dir: 'build/libs', include: '**/*.a')
def config = new groovy.util.XmlParser().parse(xml)
config.libs.each {libs ->
libs.children().clear()
libtree.each { File file ->
libs.appendNode('lib', 'build/libs/ios/' + file.getName())
}
}
def writer = new FileWriter(xml)
def printer = new XmlNodePrinter(new PrintWriter(writer))
printer.setPreserveWhitespace true
printer.print(config)
}
updateRoboVMXML.dependsOn copyNatives
build.dependsOn updateRoboVMXML
launchIPhoneSimulator.dependsOn build
launchIPadSimulator.dependsOn build
launchIOSDevice.dependsOn build
createIPA.dependsOn build

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -1,6 +0,0 @@
app.version=1.0
app.id=de.samdev.colorrunner.IOSLauncher
app.mainclass=de.samdev.colorrunner.IOSLauncher
app.executable=IOSLauncher
app.build=1
app.name=ColorRunner

View File

@ -1,49 +0,0 @@
<config>
<executableName>${app.executable}</executableName>
<mainClass>${app.mainclass}</mainClass>
<os>ios</os>
<arch>thumbv7</arch>
<target>ios</target>
<iosInfoPList>Info.plist.xml</iosInfoPList>
<resources>
<resource>
<directory>../android/assets</directory>
<includes>
<include>**</include>
</includes>
<skipPngCrush>true</skipPngCrush>
</resource>
<resource>
<directory>data</directory>
</resource>
</resources>
<forceLinkClasses>
<pattern>com.badlogic.gdx.scenes.scene2d.ui.*</pattern>
<pattern>com.badlogic.gdx.physics.bullet.**</pattern>
<pattern>com.android.okhttp.HttpHandler</pattern>
<pattern>com.android.okhttp.HttpsHandler</pattern>
<pattern>com.android.org.conscrypt.**</pattern>
<pattern>com.android.org.bouncycastle.jce.provider.BouncyCastleProvider</pattern>
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.BC$Mappings</pattern>
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi</pattern>
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$Std</pattern>
<pattern>com.android.org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi</pattern>
<pattern>com.android.org.bouncycastle.crypto.digests.AndroidDigestFactoryOpenSSL</pattern>
<pattern>org.apache.harmony.security.provider.cert.DRLCertFactory</pattern>
<pattern>org.apache.harmony.security.provider.crypto.CryptoProvider</pattern>
</forceLinkClasses>
<libs>
<lib>build/libs/ios/libgdx-box2d.a</lib>
<lib>build/libs/ios/libgdx.a</lib>
<lib>build/libs/ios/libObjectAL.a</lib>
</libs>
<frameworks>
<framework>UIKit</framework>
<framework>OpenGLES</framework>
<framework>QuartzCore</framework>
<framework>CoreGraphics</framework>
<framework>OpenAL</framework>
<framework>AudioToolbox</framework>
<framework>AVFoundation</framework>
</frameworks>
</config>

View File

@ -1,22 +0,0 @@
package de.samdev.colorrunner;
import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.uikit.UIApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
import de.samdev.colorrunner.CRGame;
public class IOSLauncher extends IOSApplication.Delegate {
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new CRGame(), config);
}
public static void main(String[] argv) {
NSAutoreleasePool pool = new NSAutoreleasePool();
UIApplication.main(argv, null, IOSLauncher.class);
pool.close();
}
}

View File

@ -1 +1 @@
include 'desktop', 'android', 'core', 'ios'
include 'desktop', 'android', 'core'