Open CedricNdong opened 1 year ago
Thanks for your report, could you try two more approaches:
Hey there! I encountered a similar issue. My project structure looks like this:
src:
- integrationTest
- main
- test
- pactTest
I'm using Gradle version 8.2.1 and the SpotBugs plugin version 6.0.14. Any insights or suggestions on how to resolve this would be much appreciated!
The error: A problem occurred evaluating root project 'skarb-ngo'.
Could not find method spotbugsIntegrationTest() for arguments [build_12mb3e7o58k220dky36lig4uu$_run_closure3$_closure17@513b5b3f] on project ':kafka-starter' of type org.gradle.api.Project.
Describe the bug When attempting to disable the spotbugsIntegrationTest task in a separate spotbugs.gradle file and then applying this file in the main build.gradle, I encounter a groovy.lang.MissingPropertyException for the task spotbugsIntegrationTest, even though this task exists.
To Reproduce Steps to reproduce the behavior:
spotbugsIntegrationTest.enabled = false
3.In the build.gradle file, apply the SpotBugs plugin with apply from: "$rootDir/spotbugs.gradle"
Expected behavior The spotbugsIntegrationTest task should be disabled and not run during the build.
Actual behavior I receive the following error:
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'spotbugsIntegrationTest' for root project '...' of type org.gradle.api.Project.
Environment Gradle version: 7.4.2 SpotBugs plugin version: 5.1.1 Java version: openjdk 17.0.6 2023-01-17 Operating System: Windows 11
Additional context I've attempted to use lazy configuration with tasks.named('spotbugsIntegrationTest').configure, but the issue persists.