bitcoinj/settings.gradle
itorod 5bc597541f ForwardingService: add Kotlin example
This is adding an `examples-kotlin` sub-project.
2024-05-14 20:19:29 +02:00

55 lines
2.1 KiB
Groovy

import org.gradle.util.GradleVersion
import org.gradle.api.GradleScriptException
// Minimum Gradle version for build
def minGradleVersion = GradleVersion.version("4.4")
// Minimum Gradle version for JUnit5
def minJunit5GradleVersion = GradleVersion.version("4.6")
// Minimum Gradle version for builds of JavaFX 17 module using JDK 17
def minFxGradleVersion = GradleVersion.version("7.3")
// Minimum Gradle version for kotlin
def minKotlinGradleVersion = GradleVersion.version("6.8.3")
rootProject.name = 'bitcoinj-parent'
if (GradleVersion.current().compareTo(minGradleVersion) < 0) {
throw new GradleScriptException("bitcoinj build requires Gradle ${minGradleVersion} or later", null)
}
if (!JavaVersion.current().isJava11Compatible()) {
throw new GradleScriptException("bitcoinj build requires Java 11 or later", null)
}
include 'core'
project(':core').name = 'bitcoinj-core'
include 'tools'
project(':tools').name = 'bitcoinj-tools'
include 'wallettool'
project(':wallettool').name = 'bitcoinj-wallettool'
include 'examples'
project(':examples').name = 'bitcoinj-examples'
if (GradleVersion.current().compareTo(minFxGradleVersion) > 0 && JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
System.err.println "Including wallettemplate because ${GradleVersion.current()}"
include 'wallettemplate'
project(':wallettemplate').name = 'bitcoinj-wallettemplate'
} else {
System.err.println "Skipping wallettemplate, requires Gradle ${minFxGradleVersion}+ and Java 17+, currently running Gradle: ${GradleVersion.current()}, Java ${JavaVersion.current()}"
}
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()}"
}
if (GradleVersion.current().compareTo(minKotlinGradleVersion) >= 0) {
include 'examples-kotlin'
project(':examples-kotlin').name = 'bitcoinj-examples-kotlin'
}