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 7.0 configuration cache issues #179

Closed
joschi opened this issue Apr 29, 2021 · 23 comments
Closed

Gradle 7.0 configuration cache issues #179

joschi opened this issue Apr 29, 2021 · 23 comments
Assignees
Milestone

Comments

@joschi
Copy link
Contributor

joschi commented Apr 29, 2021

When using the Forbidden API Checker (version 3.1) with Gradle 7.0 and the configuration cache, the following issues are being logged:

invocation of Task.project at execution time is unsupported. --> https://docs.gradle.org/7.0/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
task:forbiddenApisMain of type de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis

exception stack trace
org.gradle.api.InvalidUserCodeException: Invocation of 'Task.project' by task ':forbiddenApisMain' at execution time is unsupported.
	at org.gradle.configurationcache.initialization.DefaultConfigurationCacheProblemsListener.onTaskExecutionAccessProblem(ConfigurationCacheProblemsListener.kt:57)
	at org.gradle.configurationcache.initialization.DefaultConfigurationCacheProblemsListener.onProjectAccess(ConfigurationCacheProblemsListener.kt:48)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:398)
	at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:380)
	at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:61)
	at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:368)
	at org.gradle.internal.event.DefaultListenerManager$EventBroadcast.dispatch(DefaultListenerManager.java:179)
	at org.gradle.internal.event.DefaultListenerManager$EventBroadcast.dispatch(DefaultListenerManager.java:153)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at com.sun.proxy.$Proxy110.onProjectAccess(Unknown Source)
	at org.gradle.api.internal.AbstractTask.notifyProjectAccess(AbstractTask.java:999)
	at org.gradle.api.internal.AbstractTask.getProject(AbstractTask.java:223)
	at org.gradle.api.DefaultTask.getProject(DefaultTask.java:57)
	at jdk.internal.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:59)
	at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.getProperty(BeanDynamicObject.java:233)
	at org.gradle.internal.metaobject.BeanDynamicObject.tryGetProperty(BeanDynamicObject.java:176)
	at org.gradle.internal.metaobject.CompositeDynamicObject.tryGetProperty(CompositeDynamicObject.java:55)
	at org.gradle.internal.metaobject.ConfigureDelegate.getProperty(ConfigureDelegate.java:112)
	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194)
	at groovy.lang.Closure.getProperty(Closure.java:300)
	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194)
	at groovy.lang.Closure.getPropertyTryThese(Closure.java:326)
	at groovy.lang.Closure.getPropertyDelegateFirst(Closure.java:310)
	at groovy.lang.Closure.getProperty(Closure.java:296)
	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194)
	at groovy.lang.Closure.getPropertyTryThese(Closure.java:320)
	at groovy.lang.Closure.getPropertyOwnerFirst(Closure.java:314)
	at groovy.lang.Closure.getProperty(Closure.java:304)
	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:341)
	at plugin-init$_run_closure2$_closure4$_closure7$_closure11.doCall(plugin-init.groovy:49)
	at jdk.internal.reflect.GeneratedMethodAccessor566.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
	at groovy.lang.Closure.call(Closure.java:412)
	at groovy.lang.Closure.call(Closure.java:428)
	at org.gradle.internal.extensibility.ConventionAwareHelper$1.doGetValue(ConventionAwareHelper.java:69)
	at org.gradle.internal.extensibility.ConventionAwareHelper$MappedPropertyImpl.getValue(ConventionAwareHelper.java:128)
	at org.gradle.internal.extensibility.ConventionAwareHelper.getConventionValue(ConventionAwareHelper.java:110)
	at de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis_Decorated.getTargetCompatibility(Unknown Source)
	at de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis.checkForbidden(CheckForbiddenApis.java:553)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:498)
	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$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:483)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:466)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:105)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:270)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:248)
	at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:83)
	at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:37)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:47)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:47)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:37)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:50)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36)
	at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
	at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
	at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29)
	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:54)
	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:35)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:60)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:27)
	at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:174)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:74)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:45)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:40)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:29)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:99)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:92)
	at java.base/java.util.Optional.map(Optional.java:265)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:84)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:41)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:91)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:78)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:49)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:105)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:50)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:86)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:43)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:31)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:283)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:49)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35)
	at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:184)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
	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:56)
	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:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
	at org.gradle.execution.plan.DefaultPlanExecutor.process(DefaultPlanExecutor.java:72)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.executeWithServices(DefaultTaskExecutionGraph.java:193)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.execute(DefaultTaskExecutionGraph.java:186)
	at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:39)
	at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:40)
	at org.gradle.execution.DefaultBuildWorkExecutor.access$000(DefaultBuildWorkExecutor.java:24)
	at org.gradle.execution.DefaultBuildWorkExecutor$1.proceed(DefaultBuildWorkExecutor.java:48)
	at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:49)
	at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:40)
	at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:33)
	at org.gradle.execution.IncludedBuildLifecycleBuildWorkExecutor.execute(IncludedBuildLifecycleBuildWorkExecutor.java:36)
	at org.gradle.execution.UndefinedBuildWorkExecutor.execute(UndefinedBuildWorkExecutor.java:48)
	at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor$ExecuteTasks.run(BuildOperationFiringBuildWorkerExecutor.java:57)
	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$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor.execute(BuildOperationFiringBuildWorkerExecutor.java:42)
	at org.gradle.initialization.DefaultGradleLauncher.runWork(DefaultGradleLauncher.java:260)
	at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:173)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
	at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:125)
	at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:71)
	at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213)
	at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
	at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
	at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
	at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:66)
	at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
	at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:90)
	at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:44)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.lambda$execute$0(InProcessBuildActionExecuter.java:59)
	at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:86)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:58)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
	at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.lambda$execute$0(BuildTreeScopeLifecycleBuildActionExecuter.java:34)
	at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
	at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:33)
	at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:28)
	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:104)
	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:55)
	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:64)
	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:37)
	at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.lambda$execute$0(SessionScopeLifecycleBuildActionExecuter.java:54)
	at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:67)
	at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:50)
	at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:36)
	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
	at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
	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$2.create(ForwardClientInput.java:78)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
	at org.gradle.util.Swapper.swap(Swapper.java:38)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
	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$1.run(DaemonStateCoordinator.java:297)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
	at java.base/java.lang.Thread.run(Thread.java:834)

read system property sun.java.command --> https://docs.gradle.org/7.0/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
plugin 'de.thetaphi.forbiddenapis'

