-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3796736
Showing
30 changed files
with
914 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
## Java | ||
|
||
*.class | ||
*.war | ||
*.ear | ||
hs_err_pid* | ||
|
||
## Robovm | ||
/ios/robovm-build/ | ||
|
||
## GWT | ||
/html/war/ | ||
/html/gwt-unitCache/ | ||
.apt_generated/ | ||
.gwt/ | ||
gwt-unitCache/ | ||
www-test/ | ||
.gwt-tmp/ | ||
|
||
## Android Studio and Intellij and Android in general | ||
/android/libs/armeabi/ | ||
/android/libs/armeabi-v7a/ | ||
/android/libs/arm64-v8a/ | ||
/android/libs/x86/ | ||
/android/libs/x86_64/ | ||
/android/gen/ | ||
.idea/ | ||
*.ipr | ||
*.iws | ||
*.iml | ||
/android/out/ | ||
com_crashlytics_export_strings.xml | ||
|
||
## Eclipse | ||
|
||
.classpath | ||
.project | ||
.metadata/ | ||
/android/bin/ | ||
/core/bin/ | ||
/desktop/bin/ | ||
/html/bin/ | ||
/ios/bin/ | ||
/ios-moe/bin/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
.settings/ | ||
.loadpath | ||
.externalToolBuilders/ | ||
*.launch | ||
|
||
## NetBeans | ||
|
||
/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 | ||
|
||
/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/ | ||
|
||
/ios-moe/xcode/*.xcodeproj/* | ||
!/ios-moe/xcode/*.xcodeproj/xcshareddata | ||
!/ios-moe/xcode/*.xcodeproj/project.pbxproj | ||
/ios-moe/xcode/native/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "partly_solid_bicycle"] | ||
path = partly_solid_bicycle | ||
url = https://github.com/AlexeyBond/partly-solid-bicycle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.github.oldnpluslusteam.old39_game" > | ||
|
||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="20" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/GdxTheme" > | ||
<activity | ||
android:name="com.github.oldnpluslusteam.old39_game.AndroidLauncher" | ||
android:label="@string/app_name" | ||
android:screenOrientation="landscape" | ||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
android { | ||
buildToolsVersion "23.0.2" | ||
compileSdkVersion 20 | ||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
java.srcDirs = ['src'] | ||
aidl.srcDirs = ['src'] | ||
renderscript.srcDirs = ['src'] | ||
res.srcDirs = ['res'] | ||
assets.srcDirs = ['assets'] | ||
jniLibs.srcDirs = ['libs'] | ||
} | ||
|
||
instrumentTest.setRoot('tests') | ||
} | ||
packagingOptions { | ||
exclude 'META-INF/robovm/ios/robovm.xml' | ||
} | ||
defaultConfig { | ||
applicationId "com.github.oldnpluslusteam.old39_game" | ||
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() { | ||
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', 'com.github.oldnpluslusteam.old39_game/com.github.oldnpluslusteam.old39_game.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]]] | ||
|
||
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") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<string name="app_name">old-39-game</string> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<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> |
20 changes: 20 additions & 0 deletions
20
android/src/com/github/oldnpluslusteam/old39_game/AndroidLauncher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.github.oldnpluslusteam.old39_game; | ||
|
||
import android.os.Bundle; | ||
|
||
import com.badlogic.gdx.backends.android.AndroidApplication; | ||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; | ||
import com.github.alexeybond.partly_solid_bicycle.ioc.IoC; | ||
import com.github.alexeybond.partly_solid_bicycle.ioc.ch.ThreadLocalContext; | ||
import com.github.oldnpluslusteam.old39_game.TheGame; | ||
|
||
public class AndroidLauncher extends AndroidApplication { | ||
@Override | ||
protected void onCreate (Bundle savedInstanceState) { | ||
IoC.init(new ThreadLocalContext()); | ||
super.onCreate(savedInstanceState); | ||
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); | ||
config.stencil = 8; | ||
initialize(new TheGame(), config); | ||
} | ||
} |
Oops, something went wrong.