playframework icon indicating copy to clipboard operation
playframework copied to clipboard

Fix Gradle 6 warnings

Open PaulFridrick opened this issue 5 years ago • 4 comments

I use Gradle 6 and the playframework plugin. All these warnings seem to come from the plugin:

  • The baseName property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the distributionBaseName property instead.

  • The ProjectLayout.configurableFiles() method has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the ObjectFactory.fileCollection() method instead.

  • The destinationDir property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the destinationDirectory property instead.

  • The baseName property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the archiveBaseName property instead.

  • The runtimeClasspath configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the implementation or compileOnly or runtimeOnly configuration instead.

PaulFridrick avatar Nov 22 '19 09:11 PaulFridrick

Thanks for notifying us about those warning. Would you be willing to provide us some PRs to remove each warning? Ideally, it would be best to provide one PR per warning type simply because there may be a minimum supported Gradle version we want to support and the alternate API may not be available. This way we can more easily merge the PRs and provide releases without warning. Thanks a lot.

lacasseio avatar Nov 22 '19 12:11 lacasseio

I have one more fix (see PR https://github.com/PaulFridrick/playframework/pull/1) that depends on the gradle 6 migration (PR https://github.com/gradle/playframework/pull/120), but it breaks the compatibility with Gradle 5 (the tests in InDepthUserGuideSamplesIntegrationTest fail with the versions "5.1.1", "5.2.1", "5.5.1" and "5.6.4").

PaulFridrick avatar Dec 09 '19 11:12 PaulFridrick

@PaulFridrick +1 for moving to Gradle 6.x and drop Gradle 5.

aadrian avatar Dec 09 '19 11:12 aadrian

My organization sees the following issue when building with 5.6.4:

image

I would prefer wrapping JavaScriptMinify line 44 with a version compatibility check. In pseudocode:

if (project.gradleVersion <= '5.1') {
  compilerClasspath = getProject().files()
} else {
  compilerClasspath = getProject().getObjects().fileCollection()
}

This same change would probably be necessary to all classes affected by this commit: https://github.com/gradle/playframework/commit/ef775a8f74cbb4539b8ea4c63321605962ddb7b3

DPUkyle avatar Jun 15 '20 19:06 DPUkyle