Status Update
Comments
sg...@google.com <sg...@google.com> #2
ap...@google.com <ap...@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.
ap...@google.com <ap...@google.com> #4
ap...@google.com <ap...@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?
ap...@google.com <ap...@google.com> #6
no we don't have a plan to backport this. why is this blocking you from upgrading ?
ap...@google.com <ap...@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:
ap...@google.com <ap...@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.
ap...@google.com <ap...@google.com> #9
Thanks, Jerome!
ap...@google.com <ap...@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 ?
ap...@google.com <ap...@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
``
ap...@google.com <ap...@google.com> #12
Two requests are created as they are API changes
ap...@google.com <ap...@google.com> #13
Fix will be available in Android Studio F/AGP 8.0 Canary 2 Release
ap...@google.com <ap...@google.com> #14
I tried to use it and at first look, it looks like everything works as expected. Thanks!
ap...@google.com <ap...@google.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 :-(
ap...@google.com <ap...@google.com> #16
Branch: 4.0
commit ce3a4742ffec584560975df35ddae726ebdad65e
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Mar 03 08:44:41 2023
Fix test after changing API level for rewriting of JDK-8272564
Bug:
Change-Id: I67552a7fb13657ac9b4fb706592754d74d1b0653
M src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564Test.java
ap...@google.com <ap...@google.com> #17
Branch: 4.0
commit 608e9673999593f6c107570c7cd1df6d55e20c3a
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Mar 03 08:44:31 2023
Also apply the rewriting for JDK-8272564 up to Andorid R
Bug:
Change-Id: I240de7d301677668b9c13b3b49c7b7951e6434b6
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
ap...@google.com <ap...@google.com> #18
Branch: 8.0
commit 7b9dea5b4c29b5aa9dde2e4a7db4cb28b68c9caf
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Mar 03 08:43:32 2023
Fix test after changing API level for rewriting of JDK-8272564
Bug:
Change-Id: I67552a7fb13657ac9b4fb706592754d74d1b0653
M src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564Test.java
ap...@google.com <ap...@google.com> #19
Branch: 8.0
commit 2a7c539ec35668c77b0eacb27612d7a5d8a2d11a
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Mar 03 08:43:21 2023
Also apply the rewriting for JDK-8272564 up to Andorid R
Bug:
Change-Id: I240de7d301677668b9c13b3b49c7b7951e6434b6
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
sg...@google.com <sg...@google.com> #20
Backported to 8.0.33, 4.0.55 and 3.3.91 for AGP 8.0, 7.4 and 7.3 respectively. To use a specific R8 version merge the following into settings.gradle
or settings.gradle.kts
:
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:8.1.4-dev")
}
}
}
Description
From the issuehttps://github.com/android/android-test/issues/1642 reported on Espresso 3.5.1 it looks as if the rewrite for JDK-8272564 need to be applied to API level 28-30.
This was first applied before 26, but after b/231450655 it was also applied on API level 26 and 27. However the Espresso issue indicate that this can also cause issues on API level 28-30.
The failure is
The code as
androidx.test.espresso.matcher.ViewMatchers.getMismatchDescriptionString(ViewMatchers.java:3)
isHow that ends up in
org.hamcrest.BaseDescription.appendValueList(BaseDescription.java:76)
I cannot explain.If the JDK-8272564 rewrite is applied the
java.lang.IncompatibleClassChangeError
does not happen.