-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include only foundation-desktop in the published library
- Loading branch information
Showing
2 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
} | ||
} | ||
} |