The following build.gradle snippet has been working fine with gradle 7.x:
import org.apache.tools.ant.filters.*;
task installScript(type: Copy) {
from "../templates/java-program-wrapper.sh"
into "$installDir/bin/"
rename ('java-program-wrapper.sh', "$programName")
fileMode 0755
filter(FixCrLfFilter.class,
eol:FixCrLfFilter.CrLf.newInstance("lf"))
// Replace each token of form "@token" with the given value
filter(ReplaceTokens, tokens:
[
jarName: shadowJar.archiveFileName.get(),
javaMajorVersion: javaRunVersion,
//javaMajorVersion: sourceCompatibility.toString(),
installDir: installDir
])
}
Now with gradle 8.4 I get:
The Project.getConvention() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#deprecated_access_to_conventions
The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#deprecated_access_to_conventions
The org.gradle.util.ConfigureUtil type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#org_gradle_util_reports_deprecations
at build_8guu4is3ogchpeu8ynwwr05lr$_run_closure5.doCall$original(C:\Users\mcooper\ws\cmb\7.2\CmbProduct\ChangeLogBuilder\build.gradle:76)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#java_convention_deprecation
at build_8guu4is3ogchpeu8ynwwr05lr$_run_closure5.doCall$original(C:\Users\mcooper\ws\cmb\7.2\CmbProduct\ChangeLogBuilder\build.gradle:76)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The line 76 corresponds to:
jarName: shadowJar.archiveFileName.get(),
I can’t seem to figure out what exactly is the problem here. I’ve read over the URL’s it outputs but still can’t seem to nail it down.
Would appreciate some help on this.
mike