-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
46 lines (38 loc) · 1.17 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
@file:Suppress("DSL_SCOPE_VIOLATION", "SpellCheckingInspection")
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import org.jetbrains.kotlin.util.capitalizeDecapitalize.toLowerCaseAsciiOnly
import java.util.Base64
plugins {
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.dokka)
alias(libs.plugins.kotlinter)
alias(libs.plugins.dependency.updates)
id("maven-publish")
id("signing")
}
val kotlinterId = libs.plugins.kotlinter.get().pluginId
subprojects {
apply {
plugin(kotlinterId)
plugin("maven-publish")
plugin("signing")
}
signing {
val secretKey = Base64
.getDecoder()
.decode(properties["anvell_signing_gnupg_key"].toString())
.toString(Charsets.UTF_8)
useInMemoryPgpKeys(
secretKey,
properties["anvell_signing_gnupg_pass"].toString()
)
sign(publishing.publications)
}
}
tasks.withType<DependencyUpdatesTask> {
rejectVersionIf {
val version = candidate.version.toLowerCaseAsciiOnly()
listOf("-alpha", "-beta", "-rc")
.any { it in version }
}
}