Compare commits

...

47 Commits

Author SHA1 Message Date
Miku AuahDark 4c65fff4f8 Remove some legacy options after Gradle migration. 2026-07-25 15:31:40 +08:00
Miku AuahDark fe15119efc Update Gradle and AGP to 9.5 and 9.3.1. 2026-07-25 13:43:26 +08:00
Miku AuahDark ceae396832 Update LOVE to love2d/love@792690b. 2026-07-25 13:12:42 +08:00
Miku AuahDark 5d8800f138 Update megasource to love2d/megasource@5118c13. 2026-07-25 13:06:00 +08:00
Sasha Szpakowski 3fb8ead63d update megasource submodule. 2026-06-30 19:58:24 -03:00
Sasha Szpakowski dd6a211cdc Update LOVE submodule. 2026-06-30 19:33:00 -03:00
Miku AuahDark 007d258cb4 Add CMake minimum policy version to build.gradle
If user is compiling with CMake 4, ensure it doesn't fail.

Issue #300.
2026-02-16 09:01:46 +08:00
Miku AuahDark b375d142fd Update LOVE submodule. 2026-01-08 11:02:13 +08:00
Miku AuahDark 871ceb314d Update AGP to 8.13.2. 2026-01-08 09:45:31 +08:00
Miku AuahDark 4290c0b614 Update submodules. 2025-11-07 18:44:16 +08:00
Miku AuahDark 39bdc40087 Update LOVE submodule. 2025-06-30 15:54:30 +08:00
Miku AuahDark 9bdd400b00 Disable precompiled headers across the whole project.
This cause some intermittent build errors.
2025-06-30 13:36:04 +08:00
Miku AuahDark 12430bf8a7 Update LOVE submodule. 2025-01-30 19:16:43 +08:00
Miku AuahDark bb2e250575 Update Megasource. 2025-01-30 12:20:01 +08:00
Miku AuahDark d0f7ff7085 Update LOVE submodule. 2025-01-30 12:10:51 +08:00
Miku AuahDark 85ac733fa4 Use ordinary content:// protocol instead of love2d://. 2025-01-16 17:20:35 +08:00
Miku AuahDark 3ad966dbe7 Update LOVE submodule. 2024-12-31 14:46:22 +08:00
Miku AuahDark fa88c64ceb Update submodules. 2024-12-28 11:05:12 +08:00
Miku AuahDark 9b340ae150 Update build.gradle dependencies. 2024-12-28 11:04:11 +08:00
Miku AuahDark b0420d94ca Update submodules. 2024-12-15 12:19:42 +08:00
Miku AuahDark 18d3e8e7cb Change git submodule branch. 2024-11-04 00:57:54 +08:00
Miku AuahDark dcd27223bf Fix game loading through game selector. 2024-10-13 14:11:40 +08:00
Miku AuahDark f585f05839 Update to SDL3 and target Android 15.
Currently game selection (the "LOVE Loader") equivalent is currently broken, but it will be addressed in future cleanup.
2024-10-13 12:35:42 +08:00
Miku AuahDark e8e3eb3d1a Update Megasource. 2024-10-13 12:34:46 +08:00
Miku AuahDark 44b0650f14 Update LOVE submodule. 2024-10-13 10:58:21 +08:00
Miku AuahDark d99f8ce8a5 Update Megasource and LOVE submodule. 2024-10-12 18:50:09 +08:00
Miku AuahDark 5ba547b0cc Update AGP to 8.7.0 and Gradle to 8.9. 2024-10-12 13:04:59 +08:00
Miku AuahDark ba5dad82ba Update NDK and Gradle lib dependencies. 2024-10-12 12:10:16 +08:00
Miku AuahDark d442728e01 Update LOVE submodule. 2024-06-23 19:34:56 +08:00
Miku AuahDark b09380d98b Remove Java function GameActivity.openURLFromLOVE()
SDL_OpenURL() is now used instead.
2024-06-21 10:46:35 +08:00
Miku AuahDark b128cb6067 Update LOVE submodule. 2024-06-21 10:46:18 +08:00
Miku AuahDark 0a81d4e4ea Bump minimum OpenGLES version from 2.0 to 3.0. 2024-06-20 16:29:54 +08:00
Miku AuahDark 9bcd419d92 Update LOVE submodule. 2024-06-20 16:29:00 +08:00
Miku AuahDark 46583c9fce Update Megasource and LOVE submodule. 2024-06-18 11:52:42 +08:00
Miku AuahDark cf9a5311c7 Add Vulkan 1.1 feature manifest. 2024-04-27 12:48:06 +08:00
Miku AuahDark 30a2dafd69 Update LOVE submodule. 2024-04-27 12:43:08 +08:00
Miku AuahDark 7a5c5eb507 Update Megasource and LOVE. 2024-04-24 17:01:07 +08:00
Miku AuahDark 50192f4e4a Additionally load libliblove.so before loading liblove.so after CMake modernization.
https://github.com/love2d/love/pull/2036#pullrequestreview-1967673996
2024-03-31 12:44:13 +08:00
Miku AuahDark 7efdfefe74 Update megasource and love. 2024-03-31 12:43:59 +08:00
Miku AuahDark ce70a64606 Ensure app/src/embed/assets directory is available when cloning the repository. 2024-03-20 11:29:30 +08:00
Miku AuahDark abfd0a7021 Update LOVE submodule.
Fixed `love.graphics.newVideo` failing on Adreno GPUs.
2024-03-18 10:50:04 +08:00
Miku AuahDark 28f7c4a8db Don't set the intent to null, only set the intent data to null.
Cherry-picked from d1f74df686. Closes #268.
2024-03-18 10:49:39 +08:00
Miku AuahDark c73f7fec23 Change the GRADLE_OPTS to alleviate out of memory errors when compiling. 2024-03-16 11:04:53 +08:00
Miku AuahDark 7fd649271a Workaround Java out of memory error. 2024-02-23 13:24:22 +08:00
Miku AuahDark 8b72016703 Fix debug symbol artifact. 2024-02-23 11:44:47 +08:00
Miku AuahDark aab23aded7 Update LOVE and Megasource submodule. 2024-02-23 11:32:39 +08:00
Miku AuahDark 590f733790 Drop support for 32-bit x86 Android.
32-bit x86 Android is declining rapidly and it's possible that future Android NDK will drop this architecture (android/ndk#1772).

