-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle.kts
119 lines (108 loc) · 3.53 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
118
119
import com.vanniktech.maven.publish.SonatypeHost
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.plugin.compose.compiler) apply false
alias(libs.plugins.compose.multiplatform) apply false
alias(libs.plugins.roborazzi) apply false
alias(libs.plugins.poko) apply false
alias(libs.plugins.spotless)
alias(libs.plugins.publish)
alias(libs.plugins.dokka)
alias(libs.plugins.binaryCompatibilityValidator)
}
spotless {
kotlin {
target("**/*.kt")
targetExclude("**/build/")
ktlint(libs.versions.ktlint.get())
}
kotlinGradle {
target("**/*.gradle.kts")
targetExclude("**/build/")
ktlint(libs.versions.ktlint.get())
}
}
apiValidation {
ignoredProjects.addAll(
listOf(
"android",
"common",
"desktop",
"intellij-plugin",
"test-paparazzi",
"test-roborazzi",
),
)
}
allprojects {
group = "io.github.qdsfdhvh"
version = ProjectVersion.version
plugins.withId("com.vanniktech.maven.publish.base") {
mavenPublishing {
publishToMavenCentral(SonatypeHost.S01, automaticRelease = true)
signAllPublications()
@Suppress("UnstableApiUsage")
pom {
name.set("compose-imageLoader")
description.set("Compose ImageLoader.")
url.set("https://github.com/qdsfdhvh/compose-imageLoader")
licenses {
license {
name.set("MIT")
url.set("https://opensource.org/licenses/MIT")
distribution.set("repo")
}
}
developers {
developer {
id.set("Seiko")
name.set("SeikoDes")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/qdsfdhvh/compose-imageLoader")
connection.set("scm:git:git://github.com/qdsfdhvh/compose-imageLoader.git")
developerConnection.set("scm:git:git://github.com/qdsfdhvh/compose-imageLoader.git")
}
}
}
}
// fix order of android release lint tasks
listOf(
"generateReleaseLintVitalModel",
"lintVitalAnalyzeRelease",
).forEach { name ->
tasks.matching { it.name == name }.configureEach {
dependsOn(tasks.matching { it.name == "copyFontsToAndroidAssets" })
}
}
}
tasks.dokkaHtmlMultiModule {
moduleVersion.set(ProjectVersion.version)
outputDirectory.set(rootDir.resolve("docs/static/api"))
}
object ProjectVersion {
// incompatible API changes
private const val major = "1"
// functionality in a backwards compatible manner
private const val monir = "9"
// backwards compatible bug fixes
private const val path = "0"
const val version = "$major.$monir.$path"
}
gradle.taskGraph.whenReady {
if (project.hasProperty("noAppApple")) {
allTasks.asSequence()
.filter {
it.path.startsWith(":app:ios-combine") ||
it.path.startsWith(":app:macos") ||
it.path.startsWith(":app:web")
}
.forEach {
it.enabled = false
}
}
}