From 0d3b1b9830693dee30b696cf90c92d157f49bff6 Mon Sep 17 00:00:00 2001 From: stefankoppier Date: Thu, 5 Sep 2024 11:06:52 +0200 Subject: [PATCH] Added more targets --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + gradle/libs.versions.toml | 3 ++- mappie-api/build.gradle.kts | 25 +++++++++++++++++++++++-- settings.gradle.kts | 1 + 5 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..7a2e5731 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release + +on: workflow_dispatch + +jobs: + release: + name: Release + permissions: + pull-requests: read + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: temurin + cache: 'gradle' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Staging + run: ./gradlew publish + + - name: Publish to Maven Central + run: ./gradlew jreleaserFullRelease + + - name: Publish to Gradle Plugin Portal + run: ./gradlew publishPlugins \ No newline at end of file diff --git a/.gitignore b/.gitignore index a3929101..e0dfa607 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ build/ !gradle/wrapper/gradle-wrapper.jar !**/src/main/**/build/ !**/src/test/**/build/ +**/*.hprof #Kotlin .kotlin diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7da2fdf1..1dd0ef0f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,4 +16,5 @@ kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref gradle-plugin-publish = { id = "com.gradle.plugin-publish", version = "1.2.1" } sonarqube = { id = "org.sonarqube", version = "5.1.0.4882" } jreleaser = { id = "org.jreleaser", version = "1.13.1" } -dokka = { id = "org.jetbrains.dokka", version = "1.9.20" } \ No newline at end of file +dokka = { id = "org.jetbrains.dokka", version = "1.9.20" } +android-library = { id = "com.android.library", version = "8.5.2" } \ No newline at end of file diff --git a/mappie-api/build.gradle.kts b/mappie-api/build.gradle.kts index 388c5e18..16440146 100644 --- a/mappie-api/build.gradle.kts +++ b/mappie-api/build.gradle.kts @@ -1,8 +1,11 @@ +@file:OptIn(ExperimentalWasmDsl::class) + import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { alias(libs.plugins.kotlin.multiplatform) alias(libs.plugins.dokka) + alias(libs.plugins.android.library) apply false id("maven-publish") } @@ -15,12 +18,30 @@ kotlin { withSourcesJar(publish = true) } + androidNativeX64() + androidNativeArm64() + + iosArm64() + iosSimulatorArm64() + iosX64() + js { browser() - binaries.library() + nodejs() + } + + wasmJs { + browser() + nodejs() } - mingwX64 { binaries { sharedLib { baseName = "libnative" } } } + mingwX64() + + macosX64() + macosArm64() + + linuxX64() + linuxArm64() } val dokkaHtml by tasks.dokkaHtml diff --git a/settings.gradle.kts b/settings.gradle.kts index 72cef799..5b80a019 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -4,6 +4,7 @@ pluginManagement { repositories { mavenLocal() gradlePluginPortal() + google() } }