diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 0215b16..bc9d5f8 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -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 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 572b8d8..206d52a 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9158bea..b61d755 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/build.gradle b/build.gradle index 7834972..057c777 100644 --- a/build.gradle +++ b/build.gradle @@ -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() @@ -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"