forked from ajhager/libgdx-sbt-project.g8
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Scala and SBT, switch Android plugin, remove iOS plugin
This big commit updates Scala to 2.11.1 and SBT to 0.13.5. It was possible because of new Android plugin. This template now uses https://github.com/pfn/android-sdk-plugin plugin. Directory layout of project was changed to mirror those of official gdx-setup.jar, though proguard rules are different - they are merge of rules from old project, gdx-setup.jar template rules and official android rules from proguard-android.txt. Proguard rules might still need some polishing, there are warnings, but they seem not influence normal working of Libgdx, so they are ignored for now. If something does not work due to bad proguard rule, open ticket and it will be fixed in template. Last, but not least, I disabled iOS code for now, due to few reasons: - ajhager#78 - roboscala/sbt-robovm#10 - default template from gdx-setup.jar looks different (it has three files) - I don't have iOS nor Mac to test/fix this stuff That's why I decided to remove those files and publish what I already got, and wait for patches from someone who has iOS or Mac and can test/fix iOS support in new template.
- Loading branch information
1 parent
8d96b2d
commit 5e8ab9c
Showing
26 changed files
with
202 additions
and
209 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
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 |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=0.11.3 | ||
sbt.version=0.13.5 |
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
23 changes: 9 additions & 14 deletions
23
...n/g8/android/src/main/AndroidManifest.xml → src/main/g8/android/AndroidManifest.xml
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 |
---|---|---|
@@ -1,29 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="$package$" | ||
android:installLocation="preferExternal" | ||
android:versionCode="1" | ||
android:versionName="0.1"> | ||
package="$package$" | ||
android:versionCode="1" | ||
android:versionName="0.1"> | ||
|
||
<uses-sdk android:minSdkVersion="10" | ||
android:targetSdkVersion="$api_level$" /> | ||
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="$api_level$" /> | ||
|
||
<application android:icon="@drawable/android:star_big_on" | ||
<application android:allowBackup="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:debuggable="true"> | ||
android:theme="@style/GdxTheme"> | ||
<activity android:name=".Main" | ||
android:label="@string/app_name" | ||
android:screenOrientation="portrait" | ||
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> | ||
|
||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
|
||
<uses-feature android:glEsVersion="0x00020000"/> | ||
|
||
<uses-feature android:glEsVersion="0x00020000" /> | ||
</manifest> |
File renamed without changes.
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,62 @@ | ||
# Keep Android backend | ||
-keep class com.badlogic.gdx.backends.android.** { *; } | ||
|
||
-keep public class com.badlogic.gdx.backends.android.AndroidVisibilityListener { | ||
public void createListener(com.badlogic.gdx.backends.android.AndroidApplication); | ||
} | ||
|
||
# Port from proguard-android.txt | ||
|
||
-dontusemixedcaseclassnames | ||
-dontskipnonpubliclibraryclasses | ||
-dontoptimize | ||
-dontpreverify | ||
|
||
-keepattributes *Annotation* | ||
-keep public class com.google.vending.licensing.ILicensingService | ||
-keep public class com.android.vending.licensing.ILicensingService | ||
|
||
-keepclasseswithmembernames class * { | ||
native <methods>; | ||
} | ||
|
||
-keepclassmembers public class * extends android.view.View { | ||
void set*(***); | ||
*** get*(); | ||
} | ||
|
||
-keepclassmembers class * extends android.app.Activity { | ||
public void *(android.view.View); | ||
} | ||
|
||
-keepclassmembers enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} | ||
|
||
-keep class * implements android.os.Parcelable { | ||
public static final android.os.Parcelable\$Creator *; | ||
} | ||
|
||
-keepclassmembers class **.R\$* { | ||
public static <fields>; | ||
} | ||
|
||
-dontwarn android.support.** | ||
|
||
# Port from proguard-project.txt of Libgdx template | ||
|
||
-dontwarn com.badlogic.gdx.backends.android.AndroidFragmentApplication | ||
|
||
-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); | ||
} | ||
|
||
# Keep Android backend | ||
#-keep class com.badlogic.gdx.backends.android.** { *; } | ||
# | ||
# Uncomment for Libgdx 1.0.0-SNAPSHOT | ||
#-keep public class com.badlogic.gdx.backends.android.AndroidVisibilityListener { | ||
# public void createListener(com.badlogic.gdx.backends.android.AndroidApplication); | ||
#} | ||
|
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,14 @@ | ||
# 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=../core/proguard-project.txt:proguard-project.txt | ||
|
||
# Project target. | ||
target=android-$api_level$ |
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.
5 changes: 4 additions & 1 deletion
5
...8/android/src/main/res/values/strings.xml → src/main/g8/android/res/values/strings.xml
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<string name="app_name">$name$</string> | ||
</resources> | ||
|
||
</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> |
This file was deleted.
Oops, something went wrong.
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
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
File renamed without changes.
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
name=My Game | ||
package=my.game.pkg | ||
api_level=19 | ||
scala_version=2.10.3 | ||
libgdx_version=0.9.9 | ||
scala_version=2.11.1 | ||
libgdx_version=1.2.0 | ||
verbatim=*.png |
1 change: 0 additions & 1 deletion
1
...op/src/main/manifest/META-INF/MANIFEST.MF → .../g8/desktop/manifest/META-INF/MANIFEST.MF
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
Main-Class: $package$.Main | ||
|
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=0.12.4 | ||
sbt.version=0.13.5 |
Oops, something went wrong.