Skip to content

Commit 50d8441

Browse files
committed
Initial commit
0 parents  commit 50d8441

File tree

94 files changed

+1682
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1682
-0
lines changed

.gitignore

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
## Gradle
2+
.gradle
3+
gradle-app.setting
4+
build/
5+
6+
## Java:
7+
*.class
8+
*.war
9+
*.ear
10+
hs_err_pid*
11+
.attach_pid*
12+
13+
## Android:
14+
android/libs/armeabi/
15+
android/libs/armeabi-v7a/
16+
android/libs/x86/
17+
android/gen/
18+
local.properties
19+
com_crashlytics_export_strings.xml
20+
21+
## GWT:
22+
war/
23+
html/war/gwt_bree/
24+
html/gwt-unitCache/
25+
.apt_generated/
26+
html/war/WEB-INF/deploy/
27+
html/war/WEB-INF/classes/
28+
.gwt/
29+
gwt-unitCache/
30+
www-test/
31+
.gwt-tmp/
32+
*.symbolMap
33+
34+
## IntelliJ, Android Studio:
35+
.idea/
36+
*.ipr
37+
*.iws
38+
*.iml
39+
out/
40+
41+
## Eclipse
42+
.classpath
43+
.project
44+
.metadata
45+
**/bin/
46+
tmp/
47+
*.tmp
48+
*.bak
49+
*.swp
50+
*~.nib
51+
.settings/
52+
.loadpath
53+
.externalToolBuilders/
54+
*.launch
55+
56+
## NetBeans
57+
**/nbproject/private/
58+
nbbuild/
59+
dist/
60+
nbdist/
61+
nbactions.xml
62+
nb-configuration.xml
63+
64+
## OS Specific
65+
.DS_Store
66+
67+
## Miscellaneous
68+
*~
69+
*.*#
70+
*#*#

android/AndroidManifest.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="dDev.tech">
4+
<application
5+
android:allowBackup="true"
6+
android:icon="@drawable/ic_launcher"
7+
android:isGame="true"
8+
android:appCategory="game"
9+
android:label="@string/app_name"
10+
android:theme="@style/GdxTheme">
11+
<activity
12+
android:name="dDev.tech.AndroidLauncher"
13+
android:label="@string/app_name"
14+
android:screenOrientation="landscape"
15+
android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|screenLayout">
16+
<intent-filter>
17+
<action android:name="android.intent.action.MAIN"/>
18+
<category android:name="android.intent.category.LAUNCHER"/>
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
<uses-permission android:name="android.permission.INTERNET" />
23+
</manifest>

