Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
je...@google.com <je...@google.com>
mi...@google.com <mi...@google.com> #2
I don't think the average developer understands the distinction between method references and method definitions in this context (inside a DEX file). I know I don't.
@jvg, can you elaborate?
an...@google.com <an...@google.com> #3
people who are looking at the bytecode in the dex to optimize their app through shrinking hopefully will learn the difference as string tables for method references between various dex files can account for quite a bit of disk space. but more importantly a definition is something you can analyze its code for where a reference you can't so the UI can be confusing without seeing the difference
Description
Reproducer:https://github.com/vanniktech/playground/pull/247
Turn on:
android.enableBuildConfigAsBytecode=true
and then this test can't be compiled:Execute
./gradlew testDebug
and you will see the compile error:To workaround this in the
defaultConfig
block I can add the following:buildConfigField("String", "WORKAROUND", "\"foo\"")
this will yield aBuildConfig
that can be resolved.Regardless of whether I have
buildConfigFields
declared or not, when usingenableBuildConfigAsBytecode
the BuildConfig should be resolvable in the Unit Tests.