2019-02-23 19:49:00 +01:00
|
|
|
import org.gradle.util.GradleVersion
|
2019-04-09 02:58:23 +02:00
|
|
|
import org.gradle.api.GradleScriptException
|
|
|
|
|
2021-09-08 21:46:47 +02:00
|
|
|
// Minimum Gradle version for build
|
2019-04-17 15:50:39 +02:00
|
|
|
def minGradleVersion = GradleVersion.version("4.4")
|
2022-04-12 02:18:28 +02:00
|
|
|
// Minimum Gradle version for JUnit5
|
|
|
|
def minJunit5GradleVersion = GradleVersion.version("4.6")
|
2019-04-09 02:58:23 +02:00
|
|
|
// Minimum Gradle version for builds of JavaFX 11 module
|
|
|
|
def minFxGradleVersion = GradleVersion.version("4.10")
|
2019-02-23 19:49:00 +01:00
|
|
|
|
2019-03-07 17:31:54 +01:00
|
|
|
rootProject.name = 'bitcoinj-parent'
|
|
|
|
|
2019-04-09 02:58:23 +02:00
|
|
|
if (GradleVersion.current().compareTo(minGradleVersion) < 0) {
|
|
|
|
throw new GradleScriptException("bitcoinj build requires Gradle ${minGradleVersion} or later", null)
|
|
|
|
}
|
|
|
|
|
2021-09-08 21:46:47 +02:00
|
|
|
if (!JavaVersion.current().isJava11Compatible()) {
|
|
|
|
throw new GradleScriptException("bitcoinj build requires Java 11 or later", null)
|
|
|
|
}
|
|
|
|
|
2018-03-06 21:13:17 +01:00
|
|
|
include 'core'
|
2019-03-07 17:31:54 +01:00
|
|
|
project(':core').name = 'bitcoinj-core'
|
|
|
|
|
2018-03-06 21:13:17 +01:00
|
|
|
include 'tools'
|
2019-03-07 17:31:54 +01:00
|
|
|
project(':tools').name = 'bitcoinj-tools'
|
|
|
|
|
2022-01-04 05:36:12 +01:00
|
|
|
include 'wallettool'
|
|
|
|
project(':wallettool').name = 'bitcoinj-wallettool'
|
|
|
|
|
2018-03-06 21:13:17 +01:00
|
|
|
include 'examples'
|
2019-03-07 17:31:54 +01:00
|
|
|
project(':examples').name = 'bitcoinj-examples'
|
2019-02-23 19:49:00 +01:00
|
|
|
|
2021-09-08 21:46:47 +02:00
|
|
|
if (GradleVersion.current().compareTo(minFxGradleVersion) > 0) {
|
|
|
|
System.err.println "Including wallettemplate because ${GradleVersion.current()}"
|
2019-02-23 19:49:00 +01:00
|
|
|
include 'wallettemplate'
|
2019-03-07 17:31:54 +01:00
|
|
|
project(':wallettemplate').name = 'bitcoinj-wallettemplate'
|
2022-04-13 18:07:46 +02:00
|
|
|
} else {
|
|
|
|
System.err.println "Skipping wallettemplate, requires Gradle ${minFxGradleVersion}+, currently running: ${GradleVersion.current()}"
|
2019-02-23 19:49:00 +01:00
|
|
|
}
|
2021-09-08 21:46:47 +02:00
|
|
|
|
2022-04-12 02:18:28 +02:00
|
|
|
if (GradleVersion.current().compareTo(minJunit5GradleVersion) >= 0) {
|
|
|
|
System.err.println "Including integration-test because ${GradleVersion.current()}"
|
|
|
|
include 'integration-test'
|
|
|
|
project(':integration-test').name = 'bitcoinj-integration-test'
|
|
|
|
} else {
|
|
|
|
System.err.println "Skipping integration-test, requires Gradle ${minJunit5GradleVersion}+, currently running: ${GradleVersion.current()}"
|
|
|
|
}
|