Skip to content

Commit

Permalink
Generates java-doc and sources jar files to publish in to maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
kvmw committed Jan 5, 2023
1 parent 58c827f commit 02e69f9
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ configure(subprojects - [project(":spring-cloud-services-starter-config-client")
options.encoding = "UTF-8"
}

[compileJava, compileTestJava]*.options*.compilerArgs = [
"-Xlint:all",
// "-Werror"
]
java {
withJavadocJar()
withSourcesJar()
}

[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:all"]

test {
// enable JUnit 5
Expand Down Expand Up @@ -159,22 +161,6 @@ configure(subprojects - [project(":spring-cloud-services-starter-config-client")
options.addStringOption('Xdoclint:none', '-quiet')
}

task sourcesJar(type: Jar, dependsOn:classes) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
classifier = "sources"
from sourceSets.main.allJava
}

task javadocJar(type: Jar) {
classifier = "javadoc"
from javadoc
}

artifacts {
archives sourcesJar
archives javadocJar
}

task allDependencyInsight(type: DependencyInsightReportTask) {}
task allDependencies(type: DependencyReportTask) {}
}
Expand Down

0 comments on commit 02e69f9

Please sign in to comment.