-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
79 lines (75 loc) · 2.36 KB
/
build.gradle
File metadata and controls
79 lines (75 loc) · 2.36 KB
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
plugins {
id 'idea'
id 'java'
id 'java-library'
// for lombok
id "io.freefair.lombok"
id 'maven-publish'
id 'signing'
id "io.github.gradle-nexus.publish-plugin"
}
allprojects {
group = 'io.github.yangyaofei'
version = '0.1.0rc3'
}
subprojects {
apply {
plugin 'signing'
plugin 'java'
plugin 'maven-publish'
plugin 'java-library'
}
publishing {
publications {
maven(MavenPublication) {
groupId = group
artifactId = "${rootProject.getName()}-${project.getName()}"
version = version
from components.java
versionMapping {
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set("${rootProject.name}-${project.name}")
description.set("Self-used java utils library.")
url.set("https://github.com/yangyaofei/yyf-java-utils")
licenses {
license {
name.set("GNU General Public License, version 3 (GPLv3)")
url.set("https://www.gnu.org/licenses/gpl-3.0.txt")
}
}
developers {
developer {
id.set("yangyaofei")
name.set("Yang Yaofei")
}
}
scm {
url.set("https://github.com/yangyaofei/yyf-java-utils")
}
}
}
}
}
signing {
def asciiKey = System.getenv('SIGNING_KEY')
def asciiPassword = System.getenv('SIGNING_PASSWORD')
if (asciiKey && asciiPassword) {
useInMemoryPgpKeys(asciiKey, asciiPassword)
}
sign publishing.publications.maven
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username = System.getenv('MAVEN_USERNAME')
password = System.getenv('MAVEN_PASSWORD')
}
}
}