-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
127 lines (113 loc) · 4.43 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
127 lines (113 loc) · 4.43 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import org.jetbrains.dokka.gradle.DokkaExtension
import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
plugins {
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.plugin.serialization) apply false
alias(libs.plugins.kotlin.plugin.compose) apply false
alias(libs.plugins.compose) apply false
alias(libs.plugins.dokka)
alias(libs.plugins.maven.publish) apply false
}
dokka {
dokkaPublications.html {
includes.from(project.layout.projectDirectory.file("README.md"))
}
}
dependencies {
dokka(project(":storyboard"))
dokka(project(":storyboard-easel"))
dokka(project(":storyboard-text"))
}
allprojects {
group = "dev.bnorm.storyboard"
version = "0.1.0-SNAPSHOT"
val javaVersion = JavaVersion.VERSION_11
plugins.withId("org.jetbrains.kotlin.multiplatform") {
extensions.configure<KotlinMultiplatformExtension> {
sourceSets.all {
languageSettings {
enableLanguageFeature("ContextParameters")
enableLanguageFeature("WhenGuards")
enableLanguageFeature("MultiDollarInterpolation")
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
optIn("kotlin.time.ExperimentalTime")
optIn("androidx.compose.animation.core.ExperimentalTransitionApi")
optIn("androidx.compose.animation.ExperimentalAnimationApi")
optIn("androidx.compose.animation.ExperimentalSharedTransitionApi")
}
}
targets.withType(KotlinJvmTarget::class.java) {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(javaVersion.toString()))
freeCompilerArgs.add("-Xjvm-default=all")
}
}
}
}
tasks.withType(JavaCompile::class.java).configureEach {
sourceCompatibility = javaVersion.toString()
targetCompatibility = javaVersion.toString()
}
plugins.withId("com.vanniktech.maven.publish") {
apply(plugin = "org.jetbrains.dokka")
configure<MavenPublishBaseExtension> {
signAllPublications()
pom {
description = "Compose Multiplatform library for building presentations."
name = project.name
url = "https://github.com/bnorm/storyboard/"
licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "repo"
}
}
developers {
developer {
id = "bnorm"
name = "Brian Norman"
}
}
scm {
url = "https://github.com/bnorm/storyboard/"
connection = "scm:git:https://github.com/bnorm/storyboard.git"
developerConnection = "scm:git:ssh://git@github.com/bnorm/storyboard.git"
}
}
}
}
plugins.withId("org.jetbrains.dokka") {
configure<DokkaExtension> {
dokkaSourceSets.configureEach {
documentedVisibilities.add(VisibilityModifier.Public)
sourceLink {
localDirectory = rootProject.projectDir
remoteUrl("https://github.com/bnorm/storyboard/tree/main/")
remoteLineSuffix = "#L"
}
}
}
}
}
tasks.register<Sync>("site") {
into(project.layout.buildDirectory.dir("_site"))
into("docs/api/latest") {
from(tasks.named("dokkaGeneratePublicationHtml"))
}
into("examples") {
into("basic") {
from(project(":examples:basic").tasks.named("wasmJsBrowserDistribution"))
}
into("diagram") {
from(project(":examples:diagram").tasks.named("wasmJsBrowserDistribution"))
}
into("interactive") {
from(project(":examples:interactive").tasks.named("wasmJsBrowserDistribution"))
}
}
}