Skip to content

Commit 9e08c7c

Browse files
committed
Use tasks.register() Gradle API
* Remove `artifacts` as it is a part for publication now
1 parent 35160a3 commit 9e08c7c

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

build.gradle

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ task reference(dependsOn: asciidoctor) {
486486

487487
reference.onlyIf { "$System.env.NO_REFERENCE_TASK" != 'true' || project.hasProperty('ignoreEnvToStopReference') }
488488

489-
task api(type: Javadoc) {
489+
tasks.register('api', Javadoc) {
490490
group = 'Documentation'
491491
description = 'Generates aggregated Javadoc API documentation.'
492492
title = "${rootProject.description} ${version} API"
@@ -509,10 +509,10 @@ task api(type: Javadoc) {
509509
classpath = files(javaProjects.collect { project ->
510510
project.sourceSets.main.compileClasspath
511511
})
512-
destinationDir = new File(buildDir, 'api')
512+
destinationDir = file('build/api')
513513
}
514514

515-
task docsZip(type: Zip, dependsOn: [reference]) {
515+
tasks.register('docsZip', Zip) {
516516
group = 'Distribution'
517517
archiveClassifier = 'docs'
518518
description = "Builds -${archiveClassifier} archive containing api and reference " +
@@ -537,7 +537,8 @@ task docsZip(type: Zip, dependsOn: [reference]) {
537537
}
538538
}
539539

540-
task distZip(type: Zip, dependsOn: [docsZip]) { //, schemaZip]) {
540+
tasks.register('distZip', Zip) {
541+
dependsOn 'docsZip'
541542
group = 'Distribution'
542543
archiveClassifier = 'dist'
543544
description = "Builds -${archiveClassifier} archive, containing all jars and docs, " +
@@ -575,12 +576,8 @@ task distZip(type: Zip, dependsOn: [docsZip]) { //, schemaZip]) {
575576

576577
}
577578

578-
artifacts {
579-
archives distZip
580-
archives docsZip
581-
}
582-
583-
task dist(dependsOn: assemble) {
579+
tasks.register('dist') {
580+
dependsOn assemble
584581
group = 'Distribution'
585582
description = 'Builds -dist, -docs distribution archives.'
586583
}

0 commit comments

Comments
 (0)