Skip to content

Commit

Permalink
Require Java 21 for jsonrpc-cli and btc-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
msgilligan committed Sep 20, 2023
1 parent 9fca93f commit 5ec77a4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cj-btc-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
ext.moduleName = 'org.consensusj.bitcoin.cli'

tasks.withType(JavaCompile) {
options.release = 17
options.release = 21
}

configurations {
Expand Down
2 changes: 1 addition & 1 deletion consensusj-jsonrpc-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

tasks.withType(JavaCompile) {
options.release = 17
options.release = 21
}

configurations {
Expand Down
15 changes: 11 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ if (!JavaVersion.current().isJava11Compatible()) {
}

// JDK 8
include 'cj-bitcoinj-util' // BlockUtil (and future stuff depending on only bitcoinj)
include 'cj-bitcoinj-dsl-gvy' // Groovy DSL for bitcoinj

// JDK 9
include 'cj-bitcoinj-util' // BlockUtil (and future stuff depending on only bitcoinj)

// JDK 11
include 'consensusj-analytics' // Reactive analytics libraries
include 'consensusj-currency' // JavaMoney Currency Provider(s)
Expand All @@ -31,16 +33,21 @@ if (!JavaVersion.current().isJava11Compatible()) {
include 'cj-nmc-jsonrpc' // Namecoin JSON-RPC client (experimental)

if (JavaVersion.current().compareTo(JavaVersion.VERSION_17) >= 0) {
System.err.println "Including JDK 17 modules because Java ${JavaVersion.current()} is JDK 17+"
System.err.println "Including JDK 17 modules because Java is ${JavaVersion.current()}"
include 'consensusj-jsonrpc-daemon' // JSON-RPC sample server
include 'cj-bitcoinj-spock' // Spock tests/demos of basic bitcoinj capabilities
include 'cj-bitcoinj-dsl-js' // JavaScript DSL for bitcoinj via Nashorn
include 'cj-btc-daemon' // Prototype Micronaut version of Bitcoin daemon
include 'cj-btc-jsonrpc-integ-test' // RPC-based integration tests of/using bitcoind
include 'cj-btc-services' // bitcoinj-based service objects
include 'consensusj-jsonrpc-cli' // JSON-RPC CLI library and tool
include 'cj-btc-cli' // Bitcoin JSON-RPC CLI
} else {
System.err.println "Skipping JDK 17 modules, currently running Java ${JavaVersion.current()}"
}

if (JavaVersion.current().compareTo(JavaVersion.VERSION_21) >= 0) {
System.err.println "Including JDK 21 modules because Java is ${JavaVersion.current()}"
include 'consensusj-jsonrpc-cli' // JSON-RPC CLI library and tool
include 'cj-btc-cli' // Bitcoin JSON-RPC CLI
} else {
System.err.println "Skipping JDK 21 modules, currently running Java ${JavaVersion.current()}"
}

0 comments on commit 5ec77a4

Please sign in to comment.