Skip to content

Commit

Permalink
Add macos, ios, jvm, wasm targets (#57)
Browse files Browse the repository at this point in the history
* Add multiplatform targets

* Add targets to material3

* Run publish on macos
  • Loading branch information
boswelja authored Apr 5, 2024
1 parent 059ed85 commit 7e796b0
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
publish-github:
runs-on: ubuntu-latest
runs-on: macos-latest
permissions:
contents: read
packages: write
Expand All @@ -31,7 +31,7 @@ jobs:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

publish-oss:
runs-on: ubuntu-latest
runs-on: macos-latest
permissions:
contents: read
packages: write
Expand All @@ -57,7 +57,7 @@ jobs:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

upload-pages:
runs-on: ubuntu-latest
runs-on: macos-latest
needs:
- publish-github
- publish-oss
Expand Down
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ plugins {

alias(libs.plugins.dokka)
}

repositories {
mavenCentral()
}
25 changes: 25 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import java.net.URL

plugins {
Expand Down Expand Up @@ -44,14 +45,38 @@ android {
}
}

repositories {
google()
mavenCentral()
}

kotlin {
applyDefaultHierarchyTemplate()

jvmToolchain(17)

explicitApi()

// Android
androidTarget {
publishLibraryVariants("release")
}

// Apple
macosX64()
macosArm64()
iosX64()
iosArm64()

// JVM
jvm()

// WASM
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}

sourceSets {
commonMain {
dependencies {
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ kotlin.code.style=official
# Below here is all packaging details, not build configuration.
version=1.2.2
group=io.github.boswelja.menuprovider

org.jetbrains.compose.experimental.macos.enabled=true
org.jetbrains.compose.experimental.wasm.enabled=true
25 changes: 25 additions & 0 deletions material3/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import java.net.URL

plugins {
Expand Down Expand Up @@ -44,14 +45,38 @@ android {
}
}

repositories {
google()
mavenCentral()
}

kotlin {
applyDefaultHierarchyTemplate()

jvmToolchain(17)

explicitApi()

// Android
androidTarget {
publishLibraryVariants("release")
}

// Apple
macosX64()
macosArm64()
iosX64()
iosArm64()

// JVM
jvm()

// WASM
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}

sourceSets {
commonMain {
dependencies {
Expand Down
7 changes: 0 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ pluginManagement {
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

plugins {
id("com.gradle.enterprise") version("3.16.1")
Expand Down

0 comments on commit 7e796b0

Please sign in to comment.