aaschmid / gradle-cpd-plugin

Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD).
Apache License 2.0
95 stars 12 forks source link

Declare system property usage (for Gradle 7 configuration cache) #56

Closed C-Otto closed 3 years ago

C-Otto commented 3 years ago

With Gradle 7 M3 and --configuration-cache I get an error that the CPD plugin reads a system property that is not declared.

org.gradle.api.InvalidUserCodeException: Read system property 'file.encoding'
    at org.gradle.configurationcache.SystemPropertyAccessListener.systemPropertyQueried(SystemPropertyAccessListener.kt:92)
    at org.gradle.internal.classpath.Instrumented.systemProperty(Instrumented.java:83)
    at org.gradle.internal.classpath.Instrumented.systemProperty(Instrumented.java:77)
    at de.aaschmid.gradle.plugins.cpd.CpdExtension.<init>(CpdExtension.java:26)
    at de.aaschmid.gradle.plugins.cpd.CpdExtension_Decorated.<init>(Unknown Source)

Possible fix: https://docs.gradle.org/7.0-milestone-3/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read

aaschmid commented 3 years ago

hm ... actually thought that this is already fixed. However it seems not to. Thanks for reporting @C-Otto. I will try to fix it asap for staying compatible with the next version.

aaschmid commented 3 years ago

Duplicate of #54 and there I at least partly fixed it ;-)

However never released it as you did not confirm the fix...

C-Otto commented 3 years ago

Oh sorry, I forgot about the other issue... is there anything I can do now?

aaschmid commented 3 years ago

No, I thing I got the remaining problem about this and I think about fixing it will by using default encoding of UTF-8