Skip to content
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

Gradle fails to compile Kotlin projects since Quarkus 3.14.3 #43264

Closed
mschorsch opened this issue Sep 13, 2024 · 21 comments
Closed

Gradle fails to compile Kotlin projects since Quarkus 3.14.3 #43264

mschorsch opened this issue Sep 13, 2024 · 21 comments
Labels
area/gradle Gradle area/kotlin kind/bug Something isn't working
Milestone

Comments

@mschorsch
Copy link
Contributor

mschorsch commented Sep 13, 2024

Describe the bug

Since Quarkus 3.14.3 we receive the following error message (Gradle, Kotlin, multi module project):

Short:

Could not determine the dependencies of task ':buildSrc:compileTestJava'.
> Could not create task ':buildSrc:compileTestKotlin'.
   > Could not create task of type 'KotlinCompile'.
      > Cannot call Task.usesService(Provider) on task ':buildSrc:compileKotlin' after task has started execution.

Long:

org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':buildSrc:compileTestJava'.
        at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:70)
        at org.gradle.execution.plan.TaskDependencyResolver.resolveDependenciesFor(TaskDependencyResolver.java:49)
        at org.gradle.execution.plan.LocalTaskNode.getDependencies(LocalTaskNode.java:148)
        at org.gradle.execution.plan.LocalTaskNode.resolveDependencies(LocalTaskNode.java:122)
        at org.gradle.execution.plan.DefaultExecutionPlan.discoverNodeRelationships(DefaultExecutionPlan.java:182)
        at org.gradle.execution.plan.DefaultExecutionPlan.doAddEntryNodes(DefaultExecutionPlan.java:154)
        at org.gradle.execution.plan.DefaultExecutionPlan.addEntryTasks(DefaultExecutionPlan.java:129)
        at org.gradle.execution.plan.DefaultExecutionPlan.addEntryTasks(DefaultExecutionPlan.java:121)
        at org.gradle.execution.plan.DefaultExecutionPlan.addEntryTask(DefaultExecutionPlan.java:116)
        at org.gradle.internal.build.DefaultBuildLifecycleController$DefaultWorkGraphBuilder.addEntryTasks(DefaultBuildLifecycleController.java:410)
        at org.gradle.internal.build.DefaultBuildWorkGraphController$DefaultBuildWorkGraph.lambda$schedule$0(DefaultBuildWorkGraphController.java:160)
        at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$populateWorkGraph$7(DefaultBuildLifecycleController.java:189)
        at org.gradle.internal.build.DefaultBuildWorkPreparer.populateWorkGraph(DefaultBuildWorkPreparer.java:42)
        at org.gradle.internal.build.BuildOperationFiringBuildWorkPreparer$PopulateWorkGraph.populateTaskGraph(BuildOperationFiringBuildWorkPreparer.java:106)
        at org.gradle.internal.build.BuildOperationFiringBuildWorkPreparer$PopulateWorkGraph.run(BuildOperationFiringBuildWorkPreparer.java:92)
        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(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
        at org.gradle.internal.build.BuildOperationFiringBuildWorkPreparer.populateWorkGraph(BuildOperationFiringBuildWorkPreparer.java:67)
        at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$populateWorkGraph$8(DefaultBuildLifecycleController.java:189)
        at org.gradle.internal.model.StateTransitionController.lambda$inState$1(StateTransitionController.java:99)
        at org.gradle.internal.model.StateTransitionController.lambda$inState$2(StateTransitionController.java:114)
        at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
        at org.gradle.internal.model.StateTransitionController.inState(StateTransitionController.java:110)
        at org.gradle.internal.model.StateTransitionController.inState(StateTransitionController.java:98)
        at org.gradle.internal.build.DefaultBuildLifecycleController.populateWorkGraph(DefaultBuildLifecycleController.java:189)
        at org.gradle.internal.build.DefaultBuildWorkGraphController$DefaultBuildWorkGraph.lambda$schedule$1(DefaultBuildWorkGraphController.java:160)
        at org.gradle.internal.Factories$1.create(Factories.java:31)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withReplacedLocks(DefaultWorkerLeaseService.java:359)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$DefaultBuildProjectRegistry.withMutableStateOfAllProjects(DefaultProjectStateRegistry.java:238)
        at org.gradle.api.internal.project.DefaultProjectStateRegistry$DefaultBuildProjectRegistry.withMutableStateOfAllProjects(DefaultProjectStateRegistry.java:231)
        at org.gradle.internal.build.DefaultBuildWorkGraphController$DefaultBuildWorkGraph.schedule(DefaultBuildWorkGraphController.java:157)
        at org.gradle.composite.internal.DefaultBuildController.scheduleQueuedTasks(DefaultBuildController.java:100)
        at org.gradle.composite.internal.DefaultBuildControllers.populateWorkGraphs(DefaultBuildControllers.java:73)
        at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph$DefaultBuildTreeWorkGraph$1.run(DefaultIncludedBuildTaskGraph.java:210)
        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(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
        at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph$DefaultBuildTreeWorkGraph.scheduleWork(DefaultIncludedBuildTaskGraph.java:204)
        at org.gradle.internal.buildtree.DefaultBuildTreeWorkPreparer.scheduleRequestedTasks(DefaultBuildTreeWorkPreparer.java:37)
        at org.gradle.internal.cc.impl.VintageBuildTreeWorkController$scheduleAndRunRequestedTasks$1.apply(VintageBuildTreeWorkController.kt:36)
        at org.gradle.internal.cc.impl.VintageBuildTreeWorkController$scheduleAndRunRequestedTasks$1.apply(VintageBuildTreeWorkController.kt:35)
        at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph.withNewWorkGraph(DefaultIncludedBuildTaskGraph.java:112)
        at org.gradle.internal.cc.impl.VintageBuildTreeWorkController.scheduleAndRunRequestedTasks(VintageBuildTreeWorkController.kt:35)
        at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$scheduleAndRunTasks$1(DefaultBuildTreeLifecycleController.java:77)
        at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:120)
        at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:169)
        at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:266)
        at org.gradle.internal.model.StateTransitionController.lambda$transition$7(StateTransitionController.java:169)
        at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
        at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:169)
        at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:117)
        at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:77)
        at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:72)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
        at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
        at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:140)
        at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
        at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:54)
        at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:130)
        at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:54)
        at org.gradle.internal.buildtree.InitDeprecationLoggingActionExecutor.execute(InitDeprecationLoggingActionExecutor.java:62)
        at org.gradle.internal.buildtree.InitProblems.execute(InitProblems.java:36)
        at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
        at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:71)
        at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:60)
        at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:71)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        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:166)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
        at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263)
        at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127)
        at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
        at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
        at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
        at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
        at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor$ActionImpl.apply(BuildSessionLifecycleBuildActionExecutor.java:92)
        at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor$ActionImpl.apply(BuildSessionLifecycleBuildActionExecutor.java:80)
        at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:71)
        at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor.execute(BuildSessionLifecycleBuildActionExecutor.java:62)
        at org.gradle.internal.buildprocess.execution.BuildSessionLifecycleBuildActionExecutor.execute(BuildSessionLifecycleBuildActionExecutor.java:41)
        at org.gradle.internal.buildprocess.execution.StartParamsValidatingActionExecutor.execute(StartParamsValidatingActionExecutor.java:64)
        at org.gradle.internal.buildprocess.execution.StartParamsValidatingActionExecutor.execute(StartParamsValidatingActionExecutor.java:32)
        at org.gradle.internal.buildprocess.execution.SessionFailureReportingActionExecutor.execute(SessionFailureReportingActionExecutor.java:51)
        at org.gradle.internal.buildprocess.execution.SessionFailureReportingActionExecutor.execute(SessionFailureReportingActionExecutor.java:39)
        at org.gradle.internal.buildprocess.execution.SetupLoggingActionExecutor.execute(SetupLoggingActionExecutor.java:47)
        at org.gradle.internal.buildprocess.execution.SetupLoggingActionExecutor.execute(SetupLoggingActionExecutor.java:31)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:70)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.lambda$execute$0(ForwardClientInput.java:40)
        at org.gradle.internal.daemon.clientinput.ClientInputForwarder.forwardInput(ClientInputForwarder.java:80)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:37)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
        at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:64)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
        at org.gradle.launcher.daemon.server.DaemonStateCoordinator.lambda$runCommand$0(DaemonStateCoordinator.java:321)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48)
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':buildSrc:compileTestKotlin'.
        at org.gradle.api.internal.tasks.DefaultTaskContainer.taskCreationException(DefaultTaskContainer.java:722)
        at org.gradle.api.internal.tasks.DefaultTaskContainer.access$600(DefaultTaskContainer.java:79)
        at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.domainObjectCreationException(DefaultTaskContainer.java:714)
        at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.tryCreate(DefaultNamedDomainObjectCollection.java:1017)
        at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.access$1401(DefaultTaskContainer.java:661)
        at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider$1.run(DefaultTaskContainer.java:687)
        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(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
        at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.tryCreate(DefaultTaskContainer.java:683)
        at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.calculateOwnValue(DefaultNamedDomainObjectCollection.java:991)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:115)
        at org.gradle.api.internal.provider.FlatMapProvider.backingProvider(FlatMapProvider.java:72)
        at org.gradle.api.internal.provider.FlatMapProvider.getProducer(FlatMapProvider.java:82)
        at org.gradle.api.internal.file.collections.ProviderBackedFileCollection.visitDependencies(ProviderBackedFileCollection.java:51)
        at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext$TaskGraphImpl.getNodeValues(CachingTaskDependencyResolveContext.java:108)
        at org.gradle.internal.graph.CachingDirectedGraphWalker$GraphWithEmptyEdges.getNodeValues(CachingDirectedGraphWalker.java:213)
        at org.gradle.internal.graph.CachingDirectedGraphWalker.doSearch(CachingDirectedGraphWalker.java:121)
        at org.gradle.internal.graph.CachingDirectedGraphWalker.findValues(CachingDirectedGraphWalker.java:73)
        at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:67)
        ... 129 more
Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'KotlinCompile'.
        at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:95)
        at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:82)
        at org.gradle.internal.UncheckedException.uncheckedCall(UncheckedException.java:103)
        at org.gradle.api.internal.AbstractTask.injectIntoNewInstance(AbstractTask.java:217)
        at org.gradle.api.internal.project.taskfactory.TaskFactory.create(TaskFactory.java:82)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory.create(AnnotationProcessingTaskFactory.java:48)
        at org.gradle.api.internal.tasks.DefaultTaskContainer.createTask(DefaultTaskContainer.java:333)
        at org.gradle.api.internal.tasks.DefaultTaskContainer.access$200(DefaultTaskContainer.java:79)
        at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.createDomainObject(DefaultTaskContainer.java:704)
        at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.createDomainObject(DefaultTaskContainer.java:661)
        at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.tryCreate(DefaultNamedDomainObjectCollection.java:1004)
        ... 149 more
