Status Update
Comments
xo...@google.com <xo...@google.com>
je...@google.com <je...@google.com>
am...@google.com <am...@google.com> #3
Manifest placeholder permissionSuffix
specified in the DSL using legacy API seem to be ignored and not passed all the way to manifest merger process. I'd suggest you to use the new variant API to effectively set the manifestPlaceholders(See snippet below).
androidComponents {
onVariants(selector().all()) { variant ->
variant.unitTest?.manifestPlaceholders?.put("permissionSuffix", "test")
variant.androidTest?.manifestPlaceholders?.put("permissionSuffix", "test")
}
}
am...@google.com <am...@google.com> #4
Old variant API is deprecated and will be removed soon. Since there is an alternative better way(Using new variant API) to set the manifest placeholders, I'm closing this bug.
ly...@gmail.com <ly...@gmail.com> #5
Looks great, thank you for suggesting!
je...@google.com <je...@google.com> #6
we should look how much effort it would take to make the old variant API functional.
cm...@google.com <cm...@google.com>
am...@google.com <am...@google.com> #7
Change ag/21400741 addresses this bug.
sp...@google.com <sp...@google.com> #9
Pending Change-Id: I73b247243fea89c065089f719fa4606c7eb5e558
xa...@google.com <xa...@google.com> #10
Approved and submitted the 7.4 cherry-pick.
cm...@google.com <cm...@google.com> #11
Submitted and will be in the next cut releases of AGP 7.4, 8.0 and 8.1
Description
DESCRIBE THE ISSUE IN DETAIL: Assume we have one module A, that declares permission with manifest placeholder:
Also we have another module B that have dependency on module A. This module has some unit tests and enabled
android.testOptions.unitTests.includeAndroidResources = true
inbuild.gradle
. To run unit tests I need to declare manifest placeholder for test variants in module B inbuild.gradle
:When I'm trying to run unit tests in module B I'm getting the error:
But it works correctly with AGP 7.3.1.
Sample project to reproduce:https://github.com/bacecek/sample-checking-assistant-role/tree/broken-test-manifest-placeholders
Studio Build: Android Studio Electric Eel | 2022.1.1. Build #AI-221.6008.13.2211.9477386, built on January 11, 202 Version of Gradle Plugin: 7.4.0 Version of Gradle: 7.5.1 Version of Java: Temurin 17.0.5 OS: macOS 13.1