Forráskód Böngészése

Use prebuilt Oboe from prefab.

Miku AuahDark 3 éve
szülő
commit
4e8723bec1

+ 17 - 1
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'
 }

+ 1 - 1
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)
 

+ 1 - 1
app/src/main/cpp/love

@@ -1 +1 @@
-Subproject commit 2822f17a399e14abfafe21aa94e4db0dd61369d4
+Subproject commit 28790741776db99907806d55fcb33d509116d8fb

+ 1 - 1
app/src/main/cpp/megasource

@@ -1 +1 @@
-Subproject commit be81e424cbbf0a7f49c1b4e23966ffa41f174e75
+Subproject commit 25beb074607d4712f00e426a3ad1fcf6336f5224

+ 1 - 0
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",