Status Update
Comments
tn...@google.com <tn...@google.com> #2
As I understand it, we need to migrate namespace definitions both from AndroidManifest.xml
and from implicit definitions from applicationId
/ testApplicationId
? Is that right? So an 8.0 project would have a
namespace <n>
testNamespace <tn>
where <n> is taken from AndroidManifest.xml
package
definitions if present, and applicationId
if not, and <tn>
is testApplicationId
if present and <n>.test
if not?
yi...@google.com <yi...@google.com>
yi...@google.com <yi...@google.com> #3
Sorry for the confusion. AGP would change how it computes the namespace for the androidTest variant. All the Upgrade assistant would need to do is update the source code for the import of the R
class.
lu...@google.com <lu...@google.com> #4
OK! And, I think, this should happen at the same time as the namespace
declaration is migrated from AndroidManifest.xml
?
cm...@google.com <cm...@google.com>
cm...@google.com <cm...@google.com> #5
It's unrelated, but it is possible that we move 8.0 to also only declare the namespace into the DSL. I would make it a separate refactoring because they are not tied at all.
Description
I was building a sample project with 7.3 dev, and as I was trying to run the app, the build failed with a lint error. I was not expecting this, because the current variant is a debug variant, and lintVital should only be running on release variants. See screenshot. The test project ishttps://github.com/android/architecture-samples though I have some local tweaks (but not to the variants setup).
Build: AI-213.7172.25.2113.SNAPSHOT, 202204011615,
AI-213.7172.25.2113.SNAPSHOT, JRE 11.0.13+0-b1751.21-8125866x64 JetBrains s.r.o., OS Mac OS X(aarch64) v12.3.1, screens 3456.0x2234.0; Retina
AS: dev build; Kotlin plugin: 213-1.6.20-M1-release-for-android-studio-AS6777.52; Android Gradle Plugin: 7.3.0-alpha07; Gradle: 7.4; Gradle JDK: version 11.0.13; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply all required information.