From 763c6ca04fc6fdcebbff84bae81ee8779a2cf7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wieland=20Sch=C3=B6bl?= Date: Sun, 11 Apr 2021 23:06:52 +0200 Subject: [PATCH 1/2] Create gradle.yml --- .github/workflows/gradle.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..b1844c0 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,27 @@ +# This workflow will build a Java project with Gradle +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build From 7be51851e98c719f0fe0d75ba4ef0b4f9d722172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wieland=20Sch=C3=B6bl?= Date: Sun, 11 Apr 2021 23:09:28 +0200 Subject: [PATCH 2/2] Fix Kotlin tests --- .../kotlin/org/hmcore/tests/KotlinTests.kt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/test/kotlin/org/hmcore/tests/KotlinTests.kt b/src/test/kotlin/org/hmcore/tests/KotlinTests.kt index 8e961ec..94736c4 100644 --- a/src/test/kotlin/org/hmcore/tests/KotlinTests.kt +++ b/src/test/kotlin/org/hmcore/tests/KotlinTests.kt @@ -6,12 +6,14 @@ import org.junit.jupiter.api.Test // The primary function of the Kotlin tests is to ensure Kotlin-specific features are preserved // Meaning some tests might only make sure features work at compile time. -@Test -fun `Module should support index access operator`() { - HMCore.modules["ores"]!!["other"] -} +class KotlinTests { + @Test + fun `Module should support index access operator`() { + HMCore.modules["ores"]?.apply { this["other"] } + } -@Test -fun `Module should support 'in' keyword`() { - HMCore.modules["ores"]?.let { "copper" in it } -} \ No newline at end of file + @Test + fun `Module should support 'in' keyword`() { + HMCore.modules["ores"]?.let { "copper" in it } + } +}