Skip to content

Commit

Permalink
BREAKING: require Java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Feb 21, 2024
1 parent db4579b commit 6f92d71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/java-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
strategy:
matrix:
java:
- 8
- 11
- 17
- 21
os:
- ubuntu
- windows
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Build with Gradle
run: ./gradlew build
- name: Deploy to Maven Central
if: matrix.os == 'ubuntu' && matrix.java == 8 && startsWith(github.ref, 'refs/tags/v')
if: matrix.os == 'ubuntu' && matrix.java == 11 && startsWith(github.ref, 'refs/tags/v')
run: |
echo '${{ secrets.SIGNING_KEY }}' | base64 -d > /tmp/signing_key.gpg
./gradlew \
Expand Down
29 changes: 5 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
// --------------- Plugins ---------------

buildscript {
// unfortunately we need to use the legacy buildscript block
// because the plugins {} DSL does not work when the plugin is compiled with a newer Java version
// (in this case, javafx-plugin is compiled against 11, while we want the build to work in 8)

repositories {
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'org.openjfx:javafx-plugin:0.1.0'
}
}

plugins {
id 'java-library'
id 'antlr'
Expand All @@ -25,10 +10,8 @@ plugins {
id 'org.fulib.fulibGradle' version '0.5.0'
// https://plugins.gradle.org/plugin/io.github.gradle-nexus.publish-plugin
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
}

if (JavaVersion.current().java11Compatible) {
apply plugin: 'org.openjfx.javafxplugin'
// https://plugins.gradle.org/plugin/org.openjfx.javafxplugin
id 'org.openjfx.javafxplugin' version '0.1.0'
}

// --------------- General Settings ---------------
Expand Down Expand Up @@ -128,11 +111,9 @@ dependencies {
genImplementation group: 'org.fulib', name: 'fulibTools', version: '1.5.1'
}

if (JavaVersion.current().java11Compatible) {
javafx {
modules 'javafx.base'
configuration = 'testImplementation'
}
javafx {
modules 'javafx.base'
configuration = 'testImplementation'
}

// --------------- Misc. Settings ---------------
Expand Down

0 comments on commit 6f92d71

Please sign in to comment.