forked from dropbox/componentbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
117 lines (104 loc) · 3.54 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost
import kotlinx.kover.tasks.KoverMergedHtmlReportTask
import kotlinx.kover.tasks.KoverMergedXmlReportTask
plugins {
kotlin("jvm") version Version.baseKotlin
id("org.jetbrains.dokka") version Version.baseKotlin
id("org.jetbrains.kotlinx.kover") version "0.5.0"
}
@Suppress("JcenterRepositoryObsolete") buildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:7.0.4")
classpath(Deps.Kotlin.gradlePlugin)
classpath(Deps.Kotlin.serializationCore)
classpath("com.google.dagger:hilt-android-gradle-plugin:2.42")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.18.0")
classpath("org.jetbrains.kotlinx:kover:0.5.0")
classpath("org.jetbrains.kotlinx:kotlinx-cli:0.3.4")
classpath("com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:0.12.6-new-mm")
classpath("app.cash.zipline:zipline-gradle-plugin:0.9.1")
}
}
apply(plugin = "com.vanniktech.maven.publish.base")
allprojects {
version = project.property("VERSION_NAME") as String
repositories {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
}
plugins.withId("com.vanniktech.maven.publish.base") {
configure<MavenPublishBaseExtension> {
publishToMavenCentral(SonatypeHost.S01)
signAllPublications()
pom {
description.set("A Kotlin multiplatform library for building dynamic server-driven UI")
name.set(project.name)
url.set("https://github.com/dropbox/componentbox/")
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
scm {
url.set("https://github.com/dropbox/componentbox/")
connection.set("scm:git:git://github.com/dropbox/componentbox.git")
developerConnection.set("scm:git:ssh://[email protected]/dropbox/componentbox.git")
}
developers {
developer {
id.set("dropbox")
name.set("Dropbox, Inc.")
}
}
}
}
}
}
tasks.withType<KoverMergedHtmlReportTask>().configureEach {
isEnabled = true
}
tasks.withType<KoverMergedXmlReportTask>().configureEach {
isEnabled = true
}
tasks.register("printVersionName") {
doLast {
val VERSION_NAME: String by project
println(VERSION_NAME)
}
}
val included = listOf(
"com.dropbox.componentbox.models.*"
)
val excluded = listOf(
"com.dropbox.componentbox.discovery.*",
"com.dropbox.componentbox.samples.*",
"com.dropbox.componentbox.desktop.*"
)
tasks.koverMergedVerify {
includes = included
excludes = excluded
rule {
// TODO(mramotar) 80%
name = "0% Coverage"
bound {
minValue = 0
}
}
}
tasks.koverMergedHtmlReport {
isEnabled = true
htmlReportDir.set(layout.buildDirectory.dir("generated/kover"))
includes = included
excludes = excluded
}