exception stack trace
org.gradle.api.InvalidUserCodeException: Read system property 'sun.java.command'
	at org.gradle.configurationcache.SystemPropertyAccessListener.systemPropertyQueried(SystemPropertyAccessListener.kt:92)
	at org.gradle.internal.classpath.Instrumented.systemProperty(Instrumented.java:83)
	at de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin.isGradleDaemon(ForbiddenApisPlugin.java:124)
	at de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin.detectAndLogGradleDaemon(ForbiddenApisPlugin.java:136)
	at de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin.<clinit>(ForbiddenApisPlugin.java:64)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.gradle.internal.instantiation.generator.AsmBackedClassGenerator$InvokeConstructorStrategy.newInstance(AsmBackedClassGenerator.java:2032)
	at org.gradle.internal.instantiation.generator.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.newInstance(AbstractClassGenerator.java:480)
	at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:64)
	at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:55)
	at org.gradle.api.internal.plugins.DefaultPluginManager.instantiatePlugin(DefaultPluginManager.java:80)
	at org.gradle.api.internal.plugins.DefaultPluginManager.producePluginInstance(DefaultPluginManager.java:196)
	at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:172)
	at org.gradle.api.internal.plugins.DefaultPluginManager.access$100(DefaultPluginManager.java:51)
	at org.gradle.api.internal.plugins.DefaultPluginManager$AddPluginBuildOperation.run(DefaultPluginManager.java:272)
	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$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.api.internal.plugins.DefaultPluginManager.lambda$doApply$0(DefaultPluginManager.java:157)
	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
	at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:156)
	at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:136)
	at InstanaJavaConventionsPlugin.apply(InstanaJavaConventionsPlugin.java:18)
	at InstanaJavaConventionsPlugin.apply(InstanaJavaConventionsPlugin.java:10)
	at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:43)
	at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.java:51)
	at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:177)
	at org.gradle.api.internal.plugins.DefaultPluginManager.access$100(DefaultPluginManager.java:51)
	at org.gradle.api.internal.plugins.DefaultPluginManager$AddPluginBuildOperation.run(DefaultPluginManager.java:272)
	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$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.api.internal.plugins.DefaultPluginManager.lambda$doApply$0(DefaultPluginManager.java:157)
	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
	at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:156)
	at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:136)
	at InstanaJavaApplicationPlugin.apply(InstanaJavaApplicationPlugin.java:14)
	at InstanaJavaApplicationPlugin.apply(InstanaJavaApplicationPlugin.java:10)
	at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:43)
	at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.java:51)
	at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:177)
	at org.gradle.api.internal.plugins.DefaultPluginManager.access$100(DefaultPluginManager.java:51)
	at org.gradle.api.internal.plugins.DefaultPluginManager$AddPluginBuildOperation.run(DefaultPluginManager.java:272)
	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$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.api.internal.plugins.DefaultPluginManager.lambda$doApply$0(DefaultPluginManager.java:157)
	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
	at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:156)
	at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:127)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.lambda$applyPlugins$0(DefaultPluginRequestApplicator.java:129)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugin(DefaultPluginRequestApplicator.java:185)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.lambda$applyPlugins$1(DefaultPluginRequestApplicator.java:127)
	at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugins(DefaultPluginRequestApplicator.java:127)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugins(DefaultPluginRequestApplicator.java:123)
	at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:117)
	at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:65)
	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$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:62)
	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
	at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:62)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:250)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:267)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:249)
	at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:42)
	at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
	at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:35)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:100)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:250)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:267)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:249)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91)
	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$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63)
	at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:723)
	at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:150)
	at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:41)
	at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:69)
	at org.gradle.execution.DefaultTaskSelector.getSelection(DefaultTaskSelector.java:97)
	at org.gradle.execution.DefaultTaskSelector.getSelection(DefaultTaskSelector.java:78)
	at org.gradle.execution.CompositeAwareTaskSelector.getSelection(CompositeAwareTaskSelector.java:93)
	at org.gradle.execution.commandline.CommandLineTaskParser.parseTasks(CommandLineTaskParser.java:43)
	at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:46)
	at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:55)
	at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter.java:26)
	at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.java:63)
	at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:45)
	at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:55)
	at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter.java:26)
	at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.java:63)
	at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:48)
	at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:55)
	at org.gradle.execution.DefaultBuildConfigurationActionExecuter.lambda$select$0(DefaultBuildConfigurationActionExecuter.java:42)
	at org.gradle.internal.Factories$1.create(Factories.java:31)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry.withMutableStateOfAllProjects(DefaultProjectStateRegistry.java:141)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry.withMutableStateOfAllProjects(DefaultProjectStateRegistry.java:128)
	at org.gradle.execution.DefaultBuildConfigurationActionExecuter.select(DefaultBuildConfigurationActionExecuter.java:40)
	at org.gradle.initialization.DefaultTaskExecutionPreparer.prepareForTaskExecution(DefaultTaskExecutionPreparer.java:38)
	at org.gradle.initialization.BuildOperationFiringTaskExecutionPreparer$CalculateTaskGraph.populateTaskGraph(BuildOperationFiringTaskExecutionPreparer.java:117)
	at org.gradle.initialization.BuildOperationFiringTaskExecutionPreparer$CalculateTaskGraph.run(BuildOperationFiringTaskExecutionPreparer.java:68)
	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$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.initialization.BuildOperationFiringTaskExecutionPreparer.prepareForTaskExecution(BuildOperationFiringTaskExecutionPreparer.java:56)
	at org.gradle.initialization.DefaultGradleLauncher.prepareTaskExecution(DefaultGradleLauncher.java:233)
	at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:168)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
	at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:125)
	at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:71)
	at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213)
	at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
	at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
	at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
	at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:66)
	at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
	at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:90)
	at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:44)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.lambda$execute$0(InProcessBuildActionExecuter.java:59)
	at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:86)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:58)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
	at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.lambda$execute$0(BuildTreeScopeLifecycleBuildActionExecuter.java:34)
	at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
	at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:33)
	at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:28)
	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:104)
	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:55)
	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:64)
	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:37)
	at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.lambda$execute$0(SessionScopeLifecycleBuildActionExecuter.java:54)
	at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:67)
	at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:50)
	at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:36)
	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
	at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
	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$2.create(ForwardClientInput.java:78)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
	at org.gradle.util.Swapper.swap(Swapper.java:38)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
	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$1.run(DaemonStateCoordinator.java:297)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
	at java.base/java.lang.Thread.run(Thread.java:834)

