Skip to content

Commit

Permalink
Remove JNA plugin and refine verification workflows (#16)
Browse files Browse the repository at this point in the history
The `fix-jna-publication` plugin and related configurations were removed to simplify project dependencies, replacing them with direct JNA declarations. Additionally, the GitHub workflow was renamed and updated for better clarity and functionality, including new publication testing.
  • Loading branch information
lamba92 authored Dec 13, 2024
1 parent a5ef36d commit 15f4367
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
os: [ ubuntu, windows, macos ]
runs-on: ${{ matrix.os }}-latest
name: "JVM / ${{ matrix.os }}"
name: JVM / ${{ matrix.os == 'ubuntu' && 'Ubuntu' || matrix.os == 'windows' && 'Windows' || matrix.os == 'macos' && 'macOs' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/tests.yml → .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Verify

on:
pull_request:
Expand All @@ -9,7 +9,7 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
name: linting
name: Linting
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand All @@ -24,7 +24,7 @@ jobs:
android-tests:
continue-on-error: true
runs-on: ubuntu-latest
name: android
name: Tests / Android
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
matrix:
os: [ubuntu, windows, macos]
runs-on: ${{ matrix.os }}-latest
name: ${{ matrix.os }}
name: Tests / ${{ matrix.os == 'ubuntu' && 'Ubuntu' || matrix.os == 'windows' && 'Windows' || matrix.os == 'macos' && 'macOs' }}
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/setup-gradle@v4
Expand All @@ -74,4 +74,20 @@ jobs:
if: always()
with:
name: tests-results-${{ matrix.os }}-${{ matrix.release == true && 'release' || 'debug' }}
path: build/reports
path: build/reports

publication:
strategy:
matrix:
os: [ ubuntu, windows, macos ]
runs-on: ${{ matrix.os }}-latest
name: Publication test / ${{ matrix.os == 'ubuntu' && 'Ubuntu' || matrix.os == 'windows' && 'Windows' || matrix.os == 'macos' && 'macOs' }}
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/setup-gradle@v4
- run: chmod +x gradlew
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 21
- run: ./gradlew publishAllPublicationsToTestRepository --stacktrace
8 changes: 2 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import kotlin.io.path.absolutePathString
plugins {
`publishing-convention`
`kotlin-multiplatform-with-android-convention`
`fix-jna-publication`
versions
`leveldb-binaries`
id("io.github.gradle-nexus.publish-plugin")
Expand Down Expand Up @@ -112,9 +111,6 @@ kotlin {

val jvmCommonMain by creating {
dependsOn(commonMain.get())
dependencies {
compileOnly(libs.jna)
}
}

val jvmCommonTest by creating {
Expand All @@ -124,13 +120,13 @@ kotlin {
androidMain {
dependsOn(jvmCommonMain)
dependencies {
api(libs.jna)
//noinspection UseTomlInstead
api("net.java.dev.jna:jna:5.15.0@aar")
}
}

jvmMain {
dependsOn(jvmCommonMain)
resources.srcDirs(tasks.copyCppStdlibFromAndroidNdk.map { it.destinationDir })
dependencies {
api(libs.jna)
}
Expand Down
55 changes: 0 additions & 55 deletions buildSrc/src/main/kotlin/fix-jna-publication.gradle.kts

This file was deleted.

0 comments on commit 15f4367

Please sign in to comment.