gradle works again

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

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<EFBFBD>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<EFBFBD>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