cjstehno / gradle-natives

Gradle plugin to aid in managing native libraries associated with Java-based projects.
http://cjstehno.github.io/gradle-natives/
Apache License 2.0
32 stars 4 forks source link

'runtime' and 'compile' configurations are deprecated and will be removed with Gradle 7.0 #26

Open steffen-wilke opened 4 years ago

steffen-wilke commented 4 years ago

From the official Gradle docs:

The usage of the compile and runtime configurations in the Java ecosystem plugins has been discouraged since Gradle 3.4.

also see: Upgrading from 5.6 and earlier

With Gradle 7.0 these configurations will be removed entirely. As I understand, they are the default configurations for this plugin.

https://github.com/cjstehno/gradle-natives/blob/befa2272c8c0bc29a9aa23cecb579b2947fdbd42/src/main/groovy/com/stehno/gradle/natives/ext/NativesExtension.groovy#L32

I was able to upgrade the LITIENGINE project to 6.2.2 and get rid of any warnings while still keeping the functionality of this plugin by changing the configuration to

Working:

natives {
  configurations = ['runtimeClasspath']
  // ...
}

Currently suggested in the readme:

natives {
  configurations = ['compile', 'runtime']
 // ...
}

To properly support upcoming gradle versions, it would be great if this plugin could switch to the recommended configurations. (i.e. use runtimeClasspath and compileClasspath instead of runtime and compile. At the very least, this should be mentioned in the README.md.