-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
135 lines (106 loc) · 3.14 KB
/
Copy pathbuild.gradle
File metadata and controls
135 lines (106 loc) · 3.14 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
plugins {
id "java"
id "maven"
id "maven-publish"
id "biz.aQute.bnd.builder" version "5.0.1"
id "signing"
}
repositories {
mavenCentral()
jcenter()
}
sourceCompatibility = 1.11
targetCompatibility = 1.11
group = GROUP
version = VERSION_NAME
dependencies {
testImplementation 'junit:junit:4.13.1'
//implementation("com.google.guava:guava:30.1.1-jre")
compile "com.google.guava:guava:[18,)"
implementation group: 'org.bouncycastle', name: 'bcprov-ext-jdk15on', version: '1.70'
implementation group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.70'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10'
implementation group: 'com.ubiqsecurity', name: 'ubiqsecurity-fpe', version: '0.1.4'
}
test {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
required {
(gradle.taskGraph.hasTask("uploadArchives") || gradle.taskGraph.hasTask("publish"))}
sign configurations.archives
}
jar {
archiveBaseName = POM_ARTIFACT_ID
manifest {
attributes("Implementation-Title": POM_NAME,
"Implementation-Version": VERSION_NAME,
"Implementation-Vendor": VENDOR_NAME,
"Bundle-SymbolicName": POM_ARTIFACT_ID,
"Export-Package": "com.ubiqsecurity.*")
}
archiveVersion = VERSION_NAME
}
def getRepositoryUsername() {
return hasProperty("SONATYPE_NEXUS_USERNAME") ? SONATYPE_NEXUS_USERNAME : ""
}
def getRepositoryPassword() {
return hasProperty("SONATYPE_NEXUS_PASSWORD") ? SONATYPE_NEXUS_PASSWORD: ""
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME
pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL
scm {
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
url POM_SCM_URL
}
licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
}
}
developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
email POM_DEVELOPER_EMAIL
}
}
organization {
name POM_DEVELOPER_NAME
url POM_ORGANIZATION_URL
}
}
}
}
}