Status Update
Comments
xa...@google.com <xa...@google.com>
to...@gmail.com <to...@gmail.com> #2
Branch: main
commit 5ffc027d952de8ef9a115072995e748e6079107f
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Mon Jan 23 17:42:41 2023
[Metadata] Model context receiver types in metadata
Bug:
Change-Id: I66e1fdb5dcec6aac2d9620138c2333b921b4d2c8
M src/main/java/com/android/tools/r8/kotlin/KotlinClassInfo.java
M src/main/java/com/android/tools/r8/kotlin/KotlinFunctionInfo.java
M src/main/java/com/android/tools/r8/kotlin/KotlinMetadataWriter.java
M src/main/java/com/android/tools/r8/kotlin/KotlinPropertyInfo.java
M src/test/java/com/android/tools/r8/kotlin/metadata/MetadataRewriteContextReceiverTest.java
je...@google.com <je...@google.com> #3
Branch: main
commit 3c3a9df61c7ed057481560609b58e9dae9744b28
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Mon Jan 23 17:40:54 2023
[Metadata] Add tests for missing rewrite of context receivers
Bug:
Change-Id: Ifd02bd5ca3a823dc96358a33f79086cf1fa97b62
M src/test/java/com/android/tools/r8/KotlinCompilerTool.java
A src/test/java/com/android/tools/r8/kotlin/metadata/MetadataRewriteContextReceiverTest.java
A src/test/java/com/android/tools/r8/kotlin/metadata/context_receiver_app/main.txt
A src/test/java/com/android/tools/r8/kotlin/metadata/context_receiver_lib/lib.txt
to...@gmail.com <to...@gmail.com> #4
Branch: 8.0
commit 177f2a32494e4e9baedd895eb920bc41825ef77b
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Jan 25 13:22:14 2023
Version 8.0.27
Bug:
Bug:
Bug:
Change-Id: Iebc28bdd06d6330116a8b12336f25be201603745
M src/main/java/com/android/tools/r8/Version.java
ds...@gmail.com <ds...@gmail.com> #5
Branch: 8.0
commit ca9d0d83c4e58cf216e432066f52d0670c8a46ee
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Jan 25 13:22:05 2023
[Metadata] Model context receiver types in metadata
Bug:
Change-Id: I66e1fdb5dcec6aac2d9620138c2333b921b4d2c8
M src/main/java/com/android/tools/r8/kotlin/KotlinClassInfo.java
M src/main/java/com/android/tools/r8/kotlin/KotlinFunctionInfo.java
M src/main/java/com/android/tools/r8/kotlin/KotlinMetadataWriter.java
M src/main/java/com/android/tools/r8/kotlin/KotlinPropertyInfo.java
M src/test/java/com/android/tools/r8/kotlin/metadata/MetadataRewriteContextReceiverTest.java
je...@google.com <je...@google.com> #6
Branch: 8.0
commit e6abb702b05aeeefd0947a5dc25668a9293e12fe
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Jan 25 13:21:55 2023
[Metadata] Add tests for missing rewrite of context receivers
Bug:
Change-Id: Ifd02bd5ca3a823dc96358a33f79086cf1fa97b62
M src/test/java/com/android/tools/r8/KotlinCompilerTool.java
A src/test/java/com/android/tools/r8/kotlin/metadata/MetadataRewriteContextReceiverTest.java
A src/test/java/com/android/tools/r8/kotlin/metadata/context_receiver_app/main.txt
A src/test/java/com/android/tools/r8/kotlin/metadata/context_receiver_lib/lib.txt
ds...@gmail.com <ds...@gmail.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:
je...@google.com <je...@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.
ds...@gmail.com <ds...@gmail.com> #9
Thanks, Jerome!
je...@google.com <je...@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 ?
al...@google.com <al...@google.com>
je...@google.com <je...@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
``
al...@google.com <al...@google.com> #12
Two requests are created as they are API changes
al...@google.com <al...@google.com> #13
Fix will be available in Android Studio F/AGP 8.0 Canary 2 Release
al...@google.com <al...@google.com>
to...@gmail.com <to...@gmail.com> #14
I tried to use it and at first look, it looks like everything works as expected. Thanks!
to...@gmail.com <to...@gmail.com> #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 :-(
Description
For single file artifact like bundle
variant.artifacts.use(updateBundleArtifact)
.wiredWithFiles(
UpdateArtifactTask::initialArtifact,
UpdateArtifactTask::updatedArtifact
)
.toTransform(ArtifactType.BUNDLE)
it set this value
originalArtifact: app\build\outputs\bundle\debug\signDebugBundle\app-debug.aab
updatedArtifact: app\build\outputs\bundle\debug\debugUpdateArtifact\out
There are more weird things:
- why there is this "sign" prefix for the original file? It should be just "debugBundle"
- why output file is "out". and not app-debug.aab
- According to Xavier Ducrohet only the final artifact should be inside of outputs folder
- Then I don't see the reason for changing the name of the folder debugBundle to debugUpdateArtifact (if only final artifact should be there), it will really help with old plugins that will not use new variant API and will depend on the hardcoded path.
- I would really appreciate if there will be also the possibility to change the name of the output artifact during this transform, not the only file content.
And when I use this
variant.artifacts.use(updateApkArtifact)
.wiredWithDirectories(
UpdateDirArtifactTask::inputDir,
UpdateDirArtifactTask::outputDir
)
.toTransform(ArtifactType.APK)
It set this
Input folder: app\build\outputs\apk\debug
Output folder: app\build\intermediates\apk\debug\debugUpdateAPKArtifact
- output folder is inside of intermediates instead of input one
- also here I would expect that the output folder will be the same as the normal output folder for APK without transformation (for last one transformation in the chain). Why another level of the hierarchy?
There is one more unexpected thing that
val artifacts = builtArtifactsLoader.get().load(inputDir.get())
artifacts?.elements?.forEach {
it.outputFile is just String. I would expect File there.
Build: AI-202.7660.26.42.6987402, 202011210045,
AI-202.7660.26.42.6987402, JRE 11.0.8+10-b944.6842174x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 2560x1440, 2560x1440
AS: 4.2 Beta 1; Kotlin plugin: 1.4.20-release-Studio4.2-1; Android Gradle Plugin: 4.2.0-beta01; Gradle: 6.7; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please read