Package: Remove y/n interaction: Enforce Java 11

Enforce JDK 11 for building and packaging. If user tries to package binaries using any other version, the packaging will fail.
This commit is contained in:
cd2357 2021-05-20 23:35:26 +02:00
parent f0725e56db
commit 8e2323c72c
No known key found for this signature in database
GPG key ID: F26C56748514D0D3

View file

@ -7,6 +7,9 @@ task jpackageSanityChecks {
description 'Interactive sanity checks on the version of the code that will be packaged'
doLast {
// Enforce JDK 11 for compiling and building
assert JavaVersion.current().isJava11(): "JDK 11 is required"
executeCmd("git --no-pager log -5 --oneline")
ant.input(message: "Above you see the current HEAD and its recent history.\n" +
"Is this the right commit for packaging? (y=continue, n=abort)",
@ -25,16 +28,6 @@ task jpackageSanityChecks {
if (ant.properties['sanity-check-2'] == 'n') {
ant.fail('Aborting')
}
// TODO Evtl check programmatically in gradle (i.e. fail if below v11)
executeCmd("java --version")
ant.input(message: "Above you see the installed java version, which will be used to compile and build Bisq.\n" +
"Is this java version ok for that? (y=continue, n=abort)",
addproperty: "sanity-check-3",
validargs: "y,n")
if (ant.properties['sanity-check-3'] == 'n') {
ant.fail('Aborting')
}
}
}