Caused by: java.lang.IllegalStateException: Cannot call Task.usesService(Provider) on task ':buildSrc:compileKotlin' after task has started execution.
        at org.gradle.api.internal.tasks.TaskMutator.mutate(TaskMutator.java:36)
        at org.gradle.api.internal.tasks.DefaultTaskRequiredServices.registerServiceUsage(DefaultTaskRequiredServices.java:100)
        at org.gradle.api.internal.AbstractTask.usesService(AbstractTask.java:1045)
        at org.gradle.api.DefaultTask.usesService(DefaultTask.java:269)
        at org.jetbrains.kotlin.gradle.plugin.VariantImplementationFactories$Companion$getProvider$2$1$1.execute(VariantImplementationFactories.kt:108)
        at org.jetbrains.kotlin.gradle.plugin.VariantImplementationFactories$Companion$getProvider$2$1$1.execute(VariantImplementationFactories.kt:107)
        at org.gradle.api.internal.DefaultMutationGuard$1.execute(DefaultMutationGuard.java:45)
        at org.gradle.api.internal.DefaultMutationGuard$1.execute(DefaultMutationGuard.java:45)
        at org.gradle.api.internal.collections.CollectionFilter$1.execute(CollectionFilter.java:62)
        at org.gradle.api.internal.DefaultDomainObjectCollection.configureEach(DefaultDomainObjectCollection.java:185)
        at org.gradle.api.internal.DelegatingDomainObjectSet.configureEach(DelegatingDomainObjectSet.java:69)
        at org.jetbrains.kotlin.gradle.plugin.VariantImplementationFactories$Companion$getProvider$2$1.invoke(VariantImplementationFactories.kt:107)
        at org.jetbrains.kotlin.gradle.plugin.VariantImplementationFactories$Companion$getProvider$2$1.invoke(VariantImplementationFactories.kt:106)
        at org.jetbrains.kotlin.gradle.utils.SingleAction.run(singleAction.kt:30)
        at org.jetbrains.kotlin.gradle.plugin.VariantImplementationFactories$Companion.getProvider(VariantImplementationFactories.kt:106)
        at org.jetbrains.kotlin.gradle.plugin.VariantImplementationFactories$Companion.get(VariantImplementationFactories.kt:113)
        at org.jetbrains.kotlin.gradle.plugin.internal.ConfigurationTimePropertiesAccessorKt.getConfigurationTimePropertiesAccessor(ConfigurationTimePropertiesAccessor.kt:45)
        at org.jetbrains.kotlin.gradle.utils.ConfigurationCacheKt.readSystemPropertyAtConfigurationTime(configurationCache.kt:17)
        at org.jetbrains.kotlin.gradle.tasks.CacheableTasksKt.cacheOnlyIfEnabledForKotlin(CacheableTasks.kt:25)
        at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.<init>(AbstractKotlinCompile.kt:65)
        at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.<init>(KotlinCompile.kt:61)
        at org.jetbrains.kotlin.gradle.tasks.KotlinCompile_Decorated.<init>(Unknown Source)
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        at org.gradle.internal.instantiation.generator.AsmBackedClassGenerator$InvokeConstructorStrategy.newInstance(AsmBackedClassGenerator.java:2107)
        at org.gradle.internal.instantiation.generator.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.newInstance(AbstractClassGenerator.java:544)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:65)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.newInstanceWithDisplayName(DependencyInjectingInstantiator.java:51)
        at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:88)
        ... 159 more

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

  1. Download reproducer.zip
  2. ./gradlew clean build
  3. ./gradlew clean :classes :testClasses :cli:classes :cli:testClasses :server:classes :server:testClasses :buildSrc:classes :buildSrc:testClasses :cli:integrationTestClasses :cli:nativeTestClasses :cli:quarkusGeneratedSourcesClasses :cli:quarkusTestGeneratedSourcesClasses :server:integrationTestClasses :server:nativeTestClasses :server:quarkusGeneratedSourcesClasses :server:quarkusTestGeneratedSourcesClasses --stacktrace