See also: gradle/gradle#13490

@uschindler
Copy link
Member

Thanks. This was on my plan already, I will work on it an release 3.2 with jdk 16 support.

@uschindler
Copy link
Member

With Gradle 7.4 the whole thing is no longer needed. Reading system properties is automatically configured correctly with the configuration cache: https://docs.gradle.org/7.4/release-notes.html#config-cache

Automatic detection of environment variables, system properties and Gradle properties used at configuration time
Previously, Gradle required build and plugin authors to use specific APIs to read external values such as environment variables, system properties and Gradle properties in order to take these values into consideration as configuration cache inputs. When one of those values changed, Gradle would re-execute the configuration phase of the build and create a new cache entry.

Accessing the task's project is another issue, not sure if it easy to fix.

@uschindler
Copy link
Member

The project access should be easy fixable: https://github.com/policeman-tools/forbidden-apis/blob/branch_3.1/src/main/resources/de/thetaphi/forbiddenapis/gradle/plugin-init.groovy#L49-L50

It looks like the project here uses the task's project. The check can be moved to configuration time or just use the global project reference. Here it implicitely calls task.project because of the scope.

@uschindler
Copy link
Member

According to https://twitter.com/thetaph1/status/1498631483887689732?s=20&t=cr1P9cI1pKgnrouTlY5PUg I will close this as "won't fix".

uschindler added a commit that referenced this issue Mar 23, 2022
@uschindler
Copy link
Member

Hi, although I marked this as won't fix I added a workaround which might fix the problem. I can't test this and so it may help or may not help: a70cb0e

@uschindler uschindler self-assigned this Mar 23, 2022
@uschindler uschindler added this to the 3.3 milestone Mar 23, 2022
@uschindler
Copy link
Member

Hi,
I tested it this morning with --configuration-cache and Gradle 7.4.1, works:

