We can replace the org.gradle.native.dir environment variable with GRADLE_OPTS and -D which seems like the "nice" way to do the same thing now.
16 lines
329 B
Groovy
16 lines
329 B
Groovy
plugins {
|
|
id('application')
|
|
}
|
|
|
|
String getPropOrDie(String prop, String message) {
|
|
def ret = System.getProperty(prop)
|
|
if (!ret) {
|
|
throw new RuntimeException(message)
|
|
}
|
|
return ret
|
|
}
|
|
|
|
application {
|
|
mainClass = getPropOrDie('nix.test.mainClass', 'No main class defined, perhaps GRADLE_OPTS broke?')
|
|
}
|