Step 3 is the command which Intellij executes. In our real application this also happens with ./gradlew clean build but i could only create a reproducer with this command.

Sometimes you have to execute step 3 multiple times to produce this error.

Output of uname -a or ver

Linux

Output of java -version

Java 21

Quarkus version or git rev

Quarkus 3.14.3

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.10.1

Additional information

see als #43242 (comment)

@mschorsch mschorsch added the kind/bug Something isn't working label Sep 13, 2024
Copy link

quarkus-bot bot commented Sep 13, 2024

/cc @geoand (kotlin), @glefloch, @quarkusio/devtools

@geoand
Copy link
Contributor

geoand commented Sep 13, 2024

cc @aloubyansky @gsmet

@gsmet
Copy link
Member

gsmet commented Sep 13, 2024

#43266 will address it in 3.15/3.14 until we can come up with a proper fix in main.

@gsmet
Copy link
Member

gsmet commented Sep 14, 2024

3.14.4 released today should address the issue.
Let's keep this issue open as I only reverted the changes in 3.14/3.15 and we still need to fix the issue in main as we want to keep the enhancement that introduced the regression long term.

@tanadeau
Copy link

I updated from 3.14.2 to 3.14.4 today and am seeing this issue with Gradle 8.10.1.

@geoand
Copy link
Contributor

