kelloggm / checkerframework-gradle-plugin

Gradle plugin to use the Checker Framework for Java
Apache License 2.0
66 stars 15 forks source link

Use Gradle 7.2 #176

Closed mernst closed 2 years ago

mernst commented 2 years ago

This pull request is currently failing because Gradle 7.2 is a bit stricter and there are a few things that need to be fixed in the buildfile.

mernst commented 2 years ago

@kelloggm The build is failing with

* What went wrong:
Execution failed for task ':processResources'.
> Entry META-INF/gradle-plugins/org.checkerframework.properties is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

Could you please look into what Gradle changes are required? Thanks.

kelloggm commented 2 years ago

@mernst there were two problems:

  1. Gradle's rules for duplicate copy operations have changed from "silently overwrite" to "fail", even if the copy was caused by something outside our code. I tried for awhile to figure out where the copy was originating, but eventually gave up and added an overwrite-by-default policy.
  2. We had previously used whatever groovy version shipped with the gradle version to run the tests. However, the test framework (spock) needs to be parameterized by the version, so we were actually depending on that. I made the Groovy version explicit, and upgraded to a modern-ish one.