Upgrade workflows to use Java 17 (#1579)

This commit is contained in:
Harsh Shandilya 2021-12-07 20:51:54 +05:30 committed by GitHub
parent 38bfcfdcae
commit 1df01a2f54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 32 additions and 14 deletions

View file

@ -3,4 +3,16 @@
# SPDX-License-Identifier: GPL-3.0-only
#
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# Add opens for KAPT
# https://youtrack.jetbrains.com/issue/KT-45545#focus=Comments-27-4862682.0-0
org.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 \
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED

View file

@ -36,7 +36,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- uses: gradle/gradle-build-action@v2.0.1

View file

@ -16,7 +16,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Decrypt secrets

View file

@ -16,7 +16,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Determine publishing task

View file

@ -16,7 +16,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Decrypt secrets

View file

@ -39,7 +39,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Update changelog

View file

@ -29,7 +29,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Copy CI gradle.properties
@ -64,7 +64,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Copy CI gradle.properties
@ -106,7 +106,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Copy CI gradle.properties
@ -141,7 +141,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Copy CI gradle.properties
@ -176,7 +176,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Copy CI gradle.properties
@ -211,7 +211,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Copy CI gradle.properties

View file

@ -14,7 +14,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Download new translations from Crowdin

View file

@ -15,7 +15,7 @@ jobs:
uses : actions/setup-java@v2.4.0
with :
distribution : 'zulu'
java-version : '11'
java-version : '17'
cache: 'gradle'
- name: Download new publicsuffix data

View file

@ -4,6 +4,7 @@
*/
import org.gradle.api.JavaVersion
import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.api.tasks.testing.Test
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.kotlin.dsl.withType
@ -11,6 +12,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val additionalCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true