From 5b055513a786109ce8180acb911f781eb1d97621 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Thu, 26 Oct 2017 10:44:35 -0700 Subject: [PATCH] Bug 1249421 - Include stub AndroidManifest.xml. r=maliu This should avoid Bug 1249421, but it will also address an Android-Gradle plugin 3.0 issue, where the plugin requires the manifest at Gradle configuration time. Currently we don't provide it until Gradle evaluation time, leading to this error, and to the plugin failing. MozReview-Commit-ID: 4NkiQSooLly --HG-- extra : rebase_source : 21b11e8cb4ff990df3adf18718ec3bda869486a0 --- mobile/android/app/build.gradle | 14 ++++++++++++-- mobile/android/app/src/main/AndroidManifest.xml | 6 ++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 mobile/android/app/src/main/AndroidManifest.xml diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle index dd0d263d7301..2738794bbe62 100644 --- a/mobile/android/app/build.gradle +++ b/mobile/android/app/build.gradle @@ -116,8 +116,6 @@ android { sourceSets { main { - manifest.srcFile "${project.buildDir}/generated/source/preprocessed_manifest/AndroidManifest.xml" - aidl { srcDir "${topsrcdir}/mobile/android/base/aidl" } @@ -179,6 +177,18 @@ android { } } + // Every configuration needs the stub manifest at + // src/main/AndroidManifest.xml and the generated manifest. We can't + // use the main sourceSet without losing the stub, so we cover all the + // configurations by enumerating the buildTypes here. + debug { + manifest.srcFile "${project.buildDir}/generated/source/preprocessed_manifest/AndroidManifest.xml" + } + + release { + manifest.srcFile "${project.buildDir}/generated/source/preprocessed_manifest/AndroidManifest.xml" + } + test { java { srcDir "${topsrcdir}/mobile/android/tests/background/junit4/src" diff --git a/mobile/android/app/src/main/AndroidManifest.xml b/mobile/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000000..0c9abf5df67e --- /dev/null +++ b/mobile/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + +