[Android] build: add libcompat.7.so only for armv7

Thomas Guillem git at videolan.org
Thu Jul 21 15:12:42 CEST 2016


vlc-android | branch: 2.0.x | Thomas Guillem <thomas at gllm.fr> | Thu Jul 21 15:11:11 2016 +0200| [49daec561c821984bd144cf0bab733aac6903f89] | committer: Thomas Guillem

build: add libcompat.7.so only for armv7

> https://code.videolan.org/videolan/vlc-android/commit/49daec561c821984bd144cf0bab733aac6903f89
---

 libvlc/build.gradle      |  2 +-
 vlc-android/.gitignore   |  1 +
 vlc-android/build.gradle | 20 ++++++++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/libvlc/build.gradle b/libvlc/build.gradle
index 45dfc18..d04760a 100644
--- a/libvlc/build.gradle
+++ b/libvlc/build.gradle
@@ -14,7 +14,7 @@ android {
         aidl.srcDirs = ['src']
         renderscript.srcDirs = ['src']
         res.srcDirs = ['res']
-        assets.srcDirs = ['assets', 'libcompat/libs/armeabi']
+        assets.srcDirs = ['assets' ]
     }
     }
 
diff --git a/vlc-android/.gitignore b/vlc-android/.gitignore
index 6a56f41..ba95d3d 100644
--- a/vlc-android/.gitignore
+++ b/vlc-android/.gitignore
@@ -5,3 +5,4 @@ obj/
 .settings
 
 assets/lua/
+assets/*.so
diff --git a/vlc-android/build.gradle b/vlc-android/build.gradle
index 9227755..c4bdbf7 100644
--- a/vlc-android/build.gradle
+++ b/vlc-android/build.gradle
@@ -23,6 +23,18 @@ android {
         exclude '**/*.txt'
     }
 
+    task libcompatCopy(type: Copy) {
+        from '../libvlc/libcompat/libs/armeabi'
+        into 'assets'
+        include '**/*.so'
+    }
+
+    task libcompatDelete(type: Delete) {
+        delete fileTree('assets') {
+            include '**/*.so'
+        }
+    }
+
     dataBinding {
         enabled = true
     }
@@ -39,6 +51,14 @@ android {
             if (task.name.startsWith('merge')) {
                 task.dependsOn luaPlaylistCopy
                 task.dependsOn luaMetaCopy
+
+                if (task.name.contains('ARMv7') || task.name.contains('ARMv6')
+                 || task.name.contains('ARMv5')) {
+                    task.dependsOn libcompatCopy
+                }
+                else {
+                    task.dependsOn libcompatDelete
+                }
             }
         }
 



More information about the Android mailing list