diff --git a/README.md b/README.md index 9e23e215..56f5b6c6 100644 --- a/README.md +++ b/README.md @@ -41,25 +41,28 @@ Quick Start: Before you start, install JDK 11 or later. If you intend to build from Android Studio, skip this step as Android Studio bundles its own JDK 11. -Install Android SDK with SDK API 30 and Android NDK 21.3.6528147, set the environment variables: - -* `ANDROID_HOME` to your Android SDK location. - -(you may have to adjust the paths to the install directories of the Android SDK on your system) and run +Install Android SDK with SDK API 30 and Android NDK 21.3.6528147, set the environment variables `ANDROID_SDK_ROOT` to your +Android SDK location and run. ``` -$ ./gradlew assembleNormal +$ ./gradlew assembleNormalRecord ``` -in the root folder of this project. This should give you a .apk file in the `app/build/outputs/apk/normal` -subdirectory that you can then sign and install on your phone. The `normal` .apk flavor is what you normally have -when downloading one from love2d.org. +in the root folder of this project. This should give you a .apk file in the `app/build/outputs/apk/normalRecord` +subdirectory that you can then sign and install on your phone. The `normalRecord` .apk flavor is what you normally have +when downloading one from https://love2d.org. -If you want to put your game inside the APK, put your zipped \*.love in `app/src/main/assets` with name `game.love` -then change the package name, application display name, and the icons. Afterwards, run either `gradlew assembleEmbedRelease` -to generate APK which you can install or `gradlew bundleEmbedRelease` which you can upload to Play Store. +If you want to put your game inside the APK, you can either: -Alternatively, you can install Android Studio **2020.3.1** or later. After opening it for the first time, open it's SDK Manager +1. Put all your games in `app/src/embed/assets` such that your `main.lua` path is `app/src/embed/assets/main.lua`; or +2. Put your zipped \*.love in `app/src/embed/assets` with name `game.love` + +And change the package name, application version string and codes, application display name, and the icons. Afterwards, +run either `gradlew assembleEmbedNoRecordRelease` (or `gradlew assembleEmbedRecordRelease` if your game uses microphone) to +generate APK which you can install or `gradlew bundleEmbedNoRecordRelease` (or `gradlew bundleEmbedRecordRelease`) which you +can upload to Play Store. + +Alternatively, you can install Android Studio **2020.3.1** or later. After opening it for the first time, open its SDK Manager and on the tab "SDK Tools", tick "Show Package Details" then select NDK (Side By Side) version 21.3.6528147. After that, open the repository root. @@ -69,7 +72,7 @@ Bugs: ----- Bugs and/or feature requests should be reported to the issue tracker at: -* https://github.com/love2d/love-android/issues - for internal, LÖVE-Android-specific stuff +* https://github.com/love2d/love-android/issues - LÖVE-Android-specific issues * https://github.com/love2d/love/issues - for LÖVE in general Changelog: diff --git a/app/build.gradle b/app/build.gradle index f90f3643..5279e879 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,17 +17,19 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - flavorDimensions 'mode' + flavorDimensions 'mode', 'recording' productFlavors { normal { dimension 'mode' } - playstore { - dimension 'mode' - } embed { dimension 'mode' - applicationIdSuffix '.embed' + } + record { + dimension 'recording' + } + noRecord { + dimension 'recording' } } lintOptions { diff --git a/app/src/embed/AndroidManifest.xml b/app/src/embed/AndroidManifest.xml deleted file mode 100644 index 47a8f623..00000000 --- a/app/src/embed/AndroidManifest.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1751e875..21f0e4ad 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,12 +1,12 @@ - + - - + @@ -26,66 +26,24 @@ android:allowBackup="true" android:icon="@drawable/love" android:label="LÖVE for Android" - android:usesCleartextTraffic="true" - android:hardwareAccelerated="true" > - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/app/src/playstore/AndroidManifest.xml b/app/src/norecord/AndroidManifest.xml similarity index 100% rename from app/src/playstore/AndroidManifest.xml rename to app/src/norecord/AndroidManifest.xml diff --git a/app/src/normal/AndroidManifest.xml b/app/src/normal/AndroidManifest.xml index 2398d67c..0d0829d5 100644 --- a/app/src/normal/AndroidManifest.xml +++ b/app/src/normal/AndroidManifest.xml @@ -1,2 +1,58 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.gradle b/build.gradle index 30073123..61f2373e 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,11 @@ allprojects { google() mavenCentral() } + gradle.projectsEvaluated { + tasks.withType(JavaCompile) { + options.compilerArgs << "-Xlint:deprecation" + } + } } buildscript { diff --git a/love/build.gradle b/love/build.gradle index 6dd096e4..4e5d2657 100644 --- a/love/build.gradle +++ b/love/build.gradle @@ -78,9 +78,6 @@ android { normal { dimension 'mode' } - playstore { - dimension 'mode' - } embed { dimension 'mode' resValue 'bool', 'embed', 'true' @@ -94,11 +91,6 @@ android { srcDirs += retrieveAll3pModules() } } - playstore { - java { - srcDir 'src/normal/java' - } - } } externalNativeBuild { ndkBuild {