bundletool
bundletool copied to clipboard
Baseline Profile missing when using JAR from Google Maven Repo
Describe the bug
If I use the bundletool-all-1.11.1.jar
(downloaded from the Github releases page), and run it with the build-apks
parameter, the /assets/dexopt/baseline.prof
file is properly added to the generated base-master.apk
file. But if I implement an app that uses the JAR downloaded from the Google Maven Repo and invoke the same build-apks
with the same parameters, the /assets/dexopt/baseline.prof
file is not added the to generated base-master.apk
file.
Bundletool version(s) affected Version: 1.11.1
To Reproduce
Create an app with this Main class.
object Main {
@JvmStatic
fun main(args: Array<String>) {
val myArgs = listOf("build-apks",
"--bundle=/PATH/TO/app-release.aab",
"--output=/PATH/TO/output",
"--output-format=DIRECTORY",
"--mode=default",
"--aapt2=/PATH/TO/android-sdk/build-tools/33.0.0/aapt2"
)
// This is NOT generating the /assets/dexopt/baseline.prof file on base-master.apk
BundleToolMain.main(myArgs.toTypedArray())
// But if I run bundletool-all-1.11.1.jar by command line, it is working fine:
//java -jar ./bundletool-all-1.11.1.jar build-apks --bundle=/PATH/TO/app-release.aab --output=/PATH/TO/output --output-format="DIRECTORY" --mode="default" --aapt2=/PATH/TO/android-sdk/build-tools/33.0.0/aapt2
}
}
Run it, and you will see that the /assets/dexopt/baseline.prof
file is not added the to generated base-master.apk
file.
Expected behavior
The /assets/dexopt/baseline.prof
file should be present on the base-master.apk
file.
Environment: OS: MacOS
This is also happening on v1.11.2
Could you provide a project to reproduce this along with AAB file?
Not enough info to action on this issue.