aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-onsenui/build.gradle.kts
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-06-06 23:59:31 +0200
committerRobert Jaros <rjaros@finn.pl>2020-06-06 23:59:31 +0200
commit2993527f8297169ce91826a91bfcf168e79ccc88 (patch)
treeb13a5b677a631fa9bf3921bb26701a69716dfd39 /kvision-modules/kvision-onsenui/build.gradle.kts
parentdd41d887f679b3bb92e75845270d9981f7443ee9 (diff)
downloadkvision-2993527f8297169ce91826a91bfcf168e79ccc88.tar.gz
kvision-2993527f8297169ce91826a91bfcf168e79ccc88.tar.bz2
kvision-2993527f8297169ce91826a91bfcf168e79ccc88.zip
New kvision-onsenui modules. Support for main structural components of OnsenUI with DSL builders. Work in progress. (#126)
Diffstat (limited to 'kvision-modules/kvision-onsenui/build.gradle.kts')
-rw-r--r--kvision-modules/kvision-onsenui/build.gradle.kts48
1 files changed, 48 insertions, 0 deletions
diff --git a/kvision-modules/kvision-onsenui/build.gradle.kts b/kvision-modules/kvision-onsenui/build.gradle.kts
new file mode 100644
index 00000000..04ca8d8b
--- /dev/null
+++ b/kvision-modules/kvision-onsenui/build.gradle.kts
@@ -0,0 +1,48 @@
+buildscript {
+ extra.set("production", (findProperty("prod") ?: findProperty("production") ?: "false") == "true")
+}
+
+plugins {
+ kotlin("js")
+ id("maven-publish")
+}
+
+repositories()
+
+kotlin {
+ kotlinJsTargets()
+}
+
+dependencies {
+ implementation(kotlin("stdlib-js"))
+ api(rootProject)
+ implementation(npm("onsenui", "^2.10.10"))
+ testImplementation(kotlin("test-js"))
+}
+
+val sourcesJar by tasks.registering(Jar::class) {
+ archiveClassifier.set("sources")
+ from(kotlin.sourceSets.main.get().kotlin)
+}
+
+publishing {
+ publications {
+ create<MavenPublication>("kotlin") {
+ from(components["kotlin"])
+ artifact(tasks["sourcesJar"])
+ pom {
+ defaultPom()
+ }
+ }
+ }
+}
+
+setupPublication()
+
+tasks {
+ getByName("JsJar", Jar::class) {
+ from("${rootProject.buildDir}/js/packages/kvision-${project.name}/package.json") {
+ filter { it.replace("\"main\": \"kotlin/kvision-kvision", "\"main\": \"kvision-kvision") }
+ }
+ }
+}