Bug 1233882 - Post: Make Gradle app manifest package be org.mozilla.gecko. r=me

MozReview-Commit-ID: 7YP0mShKc0S

--HG--
extra : rebase_source : 992ea0b6d2b3a52beec903fdf6309507d7df713b
extra : histedit_source : 719d54ff32f1d96537d8e9780e27ca3c7b8d97ba
This commit is contained in:
Nick Alexander 2016-02-17 16:18:13 -08:00
Родитель c4c73eceaa
Коммит 33a2ba2cc1
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -66,7 +66,7 @@ android {
sourceSets {
main {
manifest.srcFile "${topobjdir}/mobile/android/base/AndroidManifest.xml"
manifest.srcFile "${project.buildDir}/generated/source/preprocessed_manifest/AndroidManifest.xml"
java {
srcDir "${topsrcdir}/mobile/android/base/java"
@ -270,7 +270,18 @@ task buildOmnijar(type:Exec) {
}
}
// It's not easy -- see the backout in Bug 1242213 -- to change the <manifest>
// package for Fennec. Gradle has grown a mechanism to achieve what we want for
// Fennec, however, with applicationId. To use the same manifest as moz.build,
// we replace the package with org.mozilla.gecko (the eventual package) here.
task rewriteManifestPackage(type: Copy, dependsOn: rootProject.generateCodeAndResources) {
into("${project.buildDir}/generated/source/preprocessed_manifest")
from("${topobjdir}/mobile/android/base/AndroidManifest.xml")
filter { it.replaceFirst(/package=".*?"/, 'package="org.mozilla.gecko"') }
}
android.applicationVariants.all { variant ->
variant.preBuild.dependsOn rewriteManifestPackage
variant.preBuild.dependsOn syncPreprocessedCode
variant.preBuild.dependsOn syncPreprocessedResources