Status Update
Comments
bi...@google.com <bi...@google.com> #2
sg...@google.com <sg...@google.com> #3
for the "out" bundle issue, this seems indeed an issue. for the second one reported adding "debugUpdateAPKArtifact" to the path, this WAI as there can more more than one transformer and we need to automatically separate them so they do not use the same output folder. for #3, I will look at it but it might be difficult to change it at this time.
bi...@google.com <bi...@google.com> #4
bi...@google.com <bi...@google.com> #5
Hello, this is a P1 S1 issue for a while now, and it's blocking us from upgrading to AGP 4.2 and further. What's the current status? And do you have plans to backport it to 4.2.x?
ga...@google.com <ga...@google.com> #6
no we don't have a plan to backport this. why is this blocking you from upgrading ?
ch...@google.com <ch...@google.com> #7
We sign apk's and bundles via internal service, and i don't know another way to interact with artifacts;
Yesterday i ended up with some ugly workaround:
bi...@google.com <bi...@google.com>
bi...@google.com <bi...@google.com> #8
I commented on the merge request but to summarize :
you can set your signing tasks output folder to wherever you need to be :
artifacts.use(target.tasks.signedApkTaskProvider(this)).configure { signedDirProperty.set(File("/path/to/where/you/want/your/signed/files")) }
if you don't set it, then we will set a directory automatically.
bi...@google.com <bi...@google.com> #9
Thanks, Jerome!
bi...@google.com <bi...@google.com> #10
I checked that we do have correct behavior for FILE based artifacts like bundle :
> Task :app:debugUpdateArtifact
originalArtifact: /usr/local/google/home/jedo/src/studio-main/out/apiTests/Kotlin/bugTest/app/build/intermediates/bundle/debug/signDebugBundle/app-debug.aab
updatedArtifact: /usr/local/google/home/jedo/src/studio-main/out/apiTests/Kotlin/bugTest/app/build/outputs/bundle/debug/app-debug.aab
however, we still seem to not be consistent for the DIRECTORY based artifacts like APK:
> Task :app:debugUpdateAPKArtifact
Input folder: /usr/local/google/home/jedo/src/studio-main/out/apiTests/Kotlin/bugTest/app/build/outputs/apk/debug
Output folder: /usr/local/google/home/jedo/src/studio-main/out/apiTests/Kotlin/bugTest/app/build/intermediates/apk/debug
Input file: /usr/local/google/home/jedo/src/studio-main/out/apiTests/Kotlin/bugTest/app/build/outputs/apk/debug/app-debug.apk
Alex, can you have a look ?
sg...@google.com <sg...@google.com> #11
correction, I was not correct about FILE being correct.
Instead of :
updatedArtifact: /usr/local/google/home/jedo/src/studio-main/out/apiTests/Kotlin/bugTest/app/build/outputs/bundle/debug/app-debug.aab
it should be
updatedArtifact: /usr/local/google/home/jedo/src/studio-main/out/apiTests/Kotlin/bugTest/app/build/outputs/app-debug.aab
``
ga...@google.com <ga...@google.com> #12
Two requests are created as they are API changes
bi...@google.com <bi...@google.com> #13
Fix will be available in Android Studio F/AGP 8.0 Canary 2 Release
bi...@google.com <bi...@google.com> #14
I tried to use it and at first look, it looks like everything works as expected. Thanks!
[Deleted User] <[Deleted User]> #15
The big issue is, that the current AGP 7.4.0 is broken. I tried to use this API and it is still broken in 7.4.0, it is probably really in AGP 8 :-(
ey...@gmail.com <ey...@gmail.com> #16
I just updated to 8.0.0 alpha and started getting these errors:
ERROR:R8: Missing class android.support.v4.app.FragmentActivity (referenced from: void leakcanary.internal.AndroidSupportFragmentDestroyWatcher.invoke(android.app.Activity))
Missing class android.support.v4.app.FragmentManager$FragmentLifecycleCallbacks (referenced from: void leakcanary.internal.AndroidSupportFragmentDestroyWatcher$fragmentLifecycleCallbacks$1.<init>(leakcanary.internal.AndroidSupportFragmentDestroyWatcher) and 2 other contexts)
Missing class android.support.v4.app.FragmentManager (referenced from: void leakcanary.internal.AndroidSupportFragmentDestroyWatcher.invoke(android.app.Activity))
Missing class androidx.asynclayoutinflater.view.AsyncLayoutInflater$OnInflateFinishedListener (referenced from: void com.mapbox.maps.ViewAnnotationManagerImpl.addViewAnnotation(int, com.mapbox.maps.ViewAnnotationOptions, androidx.asynclayoutinflater.view.AsyncLayoutInflater, kotlin.jvm.functions.Function1))
Missing class androidx.asynclayoutinflater.view.AsyncLayoutInflater (referenced from: void com.mapbox.maps.ViewAnnotationManagerImpl.addViewAnnotation(int, com.mapbox.maps.ViewAnnotationOptions, androidx.asynclayoutinflater.view.AsyncLayoutInflater, kotlin.jvm.functions.Function1) and 1 other context)
Missing class androidx.work.multiprocess.RemoteListenableWorker (referenced from: leakcanary.internal.RemoteHeapAnalyzerWorker)
Do I just need to add the dontwarn
commands that are generated to my config, or should I report these somewhere (here, or the library that is mentioned)?
sg...@google.com <sg...@google.com> #17
The missing classes are from leakcanary
(Square) and com.mapbox.maps
(mapbox). If you don't have any control over these libraries adding the -dontwarn
is one option. Another option will be to add more dependencies to your project with the missing classes. The missing classes are in code which R8 did not remove, but of course that can still be code which will never be hit at runtime.
I suggest that you also report this to the library authors, so they can update their libraries to avoid consumers getting these errors. On the library side they can either 1) add more dependencies or 2) add the -dontwarn
to the library consumer keep rules. There can be good reasons for a library having missing classes if it has code which checks for different supported dependencies. E.g. leakcanary might work with both old support library and new Jetpack (androidx) libraries, so you chose the dependency and leakcanary will work with both.
Description
For AGP 8.0 we should remove the injection of -ignorewarnings , and make missing classes an error.