xpipe-mirror/build.gradle

40 lines
1.5 KiB
Groovy
Raw Normal View History

2022-06-17 23:17:08 +00:00
plugins {
2023-01-27 02:34:46 +00:00
id "io.codearte.nexus-staging" version "0.30.0"
2022-06-17 23:17:08 +00:00
}
2023-01-27 02:34:46 +00:00
def getArchName() {
var arch = System.getProperty("os.arch").toLowerCase(Locale.ROOT)
if (arch == 'amd64' || arch == 'x86_64') {
return 'x86_64'
}
if (arch == 'arm' || arch == 'aarch64') {
return 'arm64'
}
if (arch == 'x86') {
return 'x86'
}
return arch
}
2023-01-27 02:34:46 +00:00
project.ext {
ci = System.getenv('CI') != null
os = org.gradle.internal.os.OperatingSystem.current()
2023-04-04 16:11:31 +00:00
allExtensions = Arrays.stream(file("$rootDir/ext").list())
2023-08-26 07:19:41 +00:00
.filter(s -> file("$rootDir/ext/$s/build.gradle").exists())
2023-04-04 16:11:31 +00:00
.filter(s -> !s.equals('csv') && !s.equals('office') && !s.equals('pdx') && !s.equals('jackson') && !s.equals('collections'))
.map(l -> project(":$l")).toList()
2023-01-27 02:34:46 +00:00
fullVersion = file("$rootDir/private_files.txt").exists()
arch = getArchName()
privateExtensions = file("$rootDir/private_extensions.txt").exists() ? file("$rootDir/private_extensions.txt").readLines() : []
2023-02-01 10:05:26 +00:00
isFullRelease = System.getenv('RELEASE') != null && Boolean.parseBoolean(System.getenv('RELEASE'))
2023-04-12 20:47:31 +00:00
isStage = System.getenv('STAGE') != null && Boolean.parseBoolean(System.getenv('STAGE'))
2023-07-29 12:36:04 +00:00
versionString = file('version').text.trim() + (isFullRelease || isStage ? '' : '-SNAPSHOT')
2023-02-02 13:58:50 +00:00
canonicalVersionString = file('version').text
2023-02-10 21:52:20 +00:00
buildId = UUID.nameUUIDFromBytes(versionString.getBytes())
2023-02-10 13:46:54 +00:00
obfuscate = true
2023-08-16 16:49:11 +00:00
changelog = file("dist/changelogs/${version}.md").exists() ? file("dist/changelogs/${version}.md").text.trim() + '\n' : ""
2023-01-27 02:34:46 +00:00
}