Build impl with javac 11 to work around compiler bugs
This commit is contained in:
1 parent
3494f48492
commit
1c8ea4e516
3 files changed
+16
-12
No files matched your search
@@ -33,10 +33,11 @@ jobs:
|
||||
key: "${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-${{ hashFiles('**/*.gradle*') }}"
|
||||
restore-keys: |
|
||||
${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 1.8
|
||||
distribution: adopt
|
||||
java-version: 11
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
- name: Setup workspace
|
||||
|
||||
@@ -28,10 +28,11 @@ jobs:
|
||||
key: "${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-${{ hashFiles('**/*.gradle*') }}"
|
||||
restore-keys: |
|
||||
${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 1.8
|
||||
distribution: adopt
|
||||
java-version: 11
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
- name: Setup workspace
|
||||
@@ -108,10 +109,11 @@ jobs:
|
||||
key: "${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-${{ hashFiles('**/*.gradle*') }}"
|
||||
restore-keys: |
|
||||
${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 1.8
|
||||
distribution: adopt
|
||||
java-version: 11
|
||||
# We don't need to run tests again, so we just publish
|
||||
- name: Setup workspace
|
||||
run: |
|
||||
|
||||
+4
-3
@@ -271,6 +271,9 @@ allprojects {
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
if (!JavaVersion.current().isJava11Compatible) {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(11))
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<AbstractArchiveTask> {
|
||||
@@ -284,9 +287,7 @@ allprojects {
|
||||
withType(JavaCompile::class).configureEach {
|
||||
options.compilerArgs.addAll(listOf("-Xmaxerrs", "1000"))
|
||||
options.encoding = "UTF-8"
|
||||
if (JavaVersion.current().isJava10Compatible) {
|
||||
options.release.set(8)
|
||||
}
|
||||
options.release.set(8)
|
||||
if (project.name != "testplugins" && System.getProperty("idea.sync.active") != null) {
|
||||
options.annotationProcessorPath = emptyAnnotationProcessors // hack so IntelliJ doesn't try to run Mixin AP
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user