-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
60 lines (51 loc) · 1.82 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
import java.util.Properties
val publishGroupId by extra("io.github.solrudev")
val publishVersion by extra("0.1.5")
group = publishGroupId
version = publishVersion
plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("org.jetbrains.dokka") version "1.9.10"
}
subprojects {
apply(plugin = "org.jetbrains.dokka")
}
buildscript {
dependencies {
classpath("com.android.tools.build:gradle:8.1.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
}
}
tasks.register<Delete>("clean").configure {
delete(rootProject.layout.buildDirectory)
}
val ossrhUsername by extra("")
val ossrhPassword by extra("")
val sonatypeStagingProfileId by extra("")
extra["signing.keyId"] = ""
extra["signing.password"] = ""
extra["signing.key"] = ""
val secretPropertiesFile = file("local.properties")
if (secretPropertiesFile.exists()) {
Properties().run {
secretPropertiesFile.inputStream().use(::load)
forEach { name, value -> extra[name as String] = value }
}
}
extra["ossrhUsername"] = System.getenv("OSSRH_USERNAME") ?: extra["ossrhUsername"]
extra["ossrhPassword"] = System.getenv("OSSRH_PASSWORD") ?: extra["ossrhPassword"]
extra["sonatypeStagingProfileId"] = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: extra["sonatypeStagingProfileId"]
extra["signing.keyId"] = System.getenv("SIGNING_KEY_ID") ?: extra["signing.keyId"]
extra["signing.password"] = System.getenv("SIGNING_PASSWORD") ?: extra["signing.password"]
extra["signing.key"] = System.getenv("SIGNING_KEY") ?: extra["signing.key"]
nexusPublishing {
this.repositories {
sonatype {
stagingProfileId.set(sonatypeStagingProfileId)
username.set(ossrhUsername)
password.set(ossrhPassword)
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}