geoand commented Sep 17, 2024

@tanadeau can you attach a sample project?

@tanadeau
Copy link

@geoand: I'll try to get to that this week.

@geoand
Copy link
Contributor

geoand commented Sep 17, 2024

🙏

@geoand
Copy link
Contributor

geoand commented Sep 18, 2024

Closing as #43339 was merged which likely fixes the issue

@geoand geoand closed this as completed Sep 18, 2024
@geoand geoand added this to the 3.16 - main milestone Sep 18, 2024
@mschorsch
Copy link
Contributor Author

Closing as #43339 was merged which likely fixes the issue

@geoand I think you mean #43329, right?

@geoand
Copy link
Contributor

geoand commented Sep 18, 2024

Correct, my bad!

@tanadeau
Copy link

Is the additional fix going to be backported to 3.14?

@geoand
Copy link
Contributor

geoand commented Sep 18, 2024

3.14 shouldn't need that fix

@tanadeau
Copy link

I was able to see the issue on 3.14.4 and was going to try to create a reproducer (see discussion above). Before I got to it, it was closed with a new fix. The reproduction steps seem to require the use of annotation processors like KSP, making it more difficult to have a small reproducer. Before I spend a lot of time trying to reproduce, I was wanting to see if that additional fix helped.

@geoand
Copy link
Contributor