test-gradle:
   [gradle] Initialized native services in: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\native
   [gradle] Initialized jansi services in: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\native
   [gradle] To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.4.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
   [gradle] Starting process 'Gradle build daemon'. Working directory: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\daemon\7.4.1 Command: C:\Program Files\Java\jdk1.8.0_272\bin\java.exe -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=windows-1252 -Duser.country=DE -Duser.language=de -Duser.variant -cp C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\gradle-7.4.1\lib\gradle-launcher-7.4.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.4.1
   [gradle] Successfully started process 'Gradle build daemon'
   [gradle] An attempt to start the daemon took 1.45 secs.
   [gradle] The client will now receive all logging from the daemon (pid: 29176). The daemon log file: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\daemon\7.4.1\daemon-29176.out.log
   [gradle] Closing daemon's stdin at end of input.
   [gradle] The daemon will no longer process any standard input.
   [gradle] Daemon will be stopped at the end of the build
   [gradle] Using 8 worker leases.
   [gradle] Configuration cache is an incubating feature.
   [gradle] Calculating task graph as configuration cache cannot be reused because file 'gradle.properties' has changed.
   [gradle] Watching the file system is configured to be enabled if available
   [gradle] Now considering [C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle] as hierarchies to watch
   [gradle] File system watching is active
   [gradle] Watching 1 directory hierarchies to track changes
   [gradle] Starting Build
   [gradle] Settings evaluated using settings file 'C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle\settings.gradle'.
   [gradle] Projects loaded. Root project using build file 'C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle\build.gradle'.
   [gradle] Included projects: [root project 'test-gradle']
   [gradle]
   [gradle] > Configure project :
   [gradle] Evaluating root project 'test-gradle' using build file 'C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle\build.gradle'.
   [gradle] You are running forbidden-apis in the Gradle Daemon; disabling classloading cache by default to work around resource leak.
   [gradle] All projects evaluated.
   [gradle] Selected primary task 'forbiddenApis' from project :
   [gradle] Tasks to be executed: [task ':compileJava', task ':processResources', task ':classes', task ':forbiddenApisMain', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':forbiddenApisTest', task ':forbiddenApis']
   [gradle] Tasks that were excluded: []
   [gradle] :compileJava (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle]
   [gradle] > Task :compileJava
   [gradle] Caching disabled for task ':compileJava' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':compileJava' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] The input changes require a full rebuild for incremental task ':compileJava'.
   [gradle] Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
   [gradle] Compiling with toolchain 'C:\Program Files\Java\jdk1.8.0_272'.
   [gradle] Compiling with JDK Java compiler API.
   [gradle] Class dependency analysis for incremental compilation took 0.103 secs.
   [gradle] Created classpath snapshot for incremental compilation in 0.153 secs.
   [gradle] :compileJava (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 2.327 secs.
   [gradle] :processResources (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle]
   [gradle] > Task :processResources NO-SOURCE
   [gradle] Skipping task ':processResources' as it has no source files and no previous output files.
   [gradle] :processResources (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 0.012 secs.
   [gradle] :classes (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle]
   [gradle] > Task :classes
   [gradle] Skipping task ':classes' as it has no actions.
   [gradle] :classes (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 0.0 secs.
   [gradle] :forbiddenApisMain (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle]
   [gradle] > Task :forbiddenApisMain
   [gradle] Caching disabled for task ':forbiddenApisMain' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':forbiddenApisMain' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] Reading bundled API signatures: jdk-unsafe-1.7
   [gradle] Reading bundled API signatures: jdk-deprecated-1.7
   [gradle] Reading bundled API signatures: jdk-non-portable
   [gradle] Reading bundled API signatures: jdk-reflection
   [gradle] Reading bundled API signatures: jdk-system-out
   [gradle] Reading API signatures: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\src\tools\signatures\mysignatures.txt
   [gradle] Loading classes to check...
   [gradle] Scanning classes for violations...
   [gradle] Scanned 47 class file(s) for forbidden API invocations (in 0.35s), 0 error(s).
   [gradle] :forbiddenApisMain (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 0.378 secs.
   [gradle] :compileTestJava (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle]
   [gradle] > Task :compileTestJava
   [gradle] Caching disabled for task ':compileTestJava' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':compileTestJava' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] The input changes require a full rebuild for incremental task ':compileTestJava'.
   [gradle] Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
   [gradle] Compiling with toolchain 'C:\Program Files\Java\jdk1.8.0_272'.
   [gradle] Compiling with JDK Java compiler API.
   [gradle] Class dependency analysis for incremental compilation took 0.012 secs.
   [gradle] Created classpath snapshot for incremental compilation in 0.009 secs.
   [gradle] :compileTestJava (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 0.326 secs.
   [gradle] :processTestResources (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle]
   [gradle] > Task :processTestResources NO-SOURCE
   [gradle] Skipping task ':processTestResources' as it has no source files and no previous output files.
   [gradle] :processTestResources (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 0.002 secs.
   [gradle] :testClasses (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle]
   [gradle] > Task :testClasses
   [gradle] Skipping task ':testClasses' as it has no actions.
   [gradle] :testClasses (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 0.0 secs.
   [gradle] :forbiddenApisTest (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle]
   [gradle] > Task :forbiddenApisTest
   [gradle] Caching disabled for task ':forbiddenApisTest' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':forbiddenApisTest' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] Reading bundled API signatures: jdk-unsafe-1.7
   [gradle] Reading bundled API signatures: jdk-deprecated-1.7
   [gradle] Reading bundled API signatures: jdk-non-portable
   [gradle] Reading bundled API signatures: jdk-reflection
   [gradle] Reading API signatures: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\src\tools\signatures\mysignatures.txt
   [gradle] Loading classes to check...
   [gradle] Scanning classes for violations...
   [gradle] Scanned 3 class file(s) for forbidden API invocations (in 0.09s), 0 error(s).
   [gradle] :forbiddenApisTest (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 0.096 secs.
   [gradle] :forbiddenApis (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle]
   [gradle] > Task :forbiddenApis
   [gradle] Skipping task ':forbiddenApis' as it has no actions.
   [gradle] :forbiddenApis (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 0.0 secs.
   [gradle] producer locations for task group 0 (Thread[Execution worker for ':' Thread 7,5,main]) started.
   [gradle] producer locations for task group 0 (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 0.0 secs.
   [gradle]
   [gradle] 0 problems were found storing the configuration cache.
   [gradle]
   [gradle] See the complete report at file:///C:/Users/Uwe%20Schindler/Projects/lucene/forbidden-apis/forbidden-apis/build/test-gradle/build/reports/configuration-cache/az02rh4ojucnrhrvg4nse5ym8/g26oet23jmewp0c2bjx5vn3s/configuration-cache-report.html
   [gradle]
   [gradle] BUILD SUCCESSFUL in 11s
   [gradle] 4 actionable tasks: 4 executed
   [gradle] Watched directory hierarchies: [C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle]
   [gradle] Configuration cache entry stored.

@joschi
Copy link
Contributor Author

joschi commented Mar 24, 2022

@uschindler Thanks for tackling this despite your reservations about Gradle! ❤️

@uschindler
Copy link
Member

I just closed it again to allow me to see that it was fixed.

@vlsi
Copy link
Contributor

vlsi commented Mar 7, 2023

@uschindler , I'm afraid configuration cache is not supported in the current forbidden-apis version.

Here's an example: gradlex-org/build-parameters#95 (comment)

The log you mention #179 (comment) doesn't really use configuration cache: Calculating task graph as configuration cache cannot be reused because file 'gradle.properties' has changed.
The better testing would be running the same command twice and ensuring the configuration cache is reused.

Unfortunately, forbidden-apis uses a custom classloader to execute plugin-init.groovy, so extra classes it creates are not reusable as they refer to dynamically generated classes like plugin-init$_run_closure3$_closure5$_closure7

Would you please reconsider?
I guess the way out is to use a statically compiled class instead of interpreted plugin-init.groovy.

@uschindler
Copy link
Member

uschindler commented Mar 7, 2023

I tested this several times back at that time. The problem here looks like the configuration cache can't correctly handle the closures used in the ConventionMapping. This code was changed since my tests.
First of all: the lazy evaluation should not be an issue as otherwise any java lambda expression would not work with configuration cache (they are also classes in own class loader).
Changing this would require a major rewrite. Also like discussed in other issue, the convention properties should go away and to be replaced by Property instances. I am not sure how's they are serialized.
In general the plugin needs a bit of refactoring as it won't work correctly with tool chains. The forbidden analysis is always executed in Gradle process, so if you compile classes against a completely different java version and then run forbidden it may break. My plan is to remove the current maven and gradle implementation and only provide the CLI which can be executed in a separate process with any java version provided by the toolkit launcher API.
When this is done the Gradle and maven plugins would only be some command line runner.
Unfortunately I have no time at moment to implement this.

@vlsi
Copy link
Contributor

vlsi commented Mar 7, 2023

First of all: the lazy evaluation should not be an issue as otherwise any java lambda expression would not work with configuration cache (they are also classes in own class loader).

They do some transformation to support lambdas.
So removing the custom classloader and using a compiled language would resolve the issue.

My plan is to remove the current maven and gradle implementation and only provide the CLI which can be executed in a separate process with any java version provided by the toolkit launcher API

I guess it is tangential to the current issue. The tasks like forbiddenApisMain should be generated by some code sooner or later, so exposing the checker via jar does not resolve the configuration cache issue.

@uschindler
Copy link
Member

uschindler commented Mar 7, 2023

First of all, I can confirm the issue with recent codebase. After the "third" axecution it fails with exactly the same issue.

My plan is to remove the current maven and gradle implementation and only provide the CLI which can be executed in a separate process with any java version provided by the toolkit launcher API

I guess it is tangential to the current issue. The tasks like forbiddenApisMain should be generated by some code sooner or later, so exposing the checker via jar does not resolve the configuration cache issue.

Not really, changing this to a statically compiled version would be a big change in the build system (currently using ANT). I tried to convert the plugin to use Gradle as build system instead of ant, but at end it failed due to classpath pollution by old ASM versions (as soon as you add gradleApi() dependency). With Ant at moment I can't compile the groovy file statically with the current build system. In addition it also has some dynamic features.

When refactoring the whole plugin into "subprojects" (one with the core logic and Apache Ant support as CLI and two separate ones for Maven and Gradle), I could manage to make the build working with Gradle.

With the current setup compiling the Gradle plugin is impossible (as the artifacts to compile against are not on Maven Central or any Maven repo), so not reachable to any Maven or Ant build, you need a local gradle installation to to compile.

@uschindler uschindler reopened this Mar 7, 2023
@uschindler uschindler modified the milestones: 3.3, 4.0 Mar 7, 2023
@uschindler
Copy link
Member

I reopened the issue and set a milestone for 4.0, but as said befor ethis is a major - and backwards incompatible change - so is not a "simple bugfix".

@uschindler
Copy link
Member

Here is my quick test, it fails when you execute it two times after each other:

test-gradle:
   [gradle] Initialized native services in: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\native
   [gradle] Initialized jansi services in: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\native
   [gradle]
   [gradle] Welcome to Gradle 7.4.1!
   [gradle]
   [gradle] Here are the highlights of this release:
   [gradle]  - Aggregated test and JaCoCo reports
   [gradle]  - Marking additional test source directories as tests in IntelliJ
   [gradle]  - Support for Adoptium JDKs in Java toolchains
   [gradle]
   [gradle] For more details see https://docs.gradle.org/7.4.1/release-notes.html
   [gradle]
   [gradle] Removing 0 daemon stop events from registry
   [gradle] Starting a Gradle Daemon (subsequent builds will be faster)
   [gradle] Starting process 'Gradle build daemon'. Working directory: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\daemon\7.4.1 Command: C:\Program Files\Java\jdk1.8.0_272\bin\java.exe -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=windows-1252 -Duser.country=DE -Duser.language=de -Duser.variant -cp C:\Program Files\Java\gradle-7.4.1\lib\gradle-launcher-7.4.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.4.1
   [gradle] Successfully started process 'Gradle build daemon'
   [gradle] An attempt to start the daemon took 1.874 secs.
   [gradle] The client will now receive all logging from the daemon (pid: 22080). The daemon log file: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\daemon\7.4.1\daemon-22080.out.log
   [gradle] Starting build in new daemon [memory: 455.5 MiB]
   [gradle] Closing daemon's stdin at end of input.
   [gradle] The daemon will no longer process any standard input.
   [gradle] Using 8 worker leases.
   [gradle] Configuration cache is an incubating feature.
   [gradle] Calculating task graph as no configuration cache is available for tasks: forbiddenApis
   [gradle] Watching the file system is configured to be enabled if available
   [gradle] Now considering [C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle] as hierarchies to watch
   [gradle] File system watching is active
   [gradle] Watching 1 directory hierarchies to track changes
   [gradle] Starting Build
   [gradle] Settings evaluated using settings file 'C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle\settings.gradle'.
   [gradle] Projects loaded. Root project using build file 'C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle\build.gradle'.
   [gradle] Included projects: [root project 'test-gradle']
   [gradle]
   [gradle] > Configure project :
   [gradle] Evaluating root project 'test-gradle' using build file 'C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle\build.gradle'.
   [gradle] Compiling build file 'C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle\build.gradle' using SubsetScriptTransformer.
   [gradle] Compiling build file 'C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle\build.gradle' using BuildScriptTransformer.
   [gradle] You are running forbidden-apis in the Gradle Daemon; disabling classloading cache by default to work around resource leak.
   [gradle] All projects evaluated.
   [gradle] Selected primary task 'forbiddenApis' from project :
   [gradle] Tasks to be executed: [task ':compileJava', task ':processResources', task ':classes', task ':forbiddenApisMain', task ':compileMain2Java', task ':processMain2Resources', task ':main2Classes', task ':forbiddenApisMain2', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':forbiddenApisTest', task ':forbiddenApis']
   [gradle] Tasks that were excluded: []
   [gradle] :compileJava (Thread[Execution worker for ':' Thread 5,5,main]) started.
   [gradle]
   [gradle] > Task :compileJava
   [gradle] Caching disabled for task ':compileJava' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':compileJava' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] The input changes require a full rebuild for incremental task ':compileJava'.
   [gradle] Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
   [gradle] Compiling with toolchain 'C:\Program Files\Java\jdk1.8.0_272'.
   [gradle] Compiling with JDK Java compiler API.
   [gradle] Class dependency analysis for incremental compilation took 0.179 secs.
   [gradle] Created classpath snapshot for incremental compilation in 4.654 secs.
   [gradle] :compileJava (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 8.878 secs.
   [gradle] :processResources (Thread[Execution worker for ':' Thread 5,5,main]) started.
   [gradle]
   [gradle] > Task :processResources NO-SOURCE
   [gradle] Skipping task ':processResources' as it has no source files and no previous output files.
   [gradle] :processResources (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 0.012 secs.
   [gradle] :classes (Thread[Execution worker for ':' Thread 5,5,main]) started.
   [gradle]
   [gradle] > Task :classes
   [gradle] Skipping task ':classes' as it has no actions.
   [gradle] :classes (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 0.002 secs.
   [gradle] :forbiddenApisMain (Thread[Execution worker for ':' Thread 5,5,main]) started.
   [gradle]
   [gradle] > Task :forbiddenApisMain
   [gradle] Caching disabled for task ':forbiddenApisMain' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':forbiddenApisMain' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] Reading bundled API signatures: jdk-unsafe-1.7
   [gradle] Reading bundled API signatures: jdk-deprecated-1.7
   [gradle] Reading bundled API signatures: jdk-non-portable
   [gradle] Reading bundled API signatures: jdk-reflection
   [gradle] Reading bundled API signatures: jdk-internal-1.7
   [gradle] Reading API signatures: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\src\tools\signatures\mysignatures.txt
   [gradle] Loading classes to check...
   [gradle] Scanning classes for violations...
   [gradle] Scanned 47 class file(s) for forbidden API invocations (in 0.54s), 0 error(s).
   [gradle] :forbiddenApisMain (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 0.599 secs.
   [gradle] :compileMain2Java (Thread[Execution worker for ':' Thread 5,5,main]) started.
   [gradle]
   [gradle] > Task :compileMain2Java
   [gradle] Caching disabled for task ':compileMain2Java' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':compileMain2Java' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] The input changes require a full rebuild for incremental task ':compileMain2Java'.
   [gradle] Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
   [gradle] Compiling with toolchain 'C:\Program Files\Java\jdk1.8.0_272'.
   [gradle] Compiling with JDK Java compiler API.
   [gradle] Class dependency analysis for incremental compilation took 0.054 secs.
   [gradle] Created classpath snapshot for incremental compilation in 0.021 secs.
   [gradle] :compileMain2Java (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 1.465 secs.
   [gradle] :processMain2Resources (Thread[Execution worker for ':' Thread 5,5,main]) started.
   [gradle]
   [gradle] > Task :processMain2Resources NO-SOURCE
   [gradle] Skipping task ':processMain2Resources' as it has no source files and no previous output files.
   [gradle] :processMain2Resources (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 0.002 secs.
   [gradle] :main2Classes (Thread[Execution worker for ':' Thread 5,5,main]) started.
   [gradle]
   [gradle] > Task :main2Classes
   [gradle] Skipping task ':main2Classes' as it has no actions.
   [gradle] :main2Classes (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 0.0 secs.
   [gradle] :forbiddenApisMain2 (Thread[Execution worker for ':' Thread 5,5,main]) started.
   [gradle]
   [gradle] > Task :forbiddenApisMain2
   [gradle] Caching disabled for task ':forbiddenApisMain2' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':forbiddenApisMain2' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] Reading bundled API signatures: jdk-unsafe-1.7
   [gradle] Reading bundled API signatures: jdk-deprecated-1.7
   [gradle] Reading bundled API signatures: jdk-non-portable
   [gradle] Reading bundled API signatures: jdk-reflection
   [gradle] Reading bundled API signatures: jdk-system-out
   [gradle] Reading API signatures: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\src\tools\signatures\mysignatures.txt
   [gradle] Loading classes to check...
   [gradle] Scanning classes for violations...
   [gradle] Scanned 47 class file(s) for forbidden API invocations (in 0.34s), 0 error(s).
   [gradle] :forbiddenApisMain2 (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 0.369 secs.
   [gradle] :compileTestJava (Thread[included builds,5,main]) started.
   [gradle]
   [gradle] > Task :compileTestJava
   [gradle] Caching disabled for task ':compileTestJava' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':compileTestJava' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] The input changes require a full rebuild for incremental task ':compileTestJava'.
   [gradle] Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
   [gradle] Compiling with toolchain 'C:\Program Files\Java\jdk1.8.0_272'.
   [gradle] Compiling with JDK Java compiler API.
   [gradle] Class dependency analysis for incremental compilation took 0.009 secs.
   [gradle] Created classpath snapshot for incremental compilation in 0.296 secs.
   [gradle] :compileTestJava (Thread[included builds,5,main]) completed. Took 0.971 secs.
   [gradle] :processTestResources (Thread[included builds,5,main]) started.
   [gradle]
   [gradle] > Task :processTestResources NO-SOURCE
   [gradle] Skipping task ':processTestResources' as it has no source files and no previous output files.
   [gradle] :processTestResources (Thread[included builds,5,main]) completed. Took 0.004 secs.
   [gradle] :testClasses (Thread[included builds,5,main]) started.
   [gradle]
   [gradle] > Task :testClasses
   [gradle] Skipping task ':testClasses' as it has no actions.
   [gradle] :testClasses (Thread[included builds,5,main]) completed. Took 0.0 secs.
   [gradle] :forbiddenApisTest (Thread[included builds,5,main]) started.
   [gradle]
   [gradle] > Task :forbiddenApisTest
   [gradle] Caching disabled for task ':forbiddenApisTest' because:
   [gradle]   Build cache is disabled
   [gradle] Task ':forbiddenApisTest' is not up-to-date because:
   [gradle]   Executed with '--rerun-tasks'.
   [gradle] Reading bundled API signatures: jdk-unsafe-1.7
   [gradle] Reading bundled API signatures: jdk-deprecated-1.7
   [gradle] Reading bundled API signatures: jdk-non-portable
   [gradle] Reading bundled API signatures: jdk-reflection
   [gradle] Reading API signatures: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\src\tools\signatures\mysignatures.txt
   [gradle] Loading classes to check...
   [gradle] Scanning classes for violations...
   [gradle] Scanned 3 class file(s) for forbidden API invocations (in 0.12s), 0 error(s).
   [gradle] :forbiddenApisTest (Thread[included builds,5,main]) completed. Took 0.131 secs.
   [gradle] :forbiddenApis (Thread[included builds,5,main]) started.
   [gradle]
   [gradle] > Task :forbiddenApis
   [gradle] Skipping task ':forbidd
   [gradle] Initialized native services in: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\native
   [gradle] Initialized jansi services in: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\native
   [gradle] The client will now receive all logging from the daemon (pid: 22080). The daemon log file: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\tmp-gradle\daemon\7.4.1\daemon-22080.out.log
   [gradle] Starting 2nd build in daemon [uptime: 23.287 secs, performance: 97%, non-heap usage: 22% of 256 MiB]
   [gradle] Using 8 worker leases.
   [gradle] Configuration cache is an incubating feature.
   [gradle] Closing daemon's stdin at end of input.
   [gradle] The daemon will no longer process any standard input.
   [gradle] Now considering [C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle] as hierarchies to watch
   [gradle] Reusing configuration cache.
   [gradle] Now considering [C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle] as hierarchies to watch
   [gradle] Watching the file system is configured to be enabled if available
   [gradle] File system watching is active
   [gradle]
   [gradle] FAILURE: Build failed with an exception.
   [gradle]
   [gradle] * What went wrong:
   [gradle] Could not load the value of field `closure` of `org.gradle.api.specs.internal.ClosureSpec` bean found in field `specs` of `org.gradle.api.specs.AndSpec` bean found in task `:forbiddenApisMain` of type `de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis`.
   [gradle] > de.thetaphi.forbiddenapis.gradle.plugin-init$_run_closure3$_closure5$_closure7
   [gradle]
   [gradle] * Try:
   [gradle] > Run with --debug option to get more log output.
   [gradle] > Run with --scan to get full insights.
   [gradle]
   [gradle] * Exception is:
   [gradle] org.gradle.api.GradleException: Could not load the value of field `closure` of `org.gradle.api.specs.internal.ClosureSpec` bean found in field `specs` of `org.gradle.api.specs.AndSpec` bean found in task `:forbiddenApisMain` of type `de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis`.
   [gradle]     at org.gradle.configurationcache.serialization.beans.BeanPropertyReaderKt.readPropertyValue(BeanPropertyReader.kt:108)
   [gradle]     at org.gradle.configurationcache.serialization.beans.BeanPropertyReader.readStateOf(BeanPropertyReader.kt:67)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.BeanCodec.readBeanOf(BeanCodec.kt:72)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.BeanCodec.decode(BeanCodec.kt:47)
   [gradle]     at org.gradle.configurationcache.serialization.CombinatorsKt$reentrant$1$decodeLoop$1.invokeSuspend(Combinators.kt:162)
   [gradle]     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
   [gradle]     at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
   [gradle]     at org.gradle.configurationcache.serialization.CombinatorsKt$reentrant$1.decodeLoop(Combinators.kt:163)
   [gradle]     at org.gradle.configurationcache.serialization.CombinatorsKt$reentrant$1.decode(Combinators.kt:127)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:59)
   [gradle]     at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:237)
   [gradle]     at org.gradle.configurationcache.serialization.CodecKt.readNonNull(Codec.kt:88)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec.readUpToDateSpec(TaskNodeCodec.kt:155)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec.access$readUpToDateSpec(TaskNodeCodec.kt:64)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec$readTask$2.invokeSuspend(TaskNodeCodec.kt:125)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec$readTask$2.invoke(TaskNodeCodec.kt)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec$readTask$2.invoke(TaskNodeCodec.kt)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.TaskNodeCodecKt.withTaskOf(TaskNodeCodec.kt:234)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.TaskNodeCodecKt.access$withTaskOf(TaskNodeCodec.kt:1)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec.readTask(TaskNodeCodec.kt:124)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec.decode(TaskNodeCodec.kt:76)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:59)
   [gradle]     at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:237)
   [gradle]     at org.gradle.configurationcache.serialization.CodecKt.readNonNull(Codec.kt:88)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.WorkNodeCodec.readNode(WorkNodeCodec.kt:84)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.WorkNodeCodec.readNodes(WorkNodeCodec.kt:65)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.WorkNodeCodec.readWork(WorkNodeCodec.kt:45)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheState.readWorkGraph(ConfigurationCacheState.kt:261)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheState.readBuildState$configuration_cache(ConfigurationCacheState.kt:233)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheState.readRootBuild(ConfigurationCacheState.kt:190)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheState.readRootBuildState(ConfigurationCacheState.kt:118)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO$readRootBuildStateFrom$1.invokeSuspend(ConfigurationCacheIO.kt:138)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO$readRootBuildStateFrom$1.invoke(ConfigurationCacheIO.kt)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO$readRootBuildStateFrom$1.invoke(ConfigurationCacheIO.kt)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO$readConfigurationCacheState$1.invokeSuspend(ConfigurationCacheIO.kt:167)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO$readConfigurationCacheState$1.invoke(ConfigurationCacheIO.kt)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO$readConfigurationCacheState$1.invoke(ConfigurationCacheIO.kt)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO$withReadContextFor$1$1$1$1.invokeSuspend(ConfigurationCacheIO.kt:233)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO$withReadContextFor$1$1$1$1.invoke(ConfigurationCacheIO.kt)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO$withReadContextFor$1$1$1$1.invoke(ConfigurationCacheIO.kt)
   [gradle]     at org.gradle.configurationcache.serialization.RunningKt$runReadOperation$2.invokeSuspend(Running.kt:34)
   [gradle]     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
   [gradle]     at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
   [gradle]     at org.gradle.configurationcache.serialization.RunningKt.runToCompletion(Running.kt:56)
   [gradle]     at org.gradle.configurationcache.serialization.RunningKt.runReadOperation(Running.kt:33)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO.withReadContextFor$configuration_cache(ConfigurationCacheIO.kt:232)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO.readConfigurationCacheState(ConfigurationCacheIO.kt:165)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheIO.readRootBuildStateFrom$configuration_cache(ConfigurationCacheIO.kt:136)
   [gradle]     at org.gradle.configurationcache.DefaultConfigurationCache$loadWorkGraph$1.invoke(DefaultConfigurationCache.kt:344)
   [gradle]     at org.gradle.configurationcache.DefaultConfigurationCache$loadWorkGraph$1.invoke(DefaultConfigurationCache.kt:343)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl$useForStateLoad$1.invoke(ConfigurationCacheRepository.kt:159)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl$useForStateLoad$1.invoke(ConfigurationCacheRepository.kt:159)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl$useForStateLoad$2.invoke(ConfigurationCacheRepository.kt:164)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl$useForStateLoad$2.invoke(ConfigurationCacheRepository.kt:163)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheRepository$withExclusiveAccessToCache$1.create(ConfigurationCacheRepository.kt:244)
   [gradle]     at org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess.withFileLock(LockOnDemandCrossProcessCacheAccess.java:90)
   [gradle]     at org.gradle.cache.internal.DefaultCacheAccess.withFileLock(DefaultCacheAccess.java:191)
   [gradle]     at org.gradle.cache.internal.DefaultPersistentDirectoryStore.withFileLock(DefaultPersistentDirectoryStore.java:188)
   [gradle]     at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.withFileLock(DefaultCacheFactory.java:209)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheRepository.withExclusiveAccessToCache(ConfigurationCacheRepository.kt:242)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheRepository.access$withExclusiveAccessToCache(ConfigurationCacheRepository.kt:46)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl.useForStateLoad(ConfigurationCacheRepository.kt:163)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl.useForStateLoad(ConfigurationCacheRepository.kt:159)
   [gradle]     at org.gradle.configurationcache.DefaultConfigurationCache$loadFromCache$result$1.invoke(DefaultConfigurationCache.kt:357)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheBuildOperationsKt$withOperation$1.call(ConfigurationCacheBuildOperations.kt:39)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheBuildOperationsKt.withOperation(ConfigurationCacheBuildOperations.kt:37)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheBuildOperationsKt.withLoadOperation(ConfigurationCacheBuildOperations.kt:27)
   [gradle]     at org.gradle.configurationcache.DefaultConfigurationCache.loadFromCache(DefaultConfigurationCache.kt:356)
   [gradle]     at org.gradle.configurationcache.DefaultConfigurationCache.loadWorkGraph(DefaultConfigurationCache.kt:343)
   [gradle]     at org.gradle.configurationcache.DefaultConfigurationCache.loadOrScheduleRequestedTasks(DefaultConfigurationCache.kt:130)
   [gradle]     at org.gradle.configurationcache.ConfigurationCacheAwareBuildTreeWorkPreparer.scheduleRequestedTasks(ConfigurationCacheAwareBuildTreeWorkPreparer.kt:28)
   [gradle]     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$doScheduleAndRunTasks$2(DefaultBuildTreeLifecycleController.java:89)
   [gradle]     at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph.withNewWorkGraph(DefaultIncludedBuildTaskGraph.java:75)
   [gradle]     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.doScheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:88)
   [gradle]     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:106)
   [gradle]     at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:166)
   [gradle]     at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:238)
   [gradle]     at org.gradle.internal.model.StateTransitionController.lambda$transition$7(StateTransitionController.java:166)
   [gradle]     at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
   [gradle]     at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:166)
   [gradle]     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:103)
   [gradle]     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:69)
   [gradle]     at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
   [gradle]     at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
   [gradle]     at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
   [gradle]     at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:69)
   [gradle]     at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:119)
   [gradle]     at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
   [gradle]     at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
   [gradle]     at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:128)
   [gradle]     at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
   [gradle]     at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
   [gradle]     at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65)
   [gradle]     at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
   [gradle]     at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65)
   [gradle]     at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
   [gradle]     at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
   [gradle]     at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
   [gradle]     at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
   [gradle]     at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
   [gradle]     at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:270)
   [gradle]     at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:119)
   [gradle]     at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
   [gradle]     at org.gradle.tooling.internal.provider.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:103)
   [gradle]     at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
   [gradle]     at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
   [gradle]     at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100)
   [gradle]     at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88)
   [gradle]     at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69)
   [gradle]     at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
   [gradle]     at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
   [gradle]     at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63)
   [gradle]     at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
   [gradle]     at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58)
   [gradle]     at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42)
   [gradle]     at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
   [gradle] Watched directory hierarchies: [C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\test-gradle]
   [gradle] Configuration cache entry reused.
   [gradle]     at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
   [gradle]     at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
   [gradle]     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
   [gradle]     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   [gradle]     at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
   [gradle]     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   [gradle]     at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
   [gradle]     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   [gradle]     at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
   [gradle]     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   [gradle]     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
   [gradle]     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
   [gradle]     at org.gradle.util.internal.Swapper.swap(Swapper.java:38)
   [gradle]     at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
   [gradle]     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   [gradle]     at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
   [gradle]     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   [gradle]     at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
   [gradle]     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
   [gradle]     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   [gradle]     at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
   [gradle]     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
   [gradle]     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
   [gradle]     at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
   [gradle]     at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
   [gradle]     at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
   [gradle]     at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
   [gradle] Caused by: java.lang.ClassNotFoundException: de.thetaphi.forbiddenapis.gradle.plugin-init$_run_closure3$_closure5$_closure7
   [gradle]     at org.gradle.internal.classloader.TransformingClassLoader.findClass(TransformingClassLoader.java:52)
   [gradle]     at org.gradle.configurationcache.serialization.DefaultReadContext.readClass(Contexts.kt:263)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.BeanCodec.decode(BeanCodec.kt:44)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.ClosureCodec.decode(ClosureCodec.kt:39)
   [gradle]     at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:59)
   [gradle]     at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:237)
   [gradle]     at org.gradle.configurationcache.serialization.beans.BeanPropertyReaderKt.readPropertyValue(BeanPropertyReader.kt:102)
   [gradle]     ... 157 more
   [gradle]
   [gradle]
   [gradle] * Get more help at https://help.grad

