Status Update
Comments
ch...@google.com <ch...@google.com>
cl...@google.com <cl...@google.com> #2
ta...@gmail.com <ta...@gmail.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.
sg...@google.com <sg...@google.com> #4
cl...@google.com <cl...@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?
cl...@google.com <cl...@google.com> #6
no we don't have a plan to backport this. why is this blocking you from upgrading ?
ta...@gmail.com <ta...@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:
ta...@gmail.com <ta...@gmail.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.
cl...@google.com <cl...@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 ?
ta...@gmail.com <ta...@gmail.com> #11
cl...@google.com <cl...@google.com> #12
Two requests are created as they are API changes
ta...@gmail.com <ta...@gmail.com> #13
Fix will be available in Android Studio F/AGP 8.0 Canary 2 Release
cl...@google.com <cl...@google.com> #14
I tried to use it and at first look, it looks like everything works as expected. Thanks!
cl...@google.com <cl...@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: main
commit af29744fd0bbac05db78de171b3fc2e67afb8b19
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Mon Feb 06 13:43:09 2023
Avoid synthesis of unused methods in default interface method desugaring
Bug:
Bug:
Bug:
Change-Id: Iebe2fb88ef7aca337f8db34aba18b81aaa953617
M src/main/java/com/android/tools/r8/ir/desugar/itf/ClassProcessor.java
cl...@google.com <cl...@google.com> #17
Needs backport to 4.0 and 8.0.
ap...@google.com <ap...@google.com> #18
Branch: main
commit f35ec2083c5b5880f59fe141c4a12f15c6e3f230
Author: Clément Béra <clementbera@google.com>
Date: Mon Feb 06 11:10:11 2023
Desugared library: don't generate callbacks for dead methods
Bug:
Change-Id: I1497363ceab5842f7e09f7fc604c794a49b02ffb
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
M src/main/java/com/android/tools/r8/ir/desugar/CfPostProcessingDesugaringCollection.java
M src/main/java/com/android/tools/r8/ir/desugar/desugaredlibrary/apiconversion/DesugaredLibraryAPICallbackSynthesizer.java
M src/main/java/com/android/tools/r8/shaking/Enqueuer.java
A src/test/java/com/android/tools/r8/desugar/desugaredlibrary/GuavaMultiSetSpliteratorTest.java
cl...@google.com <cl...@google.com> #19
Can you try:
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw/main")
}
}
dependencies {
classpath("com.android.tools:r8:f35ec2083c5b5880f59fe141c4a12f15c6e3f230")
}
}
}
Does it compile for you?
ta...@gmail.com <ta...@gmail.com> #20
Yes, everything is working great now!
ap...@google.com <ap...@google.com> #21
Branch: main
commit 9952fea15e2abee802e180706695bffb8dabed99
Author: Clément Béra <clementbera@google.com>
Date: Tue Feb 07 11:22:59 2023
Fix live method computation in api callback synthesizer
Bug:
Change-Id: Id1b5a80e10b8faba0f26d061e918d5f7f6f44224
M src/main/java/com/android/tools/r8/ir/desugar/CfPostProcessingDesugaringEventConsumer.java
M src/main/java/com/android/tools/r8/ir/desugar/desugaredlibrary/apiconversion/DesugaredLibraryAPICallbackSynthesizer.java
M src/main/java/com/android/tools/r8/profile/art/rewriting/ArtProfileRewritingCfPostProcessingDesugaringEventConsumer.java
M src/main/java/com/android/tools/r8/shaking/Enqueuer.java
cl...@google.com <cl...@google.com> #22
Sorry there was an issue with the last hash triggering other bugs so I cannot backport it.
Can you check again with
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw/main")
}
}
dependencies {
classpath("com.android.tools:r8:9952fea15e2abee802e180706695bffb8dabed99")
}
}
}
?
I will try to backport this tomorrow if this works for you so that it's in the next eel point release (2).
ta...@gmail.com <ta...@gmail.com> #23
I have this error with the last version
Could not resolve all files for configuration 'classpath'.
> Could not find com.android.tools:r8:9952fea15e2abee802e180706695bffb8dabed99.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/android/tools/r8/9952fea15e2abee802e180706695bffb8dabed99/r8-9952fea15e2abee802e180706695bffb8dabed99.pom
- https://storage.googleapis.com/r8-releases/raw/main/com/android/tools/r8/9952fea15e2abee802e180706695bffb8dabed99/r8-9952fea15e2abee802e180706695bffb8dabed99.pom
Required by:
unspecified:unspecified:unspecified
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
cl...@google.com <cl...@google.com> #24
Can you try again? It takes like 1 h to get it to upload to maven so maybe it was not there yet.
It would be nice to confirm it works because I have to land tomorrow if we want it in eel.
Else 9c1e702497c4bce7bddbf8e7bc5e10c8372ed4d6 was done afterwards.
ta...@gmail.com <ta...@gmail.com> #25
Yes, now 9952fea15e2abee802e180706695bffb8dabed99
works fine, the build is assembled and working properly.
Will it be in flamingo and giraffe?
cl...@google.com <cl...@google.com> #26
It will be in flamingo and giraffe though it takes weeks to reach the releases.
I am try to get in into eel but I'm not sure I will be able to.
R8 is part of agp though so it depends on agp updates not android studio (but recent android studio have more recent agp).
ta...@gmail.com <ta...@gmail.com> #27
Yes, of course, I understand that this is part of the agp. Perhaps this fix will be in the next release of r8?
ap...@google.com <ap...@google.com> #28
Branch: main
commit 1142fa00189d9d4829cbee87476281cbef6b86c8
Author: Clément Béra <clementbera@google.com>
Date: Wed Feb 08 09:28:09 2023
API callback fix for live non instantiated types
Bug:
Change-Id: I7d947f3e39a30b5da3e5bd307d3babb5fdb251f7
M src/main/java/com/android/tools/r8/ir/desugar/desugaredlibrary/apiconversion/DesugaredLibraryAPICallbackSynthesizer.java
ap...@google.com <ap...@google.com> #29
Branch: 4.0
commit e70cabb270a305828df5e7e2ab4c7c299a70ea2e
Author: Clément Béra <clementbera@google.com>
Date: Wed Feb 08 10:51:54 2023
Version 4.0.52
Bug:
Change-Id: If7860604d6bc24173db1657b1ca8c397ba9e8732
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #30
Branch: 4.0
commit 863b1f3f73452dae47130011c7de19cd8ef1813c
Author: Clément Béra <clementbera@google.com>
Date: Wed Feb 08 09:47:02 2023
Desugared library: don't generate callbacks for live non instantiated types
Bug:
Change-Id: I1497363ceab5842f7e09f7fc604c794a49b02ffb
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
M src/main/java/com/android/tools/r8/ir/desugar/CfPostProcessingDesugaringCollection.java
M src/main/java/com/android/tools/r8/ir/desugar/CfPostProcessingDesugaringEventConsumer.java
M src/main/java/com/android/tools/r8/ir/desugar/desugaredlibrary/apiconversion/DesugaredLibraryAPICallbackSynthesizer.java
M src/main/java/com/android/tools/r8/shaking/Enqueuer.java
A src/test/java/com/android/tools/r8/desugar/desugaredlibrary/GuavaMultiSetSpliteratorTest.java
cl...@google.com <cl...@google.com>
ap...@google.com <ap...@google.com> #31
Branch: 8.0
commit 9e2261fb6d168056118d1d60cf0037b4c983f07c
Author: Clément Béra <clementbera@google.com>
Date: Wed Feb 08 11:12:27 2023
Version 8.0.28
- fix desugared lib api callback on dead methods
- fix desugared lib conversion with swap on wide operands
Bug:
Bug:
Change-Id: Id93395d8738be223d197b0332bf89491cbe1dc8c
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #32
Branch: 8.0
commit b5242da0103a6406ca07ac632153b90b76a67d3e
Author: Clément Béra <clementbera@google.com>
Date: Wed Feb 08 10:57:58 2023
Desugared library: don't generate callbacks for live non instantiated types
Bug:
Change-Id: I1497363ceab5842f7e09f7fc604c794a49b02ffb
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
M src/main/java/com/android/tools/r8/ir/desugar/CfPostProcessingDesugaringCollection.java
M src/main/java/com/android/tools/r8/ir/desugar/CfPostProcessingDesugaringEventConsumer.java
M src/main/java/com/android/tools/r8/ir/desugar/desugaredlibrary/apiconversion/DesugaredLibraryAPICallbackSynthesizer.java
M src/main/java/com/android/tools/r8/shaking/Enqueuer.java
A src/test/java/com/android/tools/r8/desugar/desugaredlibrary/GuavaMultiSetSpliteratorTest.java
ch...@google.com <ch...@google.com>
dr...@gmail.com <dr...@gmail.com> #33
Still exists on:
R8 8.1.56
Gradle 8.2.0-alpha15
Android 2022.3.1
ch...@google.com <ch...@google.com> #34
The current issue was confirmed to be fixed in
If you would be able to share a zip dump of the compiler inputs (including the app's JVM class files, keep rules, etc.) we should be able to reproduce and fix the issue:
./gradlew assembleRelease --no-daemon -Dcom.android.tools.r8.dumpinputtodirectory=/path/to/dumps
You can share the dump privately with
See also
Description
I try to generate signed release build with next configs in my build.gradle.kts file:
getByName("release") {
isDebuggable = false
isShrinkResources = true
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
I used to successfully build a signed release build, but then I updated some of the dependencies and now it stopped building with the error message I provide below.
I updated quite a few libraries, including AGP and Compose compiler and much more, besides, there have been significant changes since then, so I don’t have the opportunity to roll back these changes in parts to understand whether the new dependencies are to blame or it’s not related at all with update
Maybe I'm using the wrong version of R8, or do I need to add some rules to proguard-rules.pro? I spent two days on this problem and I can't solve it in any way, any advice is welcome
P.S I tried clean, rebuild, invalidate Android Studio cache etc., it doesn't help :(
The error message that I receive again and again:
> Task :app:minifyReleaseWithR8 AGPBI:
{"kind":"error","text":"com.android.tools.r8.internal.e50: Attempt to enqueue an action in a non pushable
enqueuer work list.","sources":[{}],"tool":"R8"}
> Task :app:minifyReleaseWithR8 FAILED
com.android.tools.r8.internal.e50: Attempt to enqueue an action in a non pushable enqueuer work list.
StackTrace:
> Task :app:minifyReleaseWithR8
AGPBI: {"kind":"error","text":"com.android.tools.r8.internal.e50: Attempt to enqueue an action in a non pushable enqueuer work list.","sources":[{}],"tool":"R8"}
> Task :app:minifyReleaseWithR8 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:minifyReleaseWithR8'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
> Compilation failed to complete
* Try:
> Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:minifyReleaseWithR8'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:142)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:140)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:128)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:57)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:69)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:322)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:309)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:302)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:288)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:462)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:379)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
at org.gradle.workers.internal.DefaultWorkerExecutor$WorkItemExecution.waitForCompletion(DefaultWorkerExecutor.java:348)
at org.gradle.internal.work.DefaultAsyncWorkTracker.lambda$waitForItemsAndGatherFailures$2(DefaultAsyncWorkTracker.java:130)
at org.gradle.internal.Factories$1.create(Factories.java:31)
at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLocks(DefaultWorkerLeaseService.java:321)
at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLocks(DefaultWorkerLeaseService.java:304)
at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLock(DefaultWorkerLeaseService.java:309)
at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:126)
at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:92)
at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForAll(DefaultAsyncWorkTracker.java:78)
at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForCompletion(DefaultAsyncWorkTracker.java:66)
at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:244)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBu