settings.gradle: If at least Java 11 and Gradle 4.10 are detected, wallet-template is being built again.

This also means wallet-template is under continuous integration by Travis again.
This commit is contained in:
Sean Gilligan
2019-02-23 10:49:00 -08:00
committed by Andreas Schildbach
parent 0be1008339
commit 4daf6de1eb
4 changed files with 38 additions and 16 deletions

View File

@@ -7,8 +7,7 @@ jdk:
- openjdk11 - openjdk11
install: true install: true
script: script:
# excluding wallet-template because of the unreliable JavaFX dependency - gradle clean build
- gradle clean build -x :wallettemplate:compileJava
notifications: notifications:
irc: irc:

View File

@@ -8,8 +8,10 @@ The bitcoinj library is a Java implementation of the Bitcoin protocol, which all
### Technologies ### Technologies
* Java 7 for the core modules, Java 8 for everything else * Java 7+ and Gradle 3.4+ for the `core` module
* [Gradle 3.4+](https://gradle.org/) - for building the project * Java 8+ and Gradle 3.4+ for `tools` and `examples`
* Java 11+ and Gradle 4.10+ for the JavaFX-based `wallettemplate`
* [Gradle](https://gradle.org/) - for building the project
* [Google Protocol Buffers](https://github.com/google/protobuf) - for use with serialization and hardware communications * [Google Protocol Buffers](https://github.com/google/protobuf) - for use with serialization and hardware communications
### Getting started ### Getting started
@@ -18,17 +20,18 @@ To get started, it is best to have the latest JDK and Gradle installed. The HEAD
#### Building from the command line #### Building from the command line
To perform a full build use Official builds are currently using with JDK 8, even though the `core` module is compatible with JDK 7 and later.
To perform a full build (*including* JavaDocs and unit/integration *tests*) use JDK 8+
``` ```
gradle clean build gradle clean build
``` ```
You can also run If you are running JDK 11 or later and Gradle 4.10 or later, the build will automatically include the JavaFX-based `wallettemplate` module. The outputs are under the `build` directory.
```
gradle javadoc
```
to generate the JavaDocs.
The outputs are under the `build` directory. To perform a full build *without* unit/integration *tests* use:
```
gradle clean assemble
```
#### Building from an IDE #### Building from an IDE

View File

@@ -1,4 +1,13 @@
import org.gradle.util.GradleVersion
include 'core' include 'core'
include 'tools' include 'tools'
include 'examples' include 'examples'
include 'wallettemplate'
def minGradleVersion = GradleVersion.version("4.10")
if (GradleVersion.current().compareTo(minGradleVersion) >= 0 && JavaVersion.current().isJava11Compatible()) {
println "Including wallettemplate because ${GradleVersion.current()} and Java ${JavaVersion.current()}"
include 'wallettemplate'
} else {
println "Skipping wallettemplate: ${GradleVersion.current()} and Java ${JavaVersion.current()}"
}

View File

@@ -1,5 +1,11 @@
plugins {
id 'org.openjfx.javafxplugin' version '0.0.7' apply false
}
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'application'
apply plugin: 'org.openjfx.javafxplugin'
eclipse.project.name = 'bitcoinj-wallettemplate' eclipse.project.name = 'bitcoinj-wallettemplate'
@@ -12,11 +18,16 @@ dependencies {
implementation 'org.slf4j:slf4j-jdk14:1.7.25' implementation 'org.slf4j:slf4j-jdk14:1.7.25'
} }
sourceCompatibility = 1.8 javafx {
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
sourceCompatibility = 1.11
compileJava.options.encoding = 'UTF-8' compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8' compileTestJava.options.encoding = 'UTF-8'
task wallet_template(type: JavaExec) { mainClassName = 'wallettemplate.Main'
main = 'wallettemplate.Main'
classpath = sourceSets.main.runtimeClasspath // task wallet_template can be replaced with the 'run' task
task wallet_template(dependsOn: 'run') {
} }