-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathbuild.gradle
90 lines (73 loc) · 2.33 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
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "de.marcphilipp.nexus-publish"
task javadocsJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task testsJar(type: Jar) {
archiveClassifier = 'tests'
from sourceSets.test.output
}
javadoc { options.encoding = 'UTF-8' }
artifacts { archives sourcesJar, javadocsJar, testsJar }
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocsJar
artifact testsJar
pom {
name = project.name
description.set(project.provider({ project.description }))
url = 'https://web3j.io'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
scm {
def slug = rootProject.name
if (project.hasProperty('rootProjectOverride')) {
slug = project.rootProjectOverride
}
url = "https://github.com/LFDT-web3j/$slug"
connection = "scm:https://github.com/LFDT-web3j/${slug}.git"
developerConnection = "scm:git://github.com/LFDT-web3j/${slug}.git"
}
developers {
developer {
id = 'conor10'
name = 'Conor Svensson'
email = '[email protected]'
}
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
username = System.getenv('OSSRH_USERNAME')
password = System.getenv('OSSRH_PASSWORD')
}
}
}
nexusStaging {
username System.getenv('OSSRH_USERNAME')
password System.getenv('OSSRH_PASSWORD')
packageGroup = rootProject.group
}
signing {
sign publishing.publications.maven
def gpgSecretKey = System.getenv('OSSRH_GPG_SECRET_KEY')
def password = System.getenv('OSSRH_GPG_SECRET_KEY_PASSWORD')
useInMemoryPgpKeys(gpgSecretKey, password)
}