android/build.gradle

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
apply plugin: 'com.android.application'
2+
3+
4+
android {
5+
compileSdkVersion 29
6+
sourceSets {
7+
main {
8+
manifest.srcFile 'AndroidManifest.xml'
9+
java.srcDirs = ['src/main/java']
10+
aidl.srcDirs = ['src/main/java']
11+
renderscript.srcDirs = ['src/main/java']
12+
res.srcDirs = ['res']
13+
assets.srcDirs = ['../assets']
14+
jniLibs.srcDirs = ['libs']
15+
}
16+
}
17+
packagingOptions {
18+
// Preventing from license violations (more or less):
19+
pickFirst 'META-INF/LICENSE.txt'
20+
pickFirst 'META-INF/LICENSE'
21+
pickFirst 'META-INF/license.txt'
22+
pickFirst 'META-INF/LGPL2.1'
23+
pickFirst 'META-INF/NOTICE.txt'
24+
pickFirst 'META-INF/NOTICE'
25+
pickFirst 'META-INF/notice.txt'
26+
// Excluding unnecessary meta-data:
27+
exclude 'META-INF/robovm/ios/robovm.xml'
28+
exclude 'META-INF/DEPENDENCIES.txt'
29+
exclude 'META-INF/DEPENDENCIES'
30+
exclude 'META-INF/dependencies.txt'
31+
}
32+
defaultConfig {
33+
applicationId 'dDev.tech'
34+
minSdkVersion 19
35+
targetSdkVersion 29
36+
versionCode 1
37+
versionName "1.0"
38+
multiDexEnabled true
39+
}
40+
compileOptions {
41+
sourceCompatibility "8.0"
42+
targetCompatibility "8.0"
43+
coreLibraryDesugaringEnabled true
44+
}
45+
46+
buildTypes {
47+
release {
48+
minifyEnabled false
49+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
50+
}
51+
}
52+
53+
}
54+
55+
repositories {
56+
// needed for AAPT2, may be needed for other tools
57+
google()
58+
}
59+
60+
configurations { natives }
61+
62+
dependencies {
63+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'
64+
implementation project(':core')
65+
implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
66+
implementation "com.github.MrStahlfelge.gdx-websockets:common:$websocketVersion"
67+
68+
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
69+
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
70+
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
71+
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
72+
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
73+
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
74+
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
75+
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a"
76+
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
77+
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
78+
79+
}
80+
81+
// Called every time gradle gets executed, takes the native dependencies of
82+
// the natives configuration, and extracts them to the proper libs/ folders
83+
// so they get packed with the APK.
84+
task copyAndroidNatives() {
85+
doFirst {
86+
file("libs/armeabi/").mkdirs()
87+
file("libs/armeabi-v7a/").mkdirs()
88+
file("libs/arm64-v8a/").mkdirs()
89+
file("libs/x86_64/").mkdirs()
90+
file("libs/x86/").mkdirs()
91+
92+
configurations.getByName("natives").copy().files.each { jar ->
93+
def outputDir = null
94+
if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
95+
if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
96+
if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
97+
if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
98+
if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
99+
if(outputDir != null) {
100+
copy {
101+
from zipTree(jar)
102+
into outputDir
103+
include "*.so"
104+
}
105+
}
106+
}
107+
}
108+
}
109+
110+
tasks.whenTaskAdded { packageTask ->
111+
if (packageTask.name.contains("package")) {
112+
packageTask.dependsOn 'copyAndroidNatives'
113+
}
114+
}
115+
116+
task run(type: Exec) {
117+
def path
118+
def localProperties = project.file("../local.properties")
119+
if (localProperties.exists()) {
120+
Properties properties = new Properties()
121+
localProperties.withInputStream { instr ->
122+
properties.load(instr)
123+
}
124+
def sdkDir = properties.getProperty('sdk.dir')
125+
if (sdkDir) {
126+
path = sdkDir
127+
} else {
128+
path = "$System.env.ANDROID_HOME"
129+
}
130+
} else {
131+
path = "$System.env.ANDROID_HOME"
132+
}
133+
134+
def adb = path + "/platform-tools/adb"
135+
commandLine "$adb", 'shell', 'am', 'start', '-n', 'dDev.tech/dDev.tech.AndroidLauncher'
136+
}
137+
138+
eclipse.project.name = appName + "-android"

android/ic_launcher-web.png

6.7 KB
Loading
234 KB
Binary file not shown.

android/libs/arm64-v8a/libgdx.so

162 KB
Binary file not shown.

android/libs/x86_64/libgdx-box2d.so

266 KB
Binary file not shown.

android/libs/x86_64/libgdx.so

183 KB
Binary file not shown.

android/proguard-project.txt

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
4+
# Add project specific ProGuard rules here.
5+
# By default, the flags in this file are appended to flags specified
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
9+
#
10+
# For more details, see
11+
# http://developer.android.com/guide/developing/tools/proguard.html
12+
13+
# Add any project specific keep options here:
14+
15+
# If your project uses WebView with JS, uncomment the following
16+
# and specify the fully qualified class name to the JavaScript interface
17+
# class:
18+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19+
# public *;
20+
#}
21+
22+
-verbose
23+
24+
-dontwarn android.support.**
25+
-dontwarn com.badlogic.gdx.backends.android.AndroidFragmentApplication
26+
-dontwarn com.badlogic.gdx.utils.GdxBuild
27+
-dontwarn com.badlogic.gdx.physics.box2d.utils.Box2DBuild
28+
-dontwarn com.badlogic.gdx.jnigen.BuildTarget*
29+
-dontwarn com.badlogic.gdx.graphics.g2d.freetype.FreetypeBuild
30+
31+
-keep class com.badlogic.gdx.controllers.android.AndroidControllers
32+
33+
-keepclassmembers class com.badlogic.gdx.backends.android.AndroidInput* {
34+
<init>(com.badlogic.gdx.Application, android.content.Context, java.lang.Object, com.badlogic.gdx.backends.android.AndroidApplicationConfiguration);
35+
}
36+
37+
-keepclassmembers class com.badlogic.gdx.physics.box2d.World {
38+
boolean contactFilter(long, long);
39+
void beginContact(long);
40+
void endContact(long);
41+
void preSolve(long, long);
42+
void postSolve(long, long);
43+
boolean reportFixture(long);
44+
float reportRayFixture(long, float, float, float, float, float);
45+
}

