Skip to content

Commit

Permalink
Include only foundation-desktop in the published library
Browse files Browse the repository at this point in the history
  • Loading branch information
Walingar committed Oct 3, 2023
1 parent e5975ac commit 44f3f85
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Gradle
run: chmod +x gradlew
- name: Run Gradle
run: ./gradlew publishAllPublicationsToSpaceRepository
run: ./gradlew publishAllPublicationsToSpaceRepository -PexcludeSkiko
env:
MAVEN_SPACE_USERNAME: ${{secrets.MAVEN_SPACE_USERNAME}}
MAVEN_SPACE_PASSWORD: ${{secrets.MAVEN_SPACE_PASSWORD}}
20 changes: 18 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
import org.jetbrains.compose.ComposeBuildConfig

plugins {
jewel
`jewel-publish`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.kotlinSerialization)
}

/**
* Allows excluding skiko runtime from dependencies.
* Needed while building the library not to include skiko-runtime into pom.xml.
* Can be used in gradle script by adding "-PexcludeSkiko"
*/
private val excludeSkikoRuntime = hasProperty("excludeSkiko")

private val composeVersion get() = ComposeBuildConfig.composeVersion

dependencies {
api(compose.desktop.currentOs) {
exclude(group = "org.jetbrains.compose.material")
api("org.jetbrains.compose.foundation:foundation-desktop:$composeVersion")

if (!excludeSkikoRuntime) {
api(compose.desktop.currentOs) {
// so keep only skiko runtime dependency
exclude(group = "org.jetbrains.compose.desktop")
}
}
}

0 comments on commit 44f3f85

Please sign in to comment.