diff --git a/app/build.gradle b/app/build.gradle index 6f4ab562..d33fafe5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -15,7 +15,10 @@ android { externalNativeBuild { cmake { arguments "-DANDROID_STL=c++_shared" - targets "love" + // Transitive shared library dependency is not taken into account, this + // will cause liboboe.so not get included. love depends on OpenAL that + // depends on oboe::oboe. So, add "OpenAL" target. + targets "love", "OpenAL" } } } @@ -27,6 +30,10 @@ android { } } + buildFeatures { + prefab true + } + flavorDimensions 'mode', 'recording' productFlavors { normal { @@ -76,6 +83,14 @@ android { version '3.21.0+' } } + packagingOptions { + // Due to inclusion of "OpenAL" target, these files are included too, but this + // file is provided by Android as public API. Exclude them! + exclude 'lib/armeabi-v7a/libOpenSLES.so' + exclude 'lib/arm64-v8a/libOpenSLES.so' + exclude 'lib/x86/libOpenSLES.so' + exclude 'lib/x86_64/libOpenSLES.so' + } } dependencies { @@ -86,4 +101,5 @@ dependencies { implementation 'androidx.navigation:navigation-ui:2.4.2' implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' + implementation 'com.google.oboe:oboe:1.6.1' } diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt index a2fce344..1ccae7fb 100644 --- a/app/src/main/cpp/CMakeLists.txt +++ b/app/src/main/cpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.21) project(love-android LANGUAGES C CXX) diff --git a/app/src/main/cpp/love b/app/src/main/cpp/love index 2822f17a..28790741 160000 --- a/app/src/main/cpp/love +++ b/app/src/main/cpp/love @@ -1 +1 @@ -Subproject commit 2822f17a399e14abfafe21aa94e4db0dd61369d4 +Subproject commit 28790741776db99907806d55fcb33d509116d8fb diff --git a/app/src/main/cpp/megasource b/app/src/main/cpp/megasource index be81e424..25beb074 160000 --- a/app/src/main/cpp/megasource +++ b/app/src/main/cpp/megasource @@ -1 +1 @@ -Subproject commit be81e424cbbf0a7f49c1b4e23966ffa41f174e75 +Subproject commit 25beb074607d4712f00e426a3ad1fcf6336f5224 diff --git a/app/src/main/java/org/love2d/android/GameActivity.java b/app/src/main/java/org/love2d/android/GameActivity.java index f43d29ad..833a9ba0 100644 --- a/app/src/main/java/org/love2d/android/GameActivity.java +++ b/app/src/main/java/org/love2d/android/GameActivity.java @@ -79,6 +79,7 @@ public class GameActivity extends SDLActivity { return new String[] { "c++_shared", "SDL2", + "oboe", "openal", "luajit", "love",