Skip to content

Commit 3e92062

Browse files
authored
Merge pull request #104 from graphql-java/Java-8-downgrade
Downgrade to Java 8 ahead of v20.x release WIP
2 parents 45a9812 + c67260a commit 3e92062

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

.github/workflows/master.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v1
1717
- uses: gradle/wrapper-validation-action@v1
18-
- name: Set up JDK 11
18+
- name: Set up JDK 1.8
1919
uses: actions/setup-java@v1
2020
with:
21-
java-version: '11.0.17'
21+
java-version: '8.0.282'
2222
- name: build test and publish
2323
run: ./gradlew assemble && ./gradlew check --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace

.github/workflows/pull_request.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v1
1818
- uses: gradle/wrapper-validation-action@v1
19-
- name: Set up JDK 11
19+
- name: Set up JDK 1.8
2020
uses: actions/setup-java@v1
2121
with:
22-
java-version: '11.0.17'
22+
java-version: '8.0.282'
2323
- name: build and test
2424
run: ./gradlew assemble && ./gradlew check --info --stacktrace

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v1
2121
- uses: gradle/wrapper-validation-action@v1
22-
- name: Set up JDK 11
22+
- name: Set up JDK 1.8
2323
uses: actions/setup-java@v1
2424
with:
25-
java-version: '11.0.17'
25+
java-version: '8.0.282'
2626
- name: build test and publish
2727
run: ./gradlew assemble && ./gradlew check --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace

build.gradle

+9-11
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ plugins {
1212
id "biz.aQute.bnd.builder" version "6.4.0"
1313
}
1414

15+
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
16+
def msg = String.format("This build must be run with java 1.8 - you are running %s - gradle finds the JDK via JAVA_HOME=%s",
17+
JavaVersion.current(), System.getenv("JAVA_HOME"))
18+
throw new GradleException(msg)
19+
}
20+
21+
sourceCompatibility = 1.8
22+
targetCompatibility = 1.8
23+
1524
def getDevelopmentVersion() {
1625
def output = new StringBuilder()
1726
def error = new StringBuilder()
@@ -25,27 +34,16 @@ def getDevelopmentVersion() {
2534
"0.0.0-" + new SimpleDateFormat('yyyy-MM-dd\'T\'HH-mm-ss').format(new Date()) + "-" + gitHash
2635
}
2736

28-
2937
def releaseVersion = System.env.RELEASE_VERSION
3038
version = releaseVersion ? releaseVersion : getDevelopmentVersion()
3139
println "Building version = " + version
3240
group = 'com.graphql-java'
3341

34-
if (JavaVersion.current() != JavaVersion.VERSION_11) {
35-
def msg = String.format("This build must be run with Java 11 - you are running %s - gradle finds the JDK via JAVA_HOME=%s",
36-
JavaVersion.current(), System.getenv("JAVA_HOME"))
37-
throw new GradleException(msg)
38-
}
39-
40-
sourceCompatibility = JavaVersion.VERSION_11.toString()
41-
targetCompatibility = JavaVersion.VERSION_11.toString()
42-
4342
repositories {
4443
mavenCentral()
4544
mavenLocal()
4645
}
4746

48-
4947
dependencies {
5048
compile "com.graphql-java:graphql-java:20.2"
5149

0 commit comments

Comments
 (0)