forked from Unidata/netcdf-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
132 lines (113 loc) · 5.29 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// The buildscript {} block is evaluated before anything else in the script (regardless of location in file).
// See http://goo.gl/EO8S1k. So, might as well put it first.
//
buildscript {
// Add the "buildPlugins" ExtraProperty. It should be usable from the rest of this script as well.
// See http://goo.gl/9bixNV
apply from: "$rootDir/gradle/any/shared-mvn-coords.gradle"
// The buildscript {} block is odd: even though we applied dependencies.gradle above, the repositories therein
// do not get included here. Instead, we must explicitly define the repos again. Yay for duplication.
repositories {
mavenCentral()
gradlePluginPortal()
exclusiveContent {
forRepository {
maven {
url "https://artifacts.unidata.ucar.edu/repository/unidata-all/"
}
}
// only look for unidata plugin related artifacts from the unidata-all repo
filter {
includeModule 'com.burgstaller', 'okhttp-digest'
includeModule 'org.ysb33r.gradle', 'grolifant'
includeModule 'edu.ucar.unidata.site', 'jekyll-plugin'
includeModule 'edu.ucar.unidata.site', 'jekyll-gems'
includeModule 'edu.ucar.unidata', 'unidata-nexus-gradle'
}
}
}
dependencies {
classpath buildPlugins.shadow
classpath buildPlugins.sonarqube
classpath buildPlugins.spotless
classpath buildPlugins.protobuf
classpath buildPlugins.depcheck
classpath buildPlugins.nexus
classpath buildPlugins.jekyll
}
}
allprojects {
// Matches Maven's "project.groupId". Used in MANIFEST.MF for "Implementation-Vendor-Id".
group = 'edu.ucar'
// Matches Maven's "project.version". Used in MANIFEST.MF for "Implementation-Version".
// We try to follow semantic versioning, and thus we use <major>.<minor>.<patch>-<prerelease version>
// <prerelease version> may be SNAPSHOT, alphax, betax, etc.
// Note - if bumping to a new major or minor version, be sure to update the docs (see step 1 in
// docs/src/private/internal/release.md for details)
version = '5.6.1-SNAPSHOT'
status = 'development'
}
// Matches Maven's "project.description".
description = 'The Unidata netCDF-Java library (aka CDM).'
import java.text.SimpleDateFormat
// These will be inherited by subprojects: http://goo.gl/5mvqf7
// After declaration, they should NOT be referred to using the "ext" namespace, instead preferring e.g.
// "project.title" or simply "title": http://stackoverflow.com/questions/14530901
// That way, the property will be robustly resolved, as described here: http://goo.gl/UBq0en
// Otherwise, only the one specific ExtraPropertiesExtension will be searched.
ext {
// Matches Maven's "project.name". Used in MANIFEST.MF for "Implementation-Title".
title = 'CDM modules'
// Matches Maven's "project.organization.name". Used in MANIFEST.MF for "Implementation-Vendor".
vendor = 'UCAR/Unidata'
// It makes sense to publish major.minor versions of the docs, as
// any patch bumps should be backwards compatible bug fixes only
// To do this, we need to make a special "doc version" string.
// First, drop any dangling snapshot, alpha, beta tags
cleanVersion = "$version".split('-')[0]
// tokenize version on the '.' character, which gives us a list of [major, minor, patch]
docVersionParts = cleanVersion.tokenize('.')
// we should always have a major, minor, and patch value in our version
assert docVersionParts.size == 3
// keep major and minor parts of the version and use those to version the docs
docVersion = docVersionParts[0] + '.' + docVersionParts[1]
// Matches Maven's "project.url". Used in MANIFEST.MF for "Implementation-URL".
url = 'https://www.unidata.ucar.edu/software/netcdf-java/'
SimpleDateFormat iso_8601_format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
buildTimestamp = iso_8601_format.format(new Date())
// Will hold the list of projects that apply the java plugin
// Used by :docs (javadocAll), project wide coverage reports, and sonarqube
javaProjects = []
}
gradle.projectsEvaluated {
javaProjects = subprojects.findAll {
subproject -> subproject.plugins.hasPlugin('java')
}
}
tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = '6.9.1'
}
// Set up properties needed for all testing, adds "testAll" task to root
apply from: "$rootDir/gradle/root/testing.gradle"
// Generates coverage report for testAll
apply from: "$rootDir/gradle/root/coverage.gradle"
// Attaches fatJar tasks to root project (makes toolsUI, ncIdv, etc.)
apply from: "$rootDir/gradle/root/fatJars.gradle"
// Creates pubs for artifacts created in fatJars.gradle
apply from: "$rootDir/gradle/root/publishing.gradle"
// Adds "sonarqube" task to the root project
apply from: "$rootDir/gradle/root/sonarqube.gradle"
// Adds the spotless tasks to the root project and add check for .gradle files
apply from: "$rootDir/gradle/root/spotless.gradle"
// Adds the owasp dependency-check tasks to the root project (dependencyCheckAggregate for project-wide check)
apply from: "$rootDir/gradle/root/dependency-check.gradle"
// Modifies Jar tasks created in fatJars.gradle
apply from: "$rootDir/gradle/any/archiving.gradle"
// Modifies pubs created in root/publishing.gradle
apply from: "$rootDir/gradle/any/publishing.gradle"
// shortcut to run toolsUI
tasks.register("toolsui") {
group = "application"
dependsOn(":uicdm:run")
}