-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
84 lines (71 loc) · 1.9 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
buildscript {
dependencies {
classpath("com.dipien:semantic-version-gradle-plugin:2.0.0")
}
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id "com.diffplug.spotless" version "6.11.0"
}
version = "1.23.0"
apply plugin: "com.dipien.semantic-version"
version = project.findProperty("ddprof_version") ?: version
allprojects {
repositories {
mavenCentral()
mavenCentral()
gradlePluginPortal()
}
}
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven {
content {
includeGroup "com.datadoghq"
}
mavenContent {
snapshotsOnly()
}
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
allprojects {
group = 'com.datadoghq'
apply from: rootProject.file('common.gradle')
apply from: rootProject.file('gradle/configurations.gradle')
apply from: "$rootDir/gradle/spotless.gradle"
}
subprojects {
version = rootProject.version
}
apply from: rootProject.file('common.gradle')
apply from: rootProject.file('gradle/configurations.gradle')
def isCI = System.getenv("CI") != null
nexusPublishing {
repositories {
def forceLocal = project.hasProperty('forceLocal')
if (forceLocal && !isCI) {
local {
// For testing use with https://hub.docker.com/r/sonatype/nexus
// docker run --rm -d -p 8081:8081 --name nexus sonatype/nexus
// Doesn't work for testing releases though... (due to staging)
nexusUrl = uri("http://localhost:8081/nexus/content/repositories/releases/")
snapshotRepositoryUrl = uri("http://localhost:8081/nexus/content/repositories/snapshots/")
username = "admin"
password = "admin123"
}
} else {
sonatype {
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
}
}
}
}