Also related issue: love2d/love#1889.
2024-02-23 11:28:39 +08:00
12 changed files with 46 additions and 71 deletions
+3 -1
View File
@@ -8,6 +8,8 @@ jobs:
strategy:
matrix:
build_type: [Debug, Release]
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs='-Xmx4G'"
steps:
- name: Prepare Environment
run: sudo apt-get update && curl -Lo kitware-archive.sh https://apt.kitware.com/kitware-archive.sh && sudo bash ./kitware-archive.sh
@@ -62,4 +64,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: love-android-unstripped-debugsyms-${{ matrix.build_type }}
path: love/build/intermediates/library_jni
path: app/build/intermediates/cxx
+2 -2
View File
@@ -1,8 +1,8 @@
[submodule "app/src/main/cpp/love"]
path = app/src/main/cpp/love
url = https://github.com/love2d/love
branch = 12.0-development
branch = main
[submodule "app/src/main/cpp/megasource"]
path = app/src/main/cpp/megasource
url = https://github.com/love2d/megasource
branch = 12.x
branch = main
+20 -14
View File
@@ -6,28 +6,34 @@ plugins {
android {
namespace "org.love2d.android"
ndkVersion "26.1.10909125"
ndkVersion '27.3.13750724'
defaultConfig {
applicationId project.properties["app.application_id"]
versionCode project.properties["app.version_code"].toInteger()
versionName project.properties["app.version_name"]
minSdk 23
compileSdk 34
targetSdk 34
compileSdk = 35
targetSdk 35
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_shared"
arguments "-DANDROID_STL=c++_shared", "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=1", "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", "-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON", "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
// https://issuetracker.google.com/issues/274493986
// Transitive shared library that's added through `add_dependencies` is not taken into
// account. This result in liboboe.so and libluajit.so not get included into the final
// APK. "love" target depends on LuaJIT, and OpenAL that depends on oboe::oboe. So,
// add "OpenAL" and "love" target.
// APK. "love" target depends on LuaJIT, and "OpenAL" target depends on oboe::oboe
// (which provides liboboe.so). So, add "OpenAL" and "love" target.
targets "love_android", "OpenAL", "love"
}
}
ndk {
//noinspection ChromeOsAbiSupport
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
debugSymbolLevel 'full'
}
def getAppName = {
def nameArray = project.properties["app.name_byte_array"]
def name = project.properties["app.name"]
@@ -118,7 +124,7 @@ android {
sourceSets {
main {
java {
srcDir 'src/main/cpp/megasource/libs/SDL2/android-project/app/src/main/java'
srcDir 'src/main/cpp/megasource/libs/SDL3/android-project/app/src/main/java'
srcDir 'src/main/java'
srcDir 'src/main/cpp/love/src/libraries/luahttps/src/android/java'
srcDirs += retrieveAll3pModules()
@@ -162,14 +168,14 @@ android {
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment:2.7.3'
implementation 'androidx.navigation:navigation-ui:2.7.3'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'androidx.navigation:navigation-fragment:2.8.5'
implementation 'androidx.navigation:navigation-ui:2.8.5'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.google.oboe:oboe:1.7.0'
implementation 'com.google.oboe:oboe:1.9.3'
}
// We don't even use Kotlin. Why we have to care about it?
View File
+8 -3
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
<manifest xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
@@ -7,8 +7,10 @@
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- OpenGL ES 2.0 -->
<uses-feature android:glEsVersion="0x00020000" />
<!-- OpenGL ES 3.0 -->
<uses-feature android:glEsVersion="0x00030000" />
<!-- Vulkan 1.1 -->
<uses-feature android:name="android.hardware.vulkan.version" android:version="0x401000" android:required="false" tools:targetApi="n" />
<!-- Touchscreen support -->
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<!-- Game controller support -->
@@ -21,6 +23,7 @@
<uses-feature android:name="android.hardware.audio.low_latency" android:required="false" />
<uses-feature android:name="android.hardware.audio.pro" android:required="false" />
<application
android:allowBackup="true"
android:icon="@drawable/love"
@@ -33,6 +36,8 @@
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|navigation"
android:launchMode="singleInstance"
android:screenOrientation="${ORIENTATION}">
<!-- Allow app activity re-created -->
<meta-data android:name="SDL_ENV.SDL_ANDROID_ALLOW_RECREATE_ACTIVITY" android:value="1" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@@ -30,7 +30,6 @@ import android.graphics.Rect;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.ParcelFileDescriptor;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.util.DisplayMetrics;
@@ -77,10 +76,11 @@ public class GameActivity extends SDLActivity {
protected String[] getLibraries() {
return new String[]{
"c++_shared",
"SDL2",
"SDL3",
"oboe",
"openal",
"luajit",
"liblove",
"love",
};
}
@@ -101,9 +101,9 @@ public class GameActivity extends SDLActivity {
}
Intent intent = getIntent();
// Prevent SDL sending filedropped event. Let us do that instead.
setIntent(null);
handleIntent(intent, true);
// Prevent SDL sending filedropped event. Let us do that instead.
intent.setData(null);
super.onCreate(savedInstanceState);
@@ -214,12 +214,6 @@ public class GameActivity extends SDLActivity {
}
}
@Keep
public boolean openURLFromLOVE(String url) {
Log.d(TAG, "opening url = " + url);
return openURL(url) == 0;
}
@Keep
public boolean hasBackgroundMusic() {
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
@@ -329,11 +323,6 @@ public class GameActivity extends SDLActivity {
}
}
@Keep
public int convertToFileDescriptor(String uri) {
return convertToFileDescriptor(Uri.parse(uri));
}
public int getAudioSMP() {
int smp = 256;
AudioManager a = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
@@ -359,12 +348,8 @@ public class GameActivity extends SDLActivity {
}
public boolean isNativeLibsExtracted() {
if (android.os.Build.VERSION.SDK_INT >= 23) {
ApplicationInfo appInfo = getApplicationInfo();
return (appInfo.flags & ApplicationInfo.FLAG_EXTRACT_NATIVE_LIBS) != 0;
}
return false;
ApplicationInfo appInfo = getApplicationInfo();
return (appInfo.flags & ApplicationInfo.FLAG_EXTRACT_NATIVE_LIBS) != 0;
}
public void sendUriAsDroppedFile(Uri uri) {
@@ -431,32 +416,14 @@ public class GameActivity extends SDLActivity {
return map;
}
private int convertToFileDescriptor(Uri uri) {
int fd = -1;
try {
ParcelFileDescriptor pfd = getContentResolver().openFileDescriptor(uri, "r");
if (pfd == null) {
throw new RuntimeException("pfd is null");
}
fd = pfd.dup().detachFd();
pfd.close();
} catch (Exception e) {
Log.e(TAG, "Failed attempt to convert " + uri.toString() + " to file descriptor", e);
}
return fd;
}
private void processOpenGame(Uri game) {
String scheme = game.getScheme();
String path = game.getPath();
if (scheme != null) {
if (scheme.equals("content")) {
// Convert the URI to file descriptor.
args = new String[]{"/love2d://fd/" + convertToFileDescriptor(game)};
// Pass content URI as-is.
args = new String[]{game.toString()};
} else if (scheme.equals("file")) {
// Regular file, pass as-is.
args = new String[]{path};
+1 -5
View File
@@ -5,13 +5,9 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:9.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
+1 -1
View File
@@ -14,6 +14,6 @@ app.version_name=12.0
# No need to modify anything past this line!
android.enableJetifier=false
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=true
android.nonFinalResIds=true
android.dependency.useConstraints=true
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-1
View File
@@ -3,7 +3,6 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
rootProject.name = "LÖVE for Android"