-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
33 lines (29 loc) · 1.12 KB
/
build.gradle
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
plugins {
alias libs.plugins.com.android.application apply false
alias libs.plugins.com.android.library apply false
alias libs.plugins.org.jetbrains.kotlin.android apply false
alias libs.plugins.nexus.publish
}
tasks.register('clean', Delete) {
group = "clean"
delete(rootProject.layout.buildDirectory.get())
}
tasks.register('cleanPublish', Delete) {
group = "clean"
delete(rootProject.layout.projectDirectory.dir("releases"))
}
def localProperty = new Properties()
def localPropertyFile = new File(rootDir, "local.properties")
if (localPropertyFile.exists()) {
localProperty.load(localPropertyFile.newDataInputStream())
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(localProperty.getProperty("sonatype.username") ?: System.getenv("SONATYPE_USERNAME"))
password.set(localProperty.getProperty("sonatype.password") ?: System.getenv("SONATYPE_PASSWORD"))
}
}
}