You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build scan link
N/A - I think failing during setup
Plugin version
1.29.0
Gradle version
8.5
JDK version
17
(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version
1.9.21
(Optional) Android Gradle Plugin (AGP) version
8.2.2
Describe the bug
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':compose-material'.
>
It is too late to add actions as the callbacks already executed.
Did you try to call beforeVariants or onVariants from the old variant API
'applicationVariants' for instance ? you should always call beforeVariants or
onVariants directly from the androidComponents DSL block.
* Try:
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':compose-material'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:84)
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:77)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$500(LifecycleProjectEvaluator.java:55)
...
Caused by: java.lang.RuntimeException:
It is too late to add actions as the callbacks already executed.
Did you try to call beforeVariants or onVariants from the old variant API
'applicationVariants' for instance ? you should always call beforeVariants or
onVariants directly from the androidComponents DSL block.
at com.android.build.api.extension.impl.OperationsRegistrar.addOperation(OperationsRegistrar.kt:44)
at com.android.build.api.extension.impl.AndroidComponentsExtensionImpl.onVariants(AndroidComponentsExtensionImpl.kt:74)
at com.android.build.api.variant.AndroidComponentsExtension.onVariants$default(AndroidComponentsExtension.kt:114)
at com.autonomousapps.subplugin.ProjectPlugin.configureAndroidLibProject(ProjectPlugin.kt:214)
at com.autonomousapps.subplugin.ProjectPlugin.access$configureAndroidLibProject(ProjectPlugin.kt:55)
at com.autonomousapps.subplugin.ProjectPlugin$apply$1$1$2.execute(ProjectPlugin.kt:114)
at com.autonomousapps.subplugin.ProjectPlugin$apply$1$1$2.execute(ProjectPlugin.kt:112)
at org.gradle.api.internal.plugins.DefaultPluginManager$2.execute(DefaultPluginManager.java:261)
at org.gradle.api.internal.plugins.DefaultPluginManager$2.execute(DefaultPluginManager.java:258)
To Reproduce
Steps to reproduce the behavior:
run any gradle command
The text was updated successfully, but these errors were encountered:
The issue does indeed go away if dependency.analysis.autoapply=false is omitted. It happens because the plugin configures itself for Android projects inside an afterEvaluate block. I think this may not be necessary. I validated that if I remove the afterEvaluate, this error doesn't occur anymore.
Example PR google/horologist#2009
Build scan link
N/A - I think failing during setup
Plugin version
1.29.0
Gradle version
8.5
JDK version
17
(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version
1.9.21
(Optional) Android Gradle Plugin (AGP) version
8.2.2
Describe the bug
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: