Fixed
Status Update
Comments
am...@google.com <am...@google.com>
e....@gmail.com <e....@gmail.com> #2
I added the following in my convention plugin
plugins.withType<AndroidPlugin> {
val compileOnlyApi = configurations.create("compileOnlyApi")
configure<AndroidComponentsExtension<*, *, *>>("androidComponents") {
onVariants { variant ->
variant.compileConfiguration.extendsFrom(compileOnlyApi)
configurations.getByName("${variant.name}ApiElements").extendsFrom(compileOnlyApi)
}
}
}
tr...@block.xyz <tr...@block.xyz> #3
That's pretty clever! If you're using Gradle 8.4+, consider using Configurations.dependencyScope("compileOnlyApi")
to create that configuration. If not, I would suggest configuring it manually to set isCanBeResolved = false
, isCanBeConsumed = false
and isVisible = false
. See also
am...@google.com <am...@google.com>
an...@google.com <an...@google.com> #4
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Jellyfish | 2023.3.1 Canary 5
- Android Gradle Plugin 8.4.0-alpha05
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Gradle 6.7 introduces
compileOnlyApi
configuration. We should consider adding this to our configurations.