Skip to content

Commit

Permalink
Add Linux, MinGW, WasmWasi targets
Browse files Browse the repository at this point in the history
  • Loading branch information
okarmazin committed Sep 20, 2024
1 parent 2c8e4a6 commit ff2ed1d
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 3 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
push:
branches: [ "main", "github-ci" ]
pull_request:
branches: [ "main" ]
workflow_call:

permissions:
contents: read

jobs:
build:
strategy:
matrix:
include:
- target: iosSimulatorArm64Test
os: macos-latest
- target: jvmTest
os: ubuntu-latest
- target: linuxX64Test
os: ubuntu-latest
- target: mingwX64Test
os: windows-latest
- target: wasmWasiTest
os: ubuntu-latest
- target: testDebugUnitTest
os: ubuntu-latest
- target: testReleaseUnitTest
os: ubuntu-latest
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- uses: actions/cache@v3
with:
path: |
~/.konan
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@ce999babab2de1c4b649dc15f0ee67e6246c994f
with:
arguments: ${{ matrix.target }}
9 changes: 7 additions & 2 deletions escpos4k/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ kotlin {
macosArm64()
macosX64()

linuxArm64()
linuxX64()
mingwX64()
wasmWasi()

sourceSets {
val commonMain by getting {
dependencies {
Expand All @@ -81,13 +86,13 @@ kotlin {
val androidMain by getting
val androidUnitTest by getting {
dependencies {
implementation(libs.kotlin.test.junit)
implementation(libs.kotlin.test.junit5)
implementation(libs.kotest.runner.junit5)
}
}
val jvmTest by getting {
dependencies {
implementation(libs.kotlin.test.junit)
implementation(libs.kotlin.test.junit5)
implementation(libs.kotest.runner.junit5)
}
}
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ androidCoreDesugaring = "2.0.3"
androidGradlePlugin = "8.2.0"
androidMinSdk = "23"
androidTargetSdk = "33"
arrow = "1.2.1"
arrow = "1.2.4"
coroutines = "1.7.3"
dependencyUpdates = "0.50.0"
kotest = "5.9.0"
Expand All @@ -30,6 +30,7 @@ kotlin-test-common-annotations = { module = "org.jetbrains.kotlin:kotlin-test-an
kotlin-test-common-assertions = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
kotlin-test-junit5 = { module = "org.jetbrains.kotlin:kotlin-test-junit5", version.ref = "kotlin" }
kotlin-test-js = { module = "org.jetbrains.kotlin:kotlin-test-js", version.ref = "kotlin" }

kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
Expand Down

0 comments on commit ff2ed1d

Please sign in to comment.