mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-01-04 12:37:43 -05:00
55 lines
1.7 KiB
Groovy
55 lines
1.7 KiB
Groovy
plugins {
|
|
id('groovy')
|
|
id('org.jreleaser').version('1.0.0').apply(false)
|
|
}
|
|
|
|
String userHome = System.getProperty('user.home')
|
|
ext.installBinDir = "${userHome}/.sdkman/bin"
|
|
ext.installSrcDir = "${userHome}/.sdkman/src"
|
|
ext.installContribDir = "${userHome}/.sdkman/contrib"
|
|
|
|
ext.environment = hasProperty('env') ? env : 'local'
|
|
ext.hash = hasProperty('hash') ? hash : 'hashme'
|
|
ext.release = hasProperty('release') ? release : 'latest'
|
|
|
|
if ("$environment" == 'stable') {
|
|
ext.candidatesApi = 'https://api.sdkman.io/2'
|
|
} else if ("$environment" == 'beta') {
|
|
ext.candidatesApi = 'https://beta.sdkman.io/2'
|
|
} else {
|
|
ext.candidatesApi = 'http://localhost:8080/2'
|
|
}
|
|
|
|
ext.sdkmanVersion = ext.release == 'latest' ? "latest+${ext.hash}".toString() : ext.release
|
|
|
|
println("Environment is set to: $environment")
|
|
println("Short git hash: $hash")
|
|
println("Release set to: $release")
|
|
println("Candidates API: $candidatesApi")
|
|
println("Version: $sdkmanVersion")
|
|
|
|
apply from: 'gradle/archive.gradle'
|
|
apply from: 'gradle/release.gradle'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation('com.github.tomakehurst:wiremock:2.27.2') {
|
|
exclude module: 'junit'
|
|
}
|
|
testImplementation('io.cucumber:cucumber-groovy:4.7.1')
|
|
testImplementation('io.cucumber:cucumber-junit:4.7.4')
|
|
testImplementation('io.cucumber:gherkin:5.2.0')
|
|
testImplementation('junit:junit:4.13.2')
|
|
testImplementation('org.codehaus.groovy:groovy:2.4.21')
|
|
testImplementation('org.codehaus.groovy:groovy-json:2.4.21')
|
|
testImplementation('org.codehaus.groovy:groovy-templates:2.4.21')
|
|
testImplementation('org.slf4j:slf4j-api:1.7.32')
|
|
testImplementation('org.slf4j:slf4j-simple:1.7.32')
|
|
testImplementation('org.spockframework:spock-core:1.3-groovy-2.4') {
|
|
exclude module: 'groovy-all'
|
|
}
|
|
}
|