2021-05-24 13:25:53 -04:00
|
|
|
/*
|
|
|
|
* Hibernate, Relational Persistence for Idiomatic Java
|
|
|
|
*
|
|
|
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
|
|
|
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
|
|
|
*/
|
|
|
|
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// Applies details for `https://ge.hibernate.org`
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2022-03-15 10:39:07 -04:00
|
|
|
ext {
|
|
|
|
isCiEnvironment = isJenkins() || isGitHubActions() || isGenericCi()
|
2023-08-03 12:18:25 -04:00
|
|
|
populateRemoteBuildCache = isEnabled( "POPULATE_REMOTE_GRADLE_CACHE" )
|
2024-10-22 10:21:25 -04:00
|
|
|
useRemoteCache = !isEnabled( "DISABLE_REMOTE_GRADLE_CACHE" )
|
2022-03-15 10:39:07 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
private static boolean isJenkins() {
|
|
|
|
return getSetting( "JENKINS_URL" ).isPresent()
|
|
|
|
}
|
|
|
|
|
|
|
|
private static boolean isGitHubActions() {
|
|
|
|
return getSetting( "GITHUB_ACTIONS" ).isPresent()
|
|
|
|
}
|
|
|
|
|
|
|
|
private static boolean isGenericCi() {
|
|
|
|
return System.getenv("CI") != null || System.getProperty("CI") != null
|
|
|
|
}
|
|
|
|
|
|
|
|
static java.util.Optional<String> getSetting(String name) {
|
|
|
|
def envVar = System.getenv(name)
|
|
|
|
if ( envVar != null ) {
|
|
|
|
return java.util.Optional.of(envVar);
|
|
|
|
}
|
|
|
|
|
|
|
|
def sysProp = System.getProperty(name)
|
|
|
|
return java.util.Optional.ofNullable(sysProp);
|
|
|
|
}
|
2022-02-01 10:40:31 -05:00
|
|
|
|
2023-08-03 12:18:25 -04:00
|
|
|
static boolean isEnabled(String setting) {
|
|
|
|
if ( System.getenv().hasProperty( setting ) ) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
return System.hasProperty( setting )
|
|
|
|
}
|
|
|
|
|
2024-04-16 15:14:59 -04:00
|
|
|
develocity {
|
2021-05-24 13:25:53 -04:00
|
|
|
server = 'https://ge.hibernate.org'
|
|
|
|
|
|
|
|
buildScan {
|
2024-04-16 15:14:59 -04:00
|
|
|
capture {
|
|
|
|
fileFingerprints = true
|
|
|
|
}
|
|
|
|
publishing.onlyIf { it.authenticated }
|
|
|
|
|
|
|
|
obfuscation {
|
|
|
|
// Don't share ip addresses
|
|
|
|
ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0" } }
|
|
|
|
}
|
2021-05-24 13:25:53 -04:00
|
|
|
|
2022-02-01 10:40:31 -05:00
|
|
|
uploadInBackground = !settings.ext.isCiEnvironment
|
2021-06-11 12:28:09 -04:00
|
|
|
|
2024-04-16 15:14:59 -04:00
|
|
|
tag "jdk-${settings.extensions.jdkVersions.test.launcher}"
|
|
|
|
tag settings.extensions.db
|
|
|
|
value 'database', settings.extensions.db
|
|
|
|
|
|
|
|
if ( settings.extensions.findByName( 'ci.node' ) ) {
|
|
|
|
tag settings.extensions.findByName( 'ci.node' )
|
2024-03-21 09:58:16 -04:00
|
|
|
}
|
2021-05-24 13:25:53 -04:00
|
|
|
}
|
|
|
|
}
|