Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require JDK 17 or later to build #160

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
java: ['11', '17', '21']
java: ['17', '21']
distribution: ['temurin']
fail-fast: false
name: ${{ matrix.os }} JDK ${{ matrix.java }}
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ Released: in-progress

=== Build/Test Updates

* Require JDK 17 or later to build
* Gradle 8.10
* GitHub `gradle.yml` JDK Matrix: Java 11, 17, **21** (was `21-ea`)
* GitHub `gradle.yml` JDK Matrix: Java 17, 21
* Asciidoctor Gradle Plugin 4.0.1

== v0.7.0-alpha3
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ The `#consensusj-exchange` module includes an adapter class `BaseXChangeExchange

== Building and Running

Before running `./gradlew` wrapper script you must have JDK 11 installed and your `JAVA_HOME` set correctly. To build native images you'll need a GraalVM JDK 11 with the `native-image` tool installed via `gu install native-image`.
Before running `./gradlew` wrapper script you must have JDK 17 or later installed and your `JAVA_HOME` set correctly. To build native images you'll need a GraalVM JDK 17 or later with the `native-image` tool installed via `gu install native-image`.

NOTE: The first time you run the build all dependency JARS will be downloaded.

Expand Down
10 changes: 3 additions & 7 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {

rootProject.name = 'consensusj'

if (!JavaVersion.current().isJava11Compatible()) {
throw new RuntimeException("JDK 11 Required to compile ConsensusJ")
if (JavaVersion.current().compareTo(JavaVersion.VERSION_17) < 0) {
throw new RuntimeException("JDK 17 or later is required to compile ConsensusJ")
}

// JDK 8
Expand All @@ -32,17 +32,13 @@ if (!JavaVersion.current().isJava11Compatible()) {
include 'cj-eth-jsonrpc' // Ethereum JSON-RPC client (experimental)
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 is ${JavaVersion.current()}"
// JDK 17
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
} 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()}"
Expand Down
Loading