Fix loom.accessWidener being a read-only property in Kotlin (#447)

* Re-enable Kotlin test because the related bug has been fixed

* Fix loom.accessWidener being a read-only property in Kotlin

* Remove Kotlin test exclusions
dev/0.11
Juuxel 2021-07-26 14:14:31 +03:00 committed by GitHub
parent ef2816b0d0
commit b558ee1a46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 12 deletions

View File

@ -45,9 +45,6 @@ jobs:
matrix: matrix:
java: [jdk16] java: [jdk16]
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }} test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}
exclude:
- java: jdk16
test: net.fabricmc.loom.test.integration.KotlinTest
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: container:
@ -74,9 +71,6 @@ jobs:
matrix: matrix:
java: [16] java: [16]
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }} test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}
exclude:
- java: 16
test: net.fabricmc.loom.test.integration.KotlinTest
runs-on: windows-2019 runs-on: windows-2019

View File

@ -44,7 +44,7 @@ import net.fabricmc.loom.configuration.providers.mappings.LayeredMappingSpecBuil
public interface LoomGradleExtensionAPI { public interface LoomGradleExtensionAPI {
File getAccessWidener(); File getAccessWidener();
void setAccessWidener(Object file); void setAccessWidener(File file);
void setShareCaches(boolean shareCaches); void setShareCaches(boolean shareCaches);

View File

@ -74,9 +74,9 @@ public abstract class LoomGradleExtensionApiImpl implements LoomGradleExtensionA
} }
@Override @Override
public void setAccessWidener(Object file) { public void setAccessWidener(File file) {
Objects.requireNonNull(file, "Access widener file cannot be null"); Objects.requireNonNull(file, "Access widener file cannot be null");
this.accessWidener = getProject().file(file); this.accessWidener = file;
} }
@Override @Override

View File

@ -31,7 +31,6 @@ import spock.lang.Unroll
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
@IgnoreIf({ jvm.java16Compatible }) // Fails on J16 > due to https://youtrack.jetbrains.com/issue/KT-45566
class KotlinTest extends Specification implements ProjectTestTrait { class KotlinTest extends Specification implements ProjectTestTrait {
@Override @Override
String name() { String name() {

View File

@ -1,7 +1,7 @@
import java.util.Properties import java.util.Properties
plugins { plugins {
kotlin("jvm") version "1.4.31" kotlin("jvm") version "1.5.21"
id("fabric-loom") id("fabric-loom")
} }
@ -16,5 +16,5 @@ dependencies {
minecraft(group = "com.mojang", name = "minecraft", version = "1.16.5") minecraft(group = "com.mojang", name = "minecraft", version = "1.16.5")
mappings(group = "net.fabricmc", name = "yarn", version = "1.16.5+build.5", classifier = "v2") mappings(group = "net.fabricmc", name = "yarn", version = "1.16.5+build.5", classifier = "v2")
modImplementation("net.fabricmc:fabric-loader:0.11.2") modImplementation("net.fabricmc:fabric-loader:0.11.2")
modImplementation(group = "net.fabricmc", name = "fabric-language-kotlin", version = "1.5.0+kotlin.1.4.31") modImplementation(group = "net.fabricmc", name = "fabric-language-kotlin", version = "1.6.3+kotlin.1.5.21")
} }