BUILD FAILED
C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build.xml:646: exec returned: 1

@uschindler
Copy link
Member

uschindler commented Mar 7, 2023

Anyways, as stated before: This configuration cache is a total desaster. It does not work in any project I am working with. It is a huge hack and against all good concepts of programming. The hacks (like this one triggers) are not worth to support it.

So basically, a rewrite may change the issue, but as stated before: This plugin does not support configuration cache "officially" and will never do.

@eskatos
Copy link

eskatos commented Mar 7, 2023

FWIW starting with Gradle 8.0 configuration cache problems should surface on the first run.

@vlsi
Copy link
Contributor

vlsi commented Mar 11, 2023

With the current setup compiling the Gradle plugin is impossible (as the artifacts to compile against are not on Maven Central or any Maven repo), so not reachable to any Maven or Ant build, you need a local gradle installation to to compile

You can use https://central.sonatype.com/artifact/dev.gradleplugins/gradle-api/8.0.2/versions dependency (or whatever version you prefer)

See https://docs.nokee.dev/manual/gradle-plugin-development.html#sec:gradle-dev-redistributed-gradle-api

@uschindler
Copy link
Member

uschindler commented Mar 12, 2023

With the current setup compiling the Gradle plugin is impossible (as the artifacts to compile against are not on Maven Central or any Maven repo), so not reachable to any Maven or Ant build, you need a local gradle installation to to compile