android/project.properties

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-19
1.35 KB
Loading
1015 Bytes
Loading
1.62 KB
Loading
2.25 KB
Loading

android/res/values/strings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="app_name">SpaceGame</string>
4+
</resources>

android/res/values/styles.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<resources>
2+
<style name="GdxTheme" parent="android:Theme">
3+
<item name="android:windowBackground">@android:color/transparent</item>
4+
<item name="android:colorBackgroundCacheHint">@null</item>
5+
<item name="android:windowAnimationStyle">@android:style/Animation</item>
6+
<item name="android:windowNoTitle">true</item>
7+
<item name="android:windowContentOverlay">@null</item>
8+
<item name="android:windowFullscreen">true</item>
9+
</style>
10+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package dDev.tech;
2+
3+
import android.os.Bundle;
4+
5+
import com.badlogic.gdx.backends.android.AndroidApplication;
6+
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
7+
import com.github.czyzby.websocket.CommonWebSockets;
8+
import dDev.tech.SpaceGame;
9+
10+
/** Launches the Android application. */
11+
public class AndroidLauncher extends AndroidApplication {
12+
@Override
13+
protected void onCreate(Bundle savedInstanceState) {
14+
super.onCreate(savedInstanceState);
15+
CommonWebSockets.initiate();
16+
AndroidApplicationConfiguration configuration = new AndroidApplicationConfiguration();
17+
initialize(new SpaceGame(), configuration);
18+
}
19+
}

build.gradle

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
buildscript {
2+
repositories {
3+
mavenLocal()
4+
mavenCentral()
5+
google()
6+
gradlePluginPortal()
7+
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
8+
}
9+
dependencies {
10+
classpath "org.wisepersist:gwt-gradle-plugin:$gwtPluginVersion"
11+
classpath "com.android.tools.build:gradle:$androidPluginVersion"
12+
classpath "com.mobidevelop.robovm:robovm-gradle-plugin:$robovmVersion"
13+
}
14+
}
15+
16+
allprojects {
17+
apply plugin: 'eclipse'
18+
apply plugin: 'idea'
19+
}
20+
21+
configure(subprojects - project(':android')) {
22+
apply plugin: 'java-library'
23+
sourceCompatibility = 8.0
24+
compileJava {
25+
options.incremental = true
26+
}
27+
}
28+
29+
subprojects {
30+
version = '0.0.1'
31+
ext.appName = 'SpaceGame'
32+
repositories {
33+
mavenLocal()
34+
mavenCentral()
35+
gradlePluginPortal()
36+
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
37+
maven { url 'https://jitpack.io' }
38+
}
39+
}
40+
41+
eclipse.project.name = 'SpaceGame' + '-parent'

core/build.gradle

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
2+
eclipse.project.name = appName + '-core'
3+
4+
dependencies {
5+
api "com.badlogicgames.gdx:gdx:$gdxVersion"
6+
api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
7+
api "com.badlogicgames.box2dlights:box2dlights:$box2dlightsVersion"
8+
api "com.badlogicgames.gdx:gdx-ai:$aiVersion"
9+
api "com.kotcrab.vis:vis-ui:$visUiVersion"
10+
api "space.earlygrey:shapedrawer:$shapeDrawerVersion"
11+
api "com.github.MrStahlfelge.gdx-websockets:serialization:$websocketSerializationVersion"
12+
api "com.github.MrStahlfelge.gdx-websockets:core:$websocketVersion"
13+
api "com.crashinvaders.vfx:gdx-vfx-core:$gdxVfxCoreVersion"
14+
api "com.crashinvaders.vfx:gdx-vfx-effects:$gdxVfxEffectsVersion"
15+
api "com.badlogicgames.gdxpay:gdx-pay-client:$gdxPayVersion"
16+
api project(':shared')
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.2//EN" "http://www.gwtproject.org/doctype/2.8.2/gwt-module.dtd">
3+
<module>
4+
<source path="" />
5+
6+
</module>

0 commit comments

Comments
 (0)