Fixed
Status Update
Comments
je...@google.com <je...@google.com>
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #2
Change-Id: I2cf748776c9f369672093dccd40f32074360bb33
op...@gmail.com <op...@gmail.com> #3
is it possible to add a new key value params to the output.json file when generating apks ? i would like to add a pointing url to this file as i am having different server URLs. so that I can ensure that the correct URL is pointed on the generated APK.
je...@google.com <je...@google.com> #4
please file a new bug, explaining the use case and outcome.
Description
Android Plugin Version: 4.0.0-alpha09
Module Compile Sdk Version: 29
Module Build Tools Version: 29.0.2
Android SDK Tools version: 26.1.1
In the latest AGP plugin, when generating an APK, the accompanying metadata file `app/build/outputs/apk/debug/output.json` is incorrectly reporting the value of the `versionName` field. It appears to be using `versionCode` as its value.
e.g. I expect the below to show `"versionName": "0.1.0"`
```
{
"version": 1,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "ie.otormaigh.blank.debug",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"properties": [],
"versionCode": 100000,
"versionName": "100000",
"enabled": true,
"outputFile": "blank-0.1.0-local-debug.apk"
}
]
}
```
The versionName of the APK is being set fine. AndroidManifest, BuildConfig etc. all report the expected value. Its just the `output.json` file thats showing the incorrect value.
Reverting to AGP 4.0.0-alpha08 will generate the correct value for `versionName`, but then it will revert back to the 'old' `output.json` format introduced in 4.0.0-alpha07(?)