aboutsummaryrefslogtreecommitdiff
path: root/build/android/src
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2016-04-13 14:14:04 -0400
committerShadowNinja <shadowninja@minetest.net>2016-04-28 12:28:42 -0400
commite41673820ffe200df78b1ec185ccb9d9ca962ae1 (patch)
tree94c0fda8c113920eb07bc97d03c7c551f8b6146f /build/android/src
parent7baddd173591cc9394d57cdb265f978495314f7a (diff)
downloadminetest-e41673820ffe200df78b1ec185ccb9d9ca962ae1.tar.gz
minetest-e41673820ffe200df78b1ec185ccb9d9ca962ae1.tar.bz2
minetest-e41673820ffe200df78b1ec185ccb9d9ca962ae1.zip
Upgrade Android build to Gradle build system
The old Ant build system has been deprecated for a while and new development is focused on Gradle. I also removed a hardcoded string that lint caught and moved the patch files to a subdirectory. I left the JNI files in the root directory.
Diffstat (limited to 'build/android/src')
-rw-r--r--build/android/src/debug/AndroidManifest.xml4
-rw-r--r--build/android/src/main/AndroidManifest.xml34
-rw-r--r--build/android/src/main/java/net.minetest.minetest/MinetestAssetCopy.java (renamed from build/android/src/net/minetest/minetest/MinetestAssetCopy.java)0
-rw-r--r--build/android/src/main/java/net.minetest.minetest/MinetestTextEntry.java (renamed from build/android/src/net/minetest/minetest/MinetestTextEntry.java)0
-rw-r--r--build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java (renamed from build/android/src/net/minetest/minetest/MtNativeActivity.java)0
-rw-r--r--build/android/src/main/res/drawable-hdpi/irr_icon.pngbin0 -> 5490 bytes
-rw-r--r--build/android/src/main/res/drawable-ldpi/irr_icon.pngbin0 -> 2262 bytes
-rw-r--r--build/android/src/main/res/drawable-mdpi/irr_icon.pngbin0 -> 3110 bytes
-rw-r--r--build/android/src/main/res/drawable-xhdpi/irr_icon.pngbin0 -> 7610 bytes
-rw-r--r--build/android/src/main/res/layout/assetcopy.xml24
-rw-r--r--build/android/src/main/res/values/strings.xml5
-rw-r--r--build/android/src/main/res/values/styles.xml11
12 files changed, 78 insertions, 0 deletions
diff --git a/build/android/src/debug/AndroidManifest.xml b/build/android/src/debug/AndroidManifest.xml
new file mode 100644
index 000000000..a3815b9f8
--- /dev/null
+++ b/build/android/src/debug/AndroidManifest.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-permission android:name="android.permission.SET_DEBUG_APP" />
+</manifest>
diff --git a/build/android/src/main/AndroidManifest.xml b/build/android/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..df218fb33
--- /dev/null
+++ b/build/android/src/main/AndroidManifest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="net.minetest.minetest"
+ android:installLocation="auto">
+ <uses-feature android:glEsVersion="0x00010000" android:required="true"/>
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <application android:icon="@drawable/irr_icon"
+ android:label="${project}"
+ android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+ android:allowBackup="true">
+ <activity android:name=".MtNativeActivity"
+ android:label="${project}"
+ android:launchMode="singleTask"
+ android:configChanges="orientation|keyboard|keyboardHidden|navigation"
+ android:screenOrientation="sensorLandscape"
+ android:clearTaskOnLaunch="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ <meta-data android:name="android.app.lib_name" android:value="minetest" />
+ </activity>
+ <activity android:name=".MinetestTextEntry"
+ android:theme="@style/Theme.Transparent"
+ android:excludeFromRecents="true">
+ </activity>
+ <activity android:name=".MinetestAssetCopy"
+ android:theme="@style/Theme.Transparent"
+ android:excludeFromRecents="true">
+ </activity>
+ </application>
+</manifest>
diff --git a/build/android/src/net/minetest/minetest/MinetestAssetCopy.java b/build/android/src/main/java/net.minetest.minetest/MinetestAssetCopy.java
index eb92acb63..eb92acb63 100644
--- a/build/android/src/net/minetest/minetest/MinetestAssetCopy.java
+++ b/build/android/src/main/java/net.minetest.minetest/MinetestAssetCopy.java
diff --git a/build/android/src/net/minetest/minetest/MinetestTextEntry.java b/build/android/src/main/java/net.minetest.minetest/MinetestTextEntry.java
index 68dc73274..68dc73274 100644
--- a/build/android/src/net/minetest/minetest/MinetestTextEntry.java
+++ b/build/android/src/main/java/net.minetest.minetest/MinetestTextEntry.java
diff --git a/build/android/src/net/minetest/minetest/MtNativeActivity.java b/build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java
index fc95a8379..fc95a8379 100644
--- a/build/android/src/net/minetest/minetest/MtNativeActivity.java
+++ b/build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java
diff --git a/build/android/src/main/res/drawable-hdpi/irr_icon.png b/build/android/src/main/res/drawable-hdpi/irr_icon.png
new file mode 100644
index 000000000..0b6861a0d
--- /dev/null
+++ b/build/android/src/main/res/drawable-hdpi/irr_icon.png
Binary files differ
diff --git a/build/android/src/main/res/drawable-ldpi/irr_icon.png b/build/android/src/main/res/drawable-ldpi/irr_icon.png
new file mode 100644
index 000000000..b8c5d0177
--- /dev/null
+++ b/build/android/src/main/res/drawable-ldpi/irr_icon.png
Binary files differ
diff --git a/build/android/src/main/res/drawable-mdpi/irr_icon.png b/build/android/src/main/res/drawable-mdpi/irr_icon.png
new file mode 100644
index 000000000..951a7f8c1
--- /dev/null
+++ b/build/android/src/main/res/drawable-mdpi/irr_icon.png
Binary files differ
diff --git a/build/android/src/main/res/drawable-xhdpi/irr_icon.png b/build/android/src/main/res/drawable-xhdpi/irr_icon.png
new file mode 100644
index 000000000..2ec528ef7
--- /dev/null
+++ b/build/android/src/main/res/drawable-xhdpi/irr_icon.png
Binary files differ
diff --git a/build/android/src/main/res/layout/assetcopy.xml b/build/android/src/main/res/layout/assetcopy.xml
new file mode 100644
index 000000000..1fcfffd65
--- /dev/null
+++ b/build/android/src/main/res/layout/assetcopy.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <ProgressBar
+ android:id="@+id/progressBar1"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical" />
+
+ <TextView
+ android:id="@+id/textView1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="middle"
+ android:singleLine="true"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/preparing_media"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+
+</LinearLayout>
diff --git a/build/android/src/main/res/values/strings.xml b/build/android/src/main/res/values/strings.xml
new file mode 100644
index 000000000..b407a77c6
--- /dev/null
+++ b/build/android/src/main/res/values/strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="preparing_media">Preparing media...</string>
+</resources>
+
diff --git a/build/android/src/main/res/values/styles.xml b/build/android/src/main/res/values/styles.xml
new file mode 100644
index 000000000..25b8df5a3
--- /dev/null
+++ b/build/android/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="Theme.Transparent" parent="android:Theme">
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowIsFloating">true</item>
+ <item name="android:backgroundDimEnabled">false</item>
+ </style>
+</resources> \ No newline at end of file