Status Update
Comments
xa...@google.com <xa...@google.com> #2
The fix for this issue will be available in 4.1 beta 4, when double clicking on a NULL cell the NULL value will be persisted.
The drawback of this solution is that it's not possible to just edit a cell and replace NULL with empty string. It has to be done by running an UPDATE query or editing the cell to something different from empty string first.
uc...@google.com <uc...@google.com>
xa...@google.com <xa...@google.com>
cm...@google.com <cm...@google.com>
cm...@google.com <cm...@google.com> #3
I've found the offending handling of types that contain 'string'
Other cases appear to be handled correctly.
cm...@google.com <cm...@google.com> #4
I have a pending fix
cm...@google.com <cm...@google.com> #5
Thanks for the report.
This is fixed by
Which will ship in a future preview of AGP 4.1 and 4.2
st...@seatgeek.com <st...@seatgeek.com> #6
cm...@google.com <cm...@google.com> #7
This missed 4.1-beta03, It should ship in the next one.
ga...@gmail.com <ga...@gmail.com> #8
I'm not sure if this is connected, but I'm seeing the same for String
(the not array version). I've got buildConfigField("String", "FOO", "\"\"")
in my build file and it generates public static final String FOO = """";
. I'm still seeing it in 4.2.0 alpha 5 where the string array issue is fixed.
ga...@gmail.com <ga...@gmail.com> #10
Thank you 👍
ga...@gmail.com <ga...@gmail.com> #11
Can confirm that 4.2.0-alpha06 works. Thanks again
cm...@google.com <cm...@google.com> #12
Thanks for confirming.
Description
Version of Gradle Plugin: 4.1.0-beta02
Version of Gradle: 6.5
Version of Java: 8
OS: OSX
Steps to Reproduce:
1. Add a buildConfigField that is of type String[] with empty array
buildConfigField "String[]", "ADDITIONAL_OAUTH_SCOPES", "new String[]{}"
2. ./gradlew :app:assemble
2. Notice compilation failure:
/Users/stephen/workspace/BuildConfigBug/app/build/generated/source/buildConfig/debug/com/seatgeek/android/buildconfig/BuildConfig.java:13: error: incompatible types: String cannot be converted to String[]
public static final String[] ADDITIONAL_OAUTH_SCOPES = "new String[]{}";
^
The contract for build config fields explicitly states:
"The field is generated as: <type> <name> = <value>; This means each of these must have valid Java content. If the type is a String, then the value should include quotes"
It appears as if the gradle plugin is now inserting quotes in violation of this. 4.0.0 compiles and works as expected.