Skip to content

Commit 2e7f1c8

Browse files
authored
Merge pull request #1503 from lesserwhirls/gradle
Gradle improvements
2 parents 39adbb1 + f9a383b commit 2e7f1c8

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

build.gradle.kts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
* See LICENSE for license information.
44
*/
55

6-
plugins { alias(libs.plugins.spotless) }
6+
plugins {
7+
id("java-base-conventions")
8+
alias(libs.plugins.spotless)
9+
}
710

811
description = "The Unidata netCDF-Java library (aka CDM)."
912

@@ -23,3 +26,19 @@ spotless {
2326
ktfmt().googleStyle()
2427
}
2528
}
29+
30+
// Aggregate task for building all public artifacts
31+
// Used to assemble the jars that should be scanned by OWASP Dependency Check
32+
// job on Jenkins
33+
tasks.register("buildPublicArtifacts") {
34+
group = "build"
35+
val publicArtifacts = project.extra.get("public.artifacts")
36+
if (publicArtifacts is List<*>) {
37+
dependsOn(publicArtifacts.map { ":$it:jar" })
38+
} else {
39+
logger.error(
40+
"Cannot access the list of public artifacts. The project-wide code coverage report will be incomplete!"
41+
)
42+
}
43+
dependsOn(":uber-jars:buildNetcdfAll", ":uber-jars:buildToolsUI", ":uber-jars:buildNcIdv")
44+
}

gradle.properties.old

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)