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
|
2022-06-26 18:49:51 +00:00
|
|
|
}
|
|
|
|
|
2023-01-27 02:34:46 +00:00
|
|
|
project.ext {
|
|
|
|
ci = System.getenv('CI') != null
|
|
|
|
os = org.gradle.internal.os.OperatingSystem.current()
|
|
|
|
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'))
|
|
|
|
versionString = file('version').text + (isFullRelease ? '' : '-SNAPSHOT')
|
2023-02-02 13:58:50 +00:00
|
|
|
canonicalVersionString = file('version').text
|
2023-02-10 13:46:54 +00:00
|
|
|
buildId = UUID.nameUUIDFromBytes(version.toString().getBytes())
|
|
|
|
obfuscate = true
|
2023-01-27 02:34:46 +00:00
|
|
|
}
|