Update deprecated Gradle task creation
This commit replaces use of the deprecated Gradle `task` method with the new `tasks.register` method. Closes gh-34617 Signed-off-by: Dmitry Sulman <dmitry.sulman@gmail.com>
This commit is contained in:
committed by
Sam Brannen
parent
adb4b675fc
commit
5455c645f0
@@ -87,14 +87,15 @@ javadoc {
|
||||
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
tasks.register('sourcesJar', Jar) {
|
||||
dependsOn classes
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
archiveClassifier.set("sources")
|
||||
from sourceSets.main.allSource
|
||||
// Don't include or exclude anything explicitly by default. See SPR-12085.
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar) {
|
||||
tasks.register('javadocJar', Jar) {
|
||||
archiveClassifier.set("javadoc")
|
||||
from javadoc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user