geoand commented Sep 18, 2024

I don't really have any detailed information provide, other than fact that 3.14.4 should be the same in behavior (in terms of Gradle) as 3.13

@mschorsch
Copy link
Contributor Author

mschorsch commented Sep 18, 2024

I can confirm that Quarkus 3.14.4 fixed the issue for us

@tanadeau All the changes in the quarkus gradle plugin in Quarkus 3.14.3 have been reverted in Quarkus 3.14.4 so we should have the same behaviour as in Quarkus 3.14.2. PR #43329 probably fixes the issue with the gradle plugin in main (as far as i know this is untested).

@geoand
Copy link
Contributor

geoand commented Sep 18, 2024

Thanks @mschorsch

@mschorsch
Copy link
Contributor Author

@geoand The issue ist still there in main (999-SNAPSHOT) and can easily be reproduced with the reproducer from the description. Can you reopen the issue?

How to reproduce

  1. Download reproducer-main-branch.zip
  2. ./gradlew clean build
  3. ./gradlew clean :classes :testClasses :cli:classes :cli:testClasses :server:classes :server:testClasses :buildSrc:classes :buildSrc:testClasses :cli:integrationTestClasses :cli:nativeTestClasses :cli:quarkusGeneratedSourcesClasses :cli:quarkusTestGeneratedSourcesClasses :server:integrationTestClasses :server:nativeTestClasses :server:quarkusGeneratedSourcesClasses :server:quarkusTestGeneratedSourcesClasses --stacktrace
  4. ./gradlew clean :classes :testClasses :cli:classes :cli:testClasses :server:classes :server:testClasses :buildSrc:classes :buildSrc:testClasses :cli:integrationTestClasses :cli:nativeTestClasses :cli:quarkusGeneratedSourcesClasses :cli:quarkusTestGeneratedSourcesClasses :server:integrationTestClasses :server:nativeTestClasses :server:quarkusGeneratedSourcesClasses :server:quarkusTestGeneratedSourcesClasses --stacktrace

@geoand
Copy link
Contributor

geoand commented Sep 19, 2024

Thanks for checking!

cc @aloubyansky

@mschorsch
Copy link
Contributor Author

@geoand @aloubyansky You can ignore my comment. This is not a Quarkus issue but an issue in Gradle 8.10.0 and Gradle 8.10.1. The issue has been fixed with Gradle 8.10.2.

@geoand
Copy link
Contributor

geoand commented Sep 24, 2024

🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle area/kotlin kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants