1 Star 0 Fork 0

China_jin/netcdf-java

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 6.13 KB
一键复制 编辑 原始数据 按行查看 历史
Sean Arms 提交于 2021-05-21 11:05 . Resume work on 6.0.0-SNAPSHOT
// 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 {
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 '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.gretty
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 = '6.0.0-SNAPSHOT'
// Eventually, we'll stop appending "SNAPSHOT" to our versions and just use this.
status = 'development'
}
// Matches Maven's "project.description".
description = 'The Unidata netCDF-Java library (aka CDM).'
import java.nio.file.Paths
import java.text.SimpleDateFormat
def getBranchName(mustExist=false) {
def branchName = ''
// If this is a git repo, grab the branch name to tag the sonarcloud analysis
def headFile = Paths.get("$rootDir", ".git", "HEAD").toFile()
if (headFile.exists()) {
String head = headFile.getText('UTF-8')
branchName = head.split('refs/heads/').last()
} else if (mustExist) {
throw new FileNotFoundException("The task calling this function requires that it be ran from a git repository. Cannot find ${headFile}.")
}
return branchName
}
// 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 = []
// Will hold the list of projects that apply the maven-publish plugin
// A project is registered when the gradle/any/publishing.gradle script plugin
// is applied. We track these so that we can be sure to remove any dependencies added
// by the gretty plugin (for example, httpservices certainly does not depend on javax.servlet-api,
// spring-boot-starter-tomcat, or spring-boot-starter-jetty :-/
publishedProjects = []
}
gradle.projectsEvaluated {
javaProjects = subprojects.findAll {
subproject -> subproject.plugins.hasPlugin('java')
}
}
tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = '6.8.2'
}
// 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"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/China_jin/netcdf-java.git
git@gitee.com:China_jin/netcdf-java.git
China_jin
netcdf-java
netcdf-java
6.x

搜索帮助