You can use https://central.sonatype.com/artifact/dev.gradleplugins/gradle-api/8.0.2/versions dependency (or whatever version you prefer)

See https://docs.nokee.dev/manual/gradle-plugin-development.html#sec:gradle-dev-redistributed-gradle-api

Hi,
we already have the APIs included in the dependencies. The problem in the past was some "non public" APIs required to setup plugins like this. The problem was that those were not part of the artifacts and you were not able to link to them using Java code.

This may have changed in the meanttime. I will try to rewrite the code with Java and keep the Groovy code to a minimum or remove it completely. I just need so time to try out. The downside is that code gets verbose (like 5 times as much code as it cannot be written so elegant).

If I can make it work with pure Java and only using the dependencies that are availabe on the Gradle Repository (or Maven central).

Uwe

P.S.: dev.gradleplugins Maven coordinates are there for not so long time. They redeployed all of those recently. That's good because I can remove the legacy repository that is currently added to the forbiddenapis build. Thanks for the pointer. This was a long-ongoing issue of complaints that the Gradle APIs and core parts of its implementation were not available on Maven Central and only in some undocumented/unmaintained repos.

@uschindler
Copy link
Member

Hi,
I changed the artifacts already. Otherwise unmodified build succeeds: 734fec9

I will look into rewriting the Groovy code to be statically linked (some if/else statements are there to support older/newer versions).

@uschindler
Copy link
Member

uschindler commented Mar 12, 2023

I have full-java version almost ready :-) The following is still missing:

  • Backwards compatibility for task creation avoidance
  • classesDir vs classesDir property on SourceSet output

@uschindler
Copy link
Member

uschindler commented Mar 12, 2023

Rewriting the plugin-init.groovy as pure Java Code was not easy possible and too verbose (especially because of the task creation avoidance).

So I created a simple PR that just restructures the code and compiles the groovy code as a full class ForbiddenApisPlugin: #221

This is also the solution with minimal risk, as the code is basically the same, just compiled at build time. It also has "indy" (invokedynamic) features enabled.

JAR file looks like this, so Groovy classes are included:
image

@uschindler
Copy link
Member

I also checked the configuration cache with running it three times: works.

I will merge the PR now. New version will be released when Java 20 came out and ASM was updated for Java 21.

@uschindler
Copy link
Member

I also verified that it works with Gradle 8.0.2 on Jenkins (but I didn't check the configuration cache).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants