[Android] No need to manually sed manifest
Geoffrey Métais
git at videolan.org
Tue Jan 10 13:48:28 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 10 13:28:26 2017 +0100| [150bff592d5022a7ab9b0bb914ab9d1f8e82b2ba] | committer: Geoffrey Métais
No need to manually sed manifest
> https://code.videolan.org/videolan/vlc-android/commit/150bff592d5022a7ab9b0bb914ab9d1f8e82b2ba
---
vlc-android/AndroidManifest.xml | 18 +++++++++---------
vlc-android/build.gradle | 9 +--------
2 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/vlc-android/AndroidManifest.xml b/vlc-android/AndroidManifest.xml
index f234ae1..8fb60ff 100644
--- a/vlc-android/AndroidManifest.xml
+++ b/vlc-android/AndroidManifest.xml
@@ -494,10 +494,10 @@
android:label="@string/widget_name_w" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
- <action android:name="_PACKAGENAME_.widget.INIT" />
- <action android:name="_PACKAGENAME_.widget.UPDATE" />
- <action android:name="_PACKAGENAME_.widget.UPDATE_COVER" />
- <action android:name="_PACKAGENAME_.widget.UPDATE_POSITION" />
+ <action android:name="${applicationId}.widget.INIT" />
+ <action android:name="${applicationId}.widget.UPDATE" />
+ <action android:name="${applicationId}.widget.UPDATE_COVER" />
+ <action android:name="${applicationId}.widget.UPDATE_POSITION" />
</intent-filter>
<meta-data
@@ -510,10 +510,10 @@
android:label="@string/widget_name_b" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
- <action android:name="_PACKAGENAME_.widget.INIT" />
- <action android:name="_PACKAGENAME_.widget.UPDATE" />
- <action android:name="_PACKAGENAME_.widget.UPDATE_COVER" />
- <action android:name="_PACKAGENAME_.widget.UPDATE_POSITION" />
+ <action android:name="${applicationId}.widget.INIT" />
+ <action android:name="${applicationId}.widget.UPDATE" />
+ <action android:name="${applicationId}.widget.UPDATE_COVER" />
+ <action android:name="${applicationId}.widget.UPDATE_POSITION" />
</intent-filter>
<meta-data
@@ -525,7 +525,7 @@
android:process=":main">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
- <action android:name="_PACKAGENAME_.remote.PlayPause" />
+ <action android:name="${applicationId}.remote.PlayPause" />
</intent-filter>
</receiver>
diff --git a/vlc-android/build.gradle b/vlc-android/build.gradle
index 297230c..fa12d1c 100644
--- a/vlc-android/build.gradle
+++ b/vlc-android/build.gradle
@@ -165,17 +165,10 @@ android {
//Custom APK name
variant.outputs.each { output ->
def outputName = "VLC-Android-"
- if (!variant.productFlavors.get(0).name.equals("vanilla"))
+ if (variant.productFlavors.get(0).name != "vanilla")
outputName += variant.productFlavors.get(0).name.toUpperCase() + "-"
outputName += vlcVersion + "-" + variant.productFlavors.get(1).name + ".apk"
output.outputFile = new File(output.outputFile.parentFile, outputName);
-
- //set intents with correct package name
- output.processManifest.doLast{
- def manifestOutFile = output.processManifest.manifestOutputFile
- def newFileContents = manifestOutFile.getText('UTF-8').replace("_PACKAGENAME_", variant.applicationId)
- manifestOutFile.write(newFileContents, 'UTF-8')
- }
}
}
More information about the Android
mailing list