Skip to content

Downgrade to Java 8 ahead of v20.x release #104

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

Merged
merged 2 commits into from
Apr 12, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: '11.0.17'
java-version: '8.0.282'
- name: build test and publish
run: ./gradlew assemble && ./gradlew check --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: '11.0.17'
java-version: '8.0.282'
- name: build and test
run: ./gradlew assemble && ./gradlew check --info --stacktrace
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: '11.0.17'
java-version: '8.0.282'
- name: build test and publish
run: ./gradlew assemble && ./gradlew check --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace
20 changes: 9 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ plugins {
id "biz.aQute.bnd.builder" version "6.4.0"
}

if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
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",
JavaVersion.current(), System.getenv("JAVA_HOME"))
throw new GradleException(msg)
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

def getDevelopmentVersion() {
def output = new StringBuilder()
def error = new StringBuilder()
Expand All @@ -25,27 +34,16 @@ def getDevelopmentVersion() {
"0.0.0-" + new SimpleDateFormat('yyyy-MM-dd\'T\'HH-mm-ss').format(new Date()) + "-" + gitHash
}


def releaseVersion = System.env.RELEASE_VERSION
version = releaseVersion ? releaseVersion : getDevelopmentVersion()
println "Building version = " + version
group = 'com.graphql-java'

if (JavaVersion.current() != JavaVersion.VERSION_11) {
def msg = String.format("This build must be run with Java 11 - you are running %s - gradle finds the JDK via JAVA_HOME=%s",
JavaVersion.current(), System.getenv("JAVA_HOME"))
throw new GradleException(msg)
}

sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()

repositories {
mavenCentral()
mavenLocal()
}


dependencies {
compile "com.graphql-java:graphql-java:20.2"

Expand Down