-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
53 lines (43 loc) · 1.44 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import static java.nio.charset.StandardCharsets.UTF_8
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id "ch.ergon.gradle.goodies.versioning" version "1.0.0"
id 'com.github.jk1.dependency-license-report' version '1.16'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
}
apply from: "${rootProject.projectDir}/common.gradle"
group 'ch.ergon.adam'
licenseReport {
allowedLicensesFile = new File("$projectDir/allowed-licenses.json")
checkLicense {
outputs.upToDateWhen { false }
}
generateLicenseReport {
outputs.upToDateWhen { false }
}
}
nexusPublishing {
repositories {
sonatype {
stagingProfileId = project.findProperty('ossrhStagingProfileId')
username = project.findProperty('ossrhUsername')
password = project.findProperty('ossrhPassword')
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
ext.getLocalProperty = { key, file = "local.properties" ->
def properties = new Properties()
def localProperties = new File(rootProject.rootDir, file)
if (localProperties.isFile()) {
new InputStreamReader(new FileInputStream(localProperties), UTF_8).with {properties.load(it)}
return properties.getProperty(key, "")
} else {
return null
}
}