
task checkGradleUserHomeViaSystemEnv << {
    assert gradle.gradleUserHomeDir == file('customUserHome')
}

task checkDefaultGradleUserHome<< {
    assert gradle.gradleUserHomeDir == new File(System.properties['user.home'], ".gradle")
}

task checkSystemPropertyGradleUserHomeHasPrecedence << {
    assert gradle.gradleUserHomeDir == file('systemPropCustomUserHome')
}

task checkJavaHome << {
    assert Jvm.current().javaHome == file(expectedJavaHome)
}

task checkSystemProperty << {
    assert System.getProperty('customSystemProperty') == 'custom-value'
}