summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android/AndroidManifest.xml24
-rw-r--r--android/build.gradle136
-rw-r--r--android/ic_launcher-web.pngbin22195 -> 0 bytes
-rw-r--r--android/proguard-rules.pro45
-rw-r--r--android/project.properties9
-rw-r--r--android/res/drawable-hdpi/ic_launcher.pngbin16820 -> 0 bytes
-rw-r--r--android/res/drawable-mdpi/ic_launcher.pngbin16124 -> 0 bytes
-rw-r--r--android/res/drawable-xhdpi/ic_launcher.pngbin17915 -> 0 bytes
-rw-r--r--android/res/drawable-xxhdpi/ic_launcher.pngbin18746 -> 0 bytes
-rw-r--r--android/res/drawable-xxxhdpi/ic_launcher.pngbin19448 -> 0 bytes
-rw-r--r--android/res/values/strings.xml6
-rw-r--r--android/res/values/styles.xml12
-rw-r--r--android/src/ch/asynk/zproject/AndroidLauncher.java16
-rw-r--r--assets/build.gradle6
-rw-r--r--build.gradle34
-rw-r--r--core/build.gradle5
-rw-r--r--core/src/ch/asynk/zproject/Assets.java12
-rw-r--r--desktop/build.gradle20
-rw-r--r--settings.gradle2
19 files changed, 11 insertions, 316 deletions
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
deleted file mode 100644
index fb555f3..0000000
--- a/android/AndroidManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="ch.asynk.zproject" >
-
- <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="27" />
-
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name"
- android:theme="@style/GdxTheme" >
- <activity
- android:name="ch.asynk.zproject.AndroidLauncher"
- android:label="@string/app_name"
- android:screenOrientation="landscape"
- android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-
-</manifest>
diff --git a/android/build.gradle b/android/build.gradle
deleted file mode 100644
index 88b2f2b..0000000
--- a/android/build.gradle
+++ /dev/null
@@ -1,136 +0,0 @@
-android {
- buildToolsVersion "27.0.3"
- compileSdkVersion 27
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = ['src']
- aidl.srcDirs = ['src']
- renderscript.srcDirs = ['src']
- res.srcDirs = ['res']
- assets.srcDirs = ['assets']
- jniLibs.srcDirs = ['libs']
- }
-
- }
- packagingOptions {
- exclude 'META-INF/robovm/ios/robovm.xml'
- }
- defaultConfig {
- applicationId "ch.asynk.zproject"
- minSdkVersion 9
- targetSdkVersion 27
- 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() {
- 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-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 {
- from zipTree(jar)
- into outputDir
- include "*.so"
- }
- }
- }
-}
-
-task run(type: Exec) {
- def path
- def localProperties = project.file("../local.properties")
- if (localProperties.exists()) {
- Properties properties = new Properties()
- localProperties.withInputStream { instr ->
- properties.load(instr)
- }
- def sdkDir = properties.getProperty('sdk.dir')
- if (sdkDir) {
- path = sdkDir
- } else {
- path = "$System.env.ANDROID_HOME"
- }
- } else {
- path = "$System.env.ANDROID_HOME"
- }
-
- def adb = path + "/platform-tools/adb"
- commandLine "$adb", 'shell', 'am', 'start', '-n', 'ch.asynk.zproject/ch.asynk.zproject.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.8
- targetCompatibility = 1.8
- }
-
- 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]]]
-
- iml {
- withXml {
- def node = it.asNode()
- def builder = NodeBuilder.newInstance();
- builder.current = node;
- builder.component(name: "FacetManager") {
- facet(type: "android", name: "Android") {
- configuration {
- option(name: "UPDATE_PROPERTY_FILES", value:"true")
- }
- }
- }
- }
- }
- }
-}
diff --git a/android/ic_launcher-web.png b/android/ic_launcher-web.png
deleted file mode 100644
index 8f0110d..0000000
--- a/android/ic_launcher-web.png
+++ /dev/null
Binary files differ
diff --git a/android/proguard-rules.pro b/android/proguard-rules.pro
deleted file mode 100644
index b166b1e..0000000
--- a/android/proguard-rules.pro
+++ /dev/null
@@ -1,45 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
--verbose
-
--dontwarn android.support.**
--dontwarn com.badlogic.gdx.backends.android.AndroidFragmentApplication
--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);
-}
-
--keepclassmembers class com.badlogic.gdx.physics.box2d.World {
- boolean contactFilter(long, long);
- void beginContact(long);
- void endContact(long);
- void preSolve(long, long);
- void postSolve(long, long);
- boolean reportFixture(long);
- float reportRayFixture(long, float, float, float, float, float);
-}
diff --git a/android/project.properties b/android/project.properties
deleted file mode 100644
index 3fefa92..0000000
--- a/android/project.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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
diff --git a/android/res/drawable-hdpi/ic_launcher.png b/android/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 91f696b..0000000
--- a/android/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_launcher.png b/android/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index c1ab239..0000000
--- a/android/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-xhdpi/ic_launcher.png b/android/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 2011cc0..0000000
--- a/android/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-xxhdpi/ic_launcher.png b/android/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 25fcef0..0000000
--- a/android/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/android/res/drawable-xxxhdpi/ic_launcher.png b/android/res/drawable-xxxhdpi/ic_launcher.png
deleted file mode 100644
index d109946..0000000
--- a/android/res/drawable-xxxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml
deleted file mode 100644
index b9780ad..0000000
--- a/android/res/values/strings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
- <string name="app_name">zproject</string>
-
-</resources>
diff --git a/android/res/values/styles.xml b/android/res/values/styles.xml
deleted file mode 100644
index 3f00fc5..0000000
--- a/android/res/values/styles.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<resources>
-
- <style name="GdxTheme" parent="android:Theme">
- <item name="android:windowBackground">@android:color/transparent</item>
- <item name="android:colorBackgroundCacheHint">@null</item>
- <item name="android:windowAnimationStyle">@android:style/Animation</item>
- <item name="android:windowNoTitle">true</item>
- <item name="android:windowContentOverlay">@null</item>
- <item name="android:windowFullscreen">true</item>
- </style>
-
-</resources>
diff --git a/android/src/ch/asynk/zproject/AndroidLauncher.java b/android/src/ch/asynk/zproject/AndroidLauncher.java
deleted file mode 100644
index a6060bf..0000000
--- a/android/src/ch/asynk/zproject/AndroidLauncher.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package ch.asynk.zproject;
-
-import android.os.Bundle;
-
-import com.badlogic.gdx.backends.android.AndroidApplication;
-import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
-import ch.asynk.zproject.ZProject;
-
-public class AndroidLauncher extends AndroidApplication {
- @Override
- protected void onCreate (Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
- initialize(new ZProject(), config);
- }
-}
diff --git a/assets/build.gradle b/assets/build.gradle
index 1ef0761..7cf2e15 100644
--- a/assets/build.gradle
+++ b/assets/build.gradle
@@ -9,18 +9,18 @@ dependencies {
defaultTasks 'build'
task clean(type: Delete) {
- delete '../android/assets'
+ delete '../desktop/build/assets'
}
task copyData(type: Copy) {
from 'data'
- into '../android/assets/data'
+ into '../desktop/build/assets'
}
task packLoading(type: JavaExec) {
main = 'com.badlogic.gdx.tools.texturepacker.TexturePacker'
classpath = configurations.texturePacker
- args = ['./loading', '../android/assets/data', 'loading']
+ args = ['./loading', '../desktop/build/assets', 'loading']
}
/* task buildUI(dependsOn: ["processXHDPI"]) { */
diff --git a/build.gradle b/build.gradle
index 4e567c0..e6a8e32 100644
--- a/build.gradle
+++ b/build.gradle
@@ -9,22 +9,15 @@ buildscript {
}
dependencies {
classpath 'org.wisepersist:gwt-gradle-plugin:1.0.6'
- classpath 'com.android.tools.build:gradle:3.1.0'
}
}
allprojects {
- apply plugin: "eclipse"
- apply plugin: "idea"
version = '1.0'
ext {
appName = "zproject"
gdxVersion = '1.9.8'
- roboVMVersion = '2.3.3'
- box2DLightsVersion = '1.4'
- ashleyVersion = '1.7.0'
- aiVersion = '1.8.0'
}
repositories {
@@ -46,28 +39,6 @@ project(":desktop") {
}
}
-project(":android") {
- apply plugin: "android"
-
- configurations { natives }
-
- dependencies {
- implementation project(":core")
- implementation "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"
- natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
- implementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
- natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
- natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
- natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
- natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
- natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
- }
-}
-
project(":core") {
apply plugin: "java"
@@ -85,8 +56,3 @@ task ctags(type: Exec) {
executable "ctags"
args "-R", "--language-force=java", "--exclude=*~", "-f.tags", "core/src/"
}
-
-
-tasks.eclipse.doLast {
- delete ".project"
-}
diff --git a/core/build.gradle b/core/build.gradle
index 13c049a..899883b 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -4,8 +4,3 @@ sourceCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.java.srcDirs = [ "src/" ]
-
-
-eclipse.project {
- name = appName + "-core"
-}
diff --git a/core/src/ch/asynk/zproject/Assets.java b/core/src/ch/asynk/zproject/Assets.java
index a5048e6..a2046e5 100644
--- a/core/src/ch/asynk/zproject/Assets.java
+++ b/core/src/ch/asynk/zproject/Assets.java
@@ -12,15 +12,15 @@ import com.badlogic.gdx.graphics.g2d.freetype.FreetypeFontLoader.FreeTypeFontLoa
public class Assets extends ch.asynk.zproject.engine.Assets
{
- public static final String LOADING = "data/loading.atlas";
+ public static final String LOADING = "loading.atlas";
- public static final String CORNER = "data/corner.png";
- public static final String MAP_00 = "data/map_00.png";
- public static final String CHESS = "data/chess.jpg";
- public static final String FONT = "data/veteran-typewriter.ttf";
+ public static final String CORNER = "corner.png";
+ public static final String MAP_00 = "map_00.png";
+ public static final String CHESS = "chess.jpg";
+ public static final String FONT = "veteran-typewriter.ttf";
public static final String FONT_20 = "size20.ttf";
public static final String FONT_25 = "size25.ttf";
- public static final String PATCH = "data/ui-patch.png";
+ public static final String PATCH = "ui-patch.png";
private final FreeTypeFontLoaderParameter params20;
private final FreeTypeFontLoaderParameter params25;
diff --git a/desktop/build.gradle b/desktop/build.gradle
index 9e8f006..d2b722e 100644
--- a/desktop/build.gradle
+++ b/desktop/build.gradle
@@ -6,7 +6,7 @@ sourceCompatibility = 1.8
sourceSets.main.java.srcDirs = [ "src/" ]
project.ext.mainClassName = "ch.asynk.zproject.desktop.DesktopLauncher"
-project.ext.assetsDir = new File("../android/assets");
+project.ext.assetsDir = new File("build/assets");
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
@@ -40,21 +40,3 @@ task dist(type: Jar) {
}
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)
- }
-}
diff --git a/settings.gradle b/settings.gradle
index 13eeafe..d957330 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1 @@
-include 'desktop', 'android', 'core', 'assets'
+include 'desktop', 'core', 'assets'