-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
98 lines (88 loc) · 3.76 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
google()
}
}
allprojects {
group = GROUP
version = VERSION
repositories {
mavenCentral()
google()
jcenter()
}
}
subprojects {
apply plugin: 'signing'
apply plugin: 'maven'
plugins.withId("maven-publish") {
publishing {
publications {
maven(MavenPublication) {
pom {
name = project.group + ":" + project.name
url = 'https://github.com/chesapeaketechnology/BufMonkey'
description = "BufMonkey Artifacts"
scm {
connection = 'scm:git:https://github.com/chesapeaketechnology/BufMonkey.git'
developerConnection = 'scm:git:[email protected]:chesapeaketechnology/BufMonkey.git'
url = 'https://github.com/chesapeaketechnology/BufMonkey'
}
licenses {
license {
name = 'Apache 2.0'
url = 'https://opensource.org/licenses/Apache-2.0'
}
}
developers {
developer {
id = "ctic.us"
name = "CTI Developers"
email = "[email protected]"
url = "https://github.com/chesapeaketechnology/BufMonkey"
organization = "Chesapeake Technology International"
organizationUrl = "https://ctic.us/"
}
}
withXml {
// This isn't any sort of Java archive artifact, and OSSRH doesn't enforce
// javadoc for 'pom' packages. 'exe' would be a more appropriate packaging
// value, but it isn't clear how that will be interpreted. In addition,
// 'pom' is typically the value used when building an exe with Maven.
asNode().project.packaging*.value = 'pom'
}
}
}
}
repositories {
maven {
if (rootProject.hasProperty('repositoryDir')) {
url = new File(rootProject.repositoryDir).toURI()
} else {
String stagingUrl
if (rootProject.hasProperty('repositoryId')) {
stagingUrl = 'https://oss.sonatype.org/service/local/staging/deployByRepositoryId/' +
rootProject.repositoryId
} else {
stagingUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
}
credentials {
if (rootProject.hasProperty('ossrhUsername') && rootProject.hasProperty('ossrhPassword')) {
username = rootProject.ossrhUsername
password = rootProject.ossrhPassword
}
}
def releaseUrl = stagingUrl
def snapshotUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotUrl : releaseUrl
}
}
}
}
signing {
sign publishing.publications.maven
}
}
}