Skip to content

Commit

Permalink
Merge pull request #104 from graphql-java/Java-8-downgrade
Browse files Browse the repository at this point in the history
Downgrade to Java 8 ahead of v20.x release WIP
  • Loading branch information
dondonz committed Apr 12, 2023
2 parents 45a9812 + c67260a commit 3e92062
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
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

0 comments on commit 3e92062

Please sign in to comment.