Skip to content

Commit

Permalink
Remove obsolete artifacts from Gradle
Browse files Browse the repository at this point in the history
Rely fully on the `publishing`
  • Loading branch information
artembilan committed Jan 19, 2024
1 parent 7d438dc commit e599140
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,17 @@ dependencies {
}

def observationInputDir = file('spring-kafka/src/main/java/org/springframework/kafka/support/micrometer').absolutePath
def generatedDocsDir = file("$buildDir/docs/generated").absolutePath
def generatedDocsDir = file('build/docs/generated').absolutePath

task generateObservabilityDocs(type: JavaExec) {
tasks.register('generateObservabilityDocs', JavaExec) {
mainClass = 'io.micrometer.docs.DocsGeneratorCommand'
inputs.dir(observationInputDir)
outputs.dir(generatedDocsDir)
classpath configurations.micrometerDocs
args observationInputDir, /.+/, generatedDocsDir
}

task filterMetricsDocsContent(type: Copy) {
tasks.register('filterMetricsDocsContent', Copy) {
dependsOn generateObservabilityDocs
from generatedDocsDir
include '_*.adoc'
Expand All @@ -404,7 +404,7 @@ task filterMetricsDocsContent(type: Copy) {
filter { line -> line.replaceAll('org.springframework.kafka.support.micrometer.', '').replaceAll('^Fully qualified n', 'N') }
}

task api(type: Javadoc) {
tasks.register('api', Javadoc) {
group = 'Documentation'
description = 'Generates aggregated Javadoc API documentation.'
title = "${rootProject.description} ${version} API"
Expand All @@ -430,7 +430,7 @@ task api(type: Javadoc) {
destinationDir = file('build/api')
}

task docsZip(type: Zip) {
tasks.register('docsZip', Zip) {
group = 'Distribution'
archiveClassifier = 'docs'
description = "Builds -${archiveClassifier} archive containing api and reference " +
Expand All @@ -445,7 +445,8 @@ task docsZip(type: Zip) {
}
}

task distZip(type: Zip, dependsOn: [docsZip]) {
tasks.register('distZip', Zip) {
dependsOn 'docsZip'
group = 'Distribution'
archiveClassifier = 'dist'
description = "Builds -${archiveClassifier} archive, containing all jars and docs, " +
Expand Down Expand Up @@ -483,12 +484,8 @@ task distZip(type: Zip, dependsOn: [docsZip]) {

}

artifacts {
archives distZip
archives docsZip
}

task dist(dependsOn: assemble) {
tasks.register('dist') {
dependsOn assemble
group = 'Distribution'
description = 'Builds -dist, -docs distribution archives.'
}
Expand Down

0 comments on commit e599140

Please sign in to comment.