[Android] Ship lua files in libvlc artifact

Nicolas Pomepuy git at videolan.org
Tue Sep 8 07:12:19 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Sep  4 13:40:16 2020 +0200| [bc1b17beed02b25fe389e6d5c565ee450fe9d4df] | committer: Nicolas Pomepuy

Ship lua files in libvlc artifact

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

 application/app/build.gradle | 32 --------------------------------
 libvlc/build.gradle          | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/application/app/build.gradle b/application/app/build.gradle
index 11085989d..6a8d8bd65 100644
--- a/application/app/build.gradle
+++ b/application/app/build.gradle
@@ -11,29 +11,6 @@ android {
         pickFirst 'lib/x86_64/libc++_shared.so'
     }
 
-    task hrtfsCopy(type: Copy) {
-        from '../../vlc/share/hrtfs'
-        into 'src/main/assets/hrtfs'
-    }
-
-    task luaPlaylistCopy(type: Copy) {
-        from '../../vlc/share/lua/playlist'
-        into 'src/main/assets/lua/playlist'
-        exclude '**/*.txt'
-    }
-
-    task luaModuleCopy(type: Copy) {
-        from '../../vlc/share/lua/modules'
-        into 'src/main/assets/lua/modules'
-        exclude '**/*.txt'
-    }
-
-    task luaMetaCopy(type: Copy) {
-        from '../../vlc/share/lua/meta'
-        into 'src/main/assets/lua/meta'
-        exclude '**/*.txt'
-    }
-
     dexOptions {
         maxProcessCount 8
         javaMaxHeapSize "4g"
@@ -64,15 +41,6 @@ android {
         multiDexEnabled true
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
-
-        tasks.whenTaskAdded { task ->
-            if (task.name.startsWith('merge')) {
-                task.dependsOn hrtfsCopy
-                task.dependsOn luaPlaylistCopy
-                task.dependsOn luaMetaCopy
-                task.dependsOn luaModuleCopy
-            }
-        }
     }
 
     signingConfigs {
diff --git a/libvlc/build.gradle b/libvlc/build.gradle
index 49b3d4a5a..5c1ff57c7 100644
--- a/libvlc/build.gradle
+++ b/libvlc/build.gradle
@@ -18,6 +18,15 @@ android {
         targetSdkVersion rootProject.ext.targetSdkVersion
         minSdkVersion rootProject.ext.minSdkVersion
         resValue "string", "build_vlc_revision", vlcRevision()
+        tasks.whenTaskAdded { task ->
+            if (task.name.startsWith('merge')) {
+                task.dependsOn hrtfsCopy
+                task.dependsOn luaPlaylistCopy
+                task.dependsOn luaMetaCopy
+                task.dependsOn luaModuleCopy
+            }
+        }
+
     }
 
     sourceSets {
@@ -55,6 +64,30 @@ android {
             }
         }
     }
+
+    task hrtfsCopy(type: Copy) {
+        project.logger.lifecycle('hrtfsCopy')
+        from '../vlc/share/hrtfs'
+        into 'assets/hrtfs'
+    }
+
+    task luaPlaylistCopy(type: Copy) {
+        from '../vlc/share/lua/playlist'
+        into 'assets/lua/playlist'
+        exclude '**/*.txt'
+    }
+
+    task luaModuleCopy(type: Copy) {
+        from '../vlc/share/lua/modules'
+        into 'assets/lua/modules'
+        exclude '**/*.txt'
+    }
+
+    task luaMetaCopy(type: Copy) {
+        from '../vlc/share/lua/meta'
+        into 'assets/lua/meta'
+        exclude '**/*.txt'
+    }
 }
 
 clean {



More information about the Android mailing list