-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
102 lines (89 loc) · 2.55 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import com.pubnub.gradle.enableAnyIosTarget
import com.pubnub.gradle.enableJsTarget
import org.jetbrains.kotlin.gradle.plugin.cocoapods.CocoapodsExtension
plugins {
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.ktlint) apply false
alias(libs.plugins.benmanes.versions) apply false
alias(libs.plugins.vanniktech.maven.publish) apply false
alias(libs.plugins.dokka)
alias(libs.plugins.gradle.nexus.publish)
alias(libs.plugins.kotlinx.atomicfu)
id("pubnub.shared")
id("pubnub.dokka")
id("pubnub.multiplatform")
alias(libs.plugins.kotlinx.compatibility.validator)
alias(libs.plugins.npm.publish)
}
nexusPublishing {
repositories {
sonatype()
}
}
npmPublish {
packages {
getByName("js") {
scope = "pubnub"
packageName = "chat"
types.set("index.d.ts")
packageJsonTemplateFile = project.layout.projectDirectory.file("js-chat/package_template.json")
}
}
}
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
api(project(":pubnub-chat-api"))
implementation(project(":pubnub-chat-impl"))
}
}
if (enableAnyIosTarget) {
val appleMain by getting {
dependencies {
api(project(":pubnub-chat-impl"))
}
}
}
val jvmMain by getting {
dependencies {
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(project(":pubnub-chat-test"))
}
}
}
if (enableJsTarget) {
js {
// keep this in here for ad-hoc testing
// browser {
// testTask {
// useMocha {
// timeout = "15s"
// }
// }
// }
compilerOptions {
target.set("es2015")
}
binaries.library()
}
}
if (enableAnyIosTarget) {
(this as ExtensionAware).extensions.configure<CocoapodsExtension> {
summary = "Some description for a Kotlin/Native module"
homepage = "Link to a Kotlin/Native module homepage"
framework {
baseName = "PubNubChat"
export(project(":pubnub-chat-api"))
export(project(":pubnub-chat-impl"))
}
}
}
}
apiValidation {
ignoredProjects += "pubnub-chat-impl"
}