Files
Morgan Jones dd421437ce gradle: check GRADLE_OPTS in tests
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.
2025-12-03 14:45:15 -08:00

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?')
}