-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Component.Resources] Generating an APK throws error due to task dependency implication #4085
Comments
As a workaround, adding this to my shared module's tasks.withType<AndroidLintAnalysisTask>{
dependsOn("copyFontsToAndroidAssets")
}
tasks.withType<LintModelWriterTask>{
dependsOn("copyFontsToAndroidAssets")
} This might be a Gradle plugin/wrapper incompatibility though. I am still not sure. |
Could you please provide a minimal reproducer project? Have you tried other gradle and AGP versions?
These two tasks are not added by Compose Multiplatform. I guess they're added by AGP. So I think it's worth trying with different AGP versions. |
It looks to me this is related with the new resources in 1.6.0
|
I've also encountered this. Steps to reproduce:
It fails with:
If I updated AGP from
|
This saved me from errors after updating to version 1.6.0-beta01. |
In case this is helpful, I'm also seeing this, on release builds only, using these:
Project uses the composeResources support for a few drawables (PNG images). In this project all the compose multiplatform code is in a separate module named "uiCommon". There are 4 other modules in the project, and only the uiCommon module gets these gradle errors that make release builds fail. The gradle errors displayed all suggest the gradle task dependencies below are required and are missing (I'm cherry-picking from the output):
So it looks like at a minimum tasks generateReleaseLintVitalModel, lintVitalAnalyzeRelease, and generateReleaseLintModel all need task copyFontsToAndroidAssets as an input or an explicit dependency. |
Oh, and I forgot to mention I can confirm that the same work-around from alpine12 also fixes my build. |
gradle = gradle-8.8-all.zip Still having the same issue. Because IDEA 2024.1.4 only supports 8.2.0, AGP cannot be upgraded temporarily. |
If I need to upgrade AGP, then I need to wait for 2024.2 to be released. |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Kotiln: 2.0.0-Beta1 and 1.9.21
Compose version: 1.6.0-dev1350
When I try to release an APK from my project, two tasks throw an error, both of which say that "they use output from this task
:shared:copyFontsToAndroidAssets
without declaring an explicit or implicit dependency".These two tasks are:
:shared:generateReleaseLintVitalModel
and:shared:lintVitalAnalyzeRelease
The stacktrace:
The text was updated successfully, but these errors were encountered: