-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
55 lines (49 loc) · 1.43 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
import java.io.File
import java.net.URI
import java.util.Properties
plugins {
`maven-publish`
id("io.github.gradle-nexus.publish-plugin")
}
buildscript {
repositories {
google()
mavenCentral()
maven { setUrl("https://repo1.maven.org/maven2") }
maven { setUrl("https://plugins.gradle.org/m2/") }
maven { setUrl("https://dl.bintray.com/kotlin/dokka") }
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { setUrl("https://repo1.maven.org/maven2") }
maven { setUrl("https://dl.bintray.com/kotlin/dokka") }
}
}
task<Delete>("clean") {
delete(rootProject.buildDir)
}
group = "fr.xgouchet.elmyr"
val localPropertiesFile: File = project.rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
val p = Properties()
localPropertiesFile.inputStream().use { fis ->
p.load(fis)
}
p.forEach { k, v ->
project.ext[k.toString()] = v
}
}
nexusPublishing {
this.repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
val sonatypeUsername = project.properties["ossrhUsername"]?.toString()
val sonatypePassword = project.properties["ossrhPassword"]?.toString()
if (sonatypeUsername != null) username.set(sonatypeUsername)
if (sonatypePassword != null) password.set(sonatypePassword)
}
}
}