Gradle 5.3/5.4 Codenarc custom failing- picking daemon file path instead of project path

my project structure is like this

.someproject
├── src
│ └── main
| . └── test
├── codenarc
│ ├── CodeNarcMainRules.groovy
│ ├── CodeNarcTestRules.groovy
│ └── StarterRuleSet-AllRulesByCategory.groovy.txt

I have a local gradle installation. but when I run my codenarc custom task ./gradlew codenarcMain task it doens’t pick my project folder structure instead points the rules files to gradle daemon folder

./gradlew codenarcMain

Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

Task :codenarcMain FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:codenarcMain’.

java.io.FileNotFoundException: /Users/myUserName/.gradle/daemon/5.4/config/codenarc/StarterRuleSet-AllRulesByCategory.groovy.txt (No such file or directory)

while my it should be /Users/myUserName/someproject/config/codenarc/StarterRuleSet-AllRulesByCategory.groovy.txt

The same thing works only one time if I run
./gradlew codenarcMain --no-daemon

Has anyone faced this. This was working before until I upgraded from 4.9 to 5.3