From 5ec77a47f68fccb1e448f9533e8b7740902dfcda Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Wed, 20 Sep 2023 11:29:30 -0700 Subject: [PATCH] Require Java 21 for jsonrpc-cli and btc-cli --- cj-btc-cli/build.gradle | 2 +- consensusj-jsonrpc-cli/build.gradle | 2 +- settings.gradle | 15 +++++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cj-btc-cli/build.gradle b/cj-btc-cli/build.gradle index edc3695f7..c9b1e435f 100644 --- a/cj-btc-cli/build.gradle +++ b/cj-btc-cli/build.gradle @@ -9,7 +9,7 @@ plugins { ext.moduleName = 'org.consensusj.bitcoin.cli' tasks.withType(JavaCompile) { - options.release = 17 + options.release = 21 } configurations { diff --git a/consensusj-jsonrpc-cli/build.gradle b/consensusj-jsonrpc-cli/build.gradle index c625f2925..ebe141202 100644 --- a/consensusj-jsonrpc-cli/build.gradle +++ b/consensusj-jsonrpc-cli/build.gradle @@ -7,7 +7,7 @@ plugins { } tasks.withType(JavaCompile) { - options.release = 17 + options.release = 21 } configurations { diff --git a/settings.gradle b/settings.gradle index cb7103831..3eaaba957 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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) @@ -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()}" +}