Said BOUDJELDA created KAFKA-15494:
--------------------------------------
Summary: Remove deprecation call of task registration of Gradle on
build.gradle and use tasks.register instead
Key: KAFKA-15494
URL: https://issues.apache.org/jira/browse/KAFKA-15494
Project: Kafka
Issue Type: Improvement
Reporter: Said BOUDJELDA
Assignee: Said BOUDJELDA
On the purpose of preparing the future upgrades of Gradle wrapper, we need to
get ride of the deprecated calls of certains methods as tasks registrations,
this will make the future upgrades to *Gradle 9* where plenty of methods are
marked for removal for this future big release, that will for sure brings
support for *JDK 21*
an exemple of deprecated usage of task registration
{code:java}
task aggregatedJavadoc(type: Javadoc, dependsOn: compileJava) {
def projectsWithJavadoc = subprojects.findAll { it.javadoc.enabled }
source = projectsWithJavadoc.collect { it.sourceSets.main.allJava }
classpath = files(projectsWithJavadoc.collect {
it.sourceSets.main.compileClasspath })
includes = projectsWithJavadoc.collectMany { it.javadoc.getIncludes() }
excludes = projectsWithJavadoc.collectMany { it.javadoc.getExcludes() }
options.charSet = 'UTF-8'
options.docEncoding = 'UTF-8'
options.encoding = 'UTF-8'
// Turn off doclint for now, see
https://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html for
rationale
options.addStringOption('Xdoclint:none', '-quiet')
// The URL structure was changed to include the locale after Java 8
if (JavaVersion.current().isJava11Compatible())
options.links
"https://docs.oracle.com/en/java/javase/${JavaVersion.current().majorVersion}/docs/api/"
else
options.links "https://docs.oracle.com/javase/8/docs/api/"
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)