This repository has been archived by the owner on Mar 21, 2019. It is now read-only.
forked from rtyley/spongycastle
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
192 lines (162 loc) · 5.89 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.saliman:gradle-cobertura-plugin:2.3.2"
classpath 'com.android.tools.build:gradle:2.1.2'
}
}
configure(allprojects - project(':mail')) {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'net.saliman.cobertura'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// Cobertura declares a dependency on the slf4j API, so we need to supply
// a runtime implementation to avoid NoClassDefFoundErrors
testRuntime "org.slf4j:slf4j-log4j12:1.7.5"
testRuntime "log4j:log4j:1.2.17"
}
}
ext {
bcTestDataHome = file('core/src/test/data').absolutePath
}
configure(subprojects - project(':mail')) {
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
group = 'com.madgag.spongycastle'
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
if (project.hasProperty("signing.keyId")) {
signing {
sign configurations.archives
}
}
if (project.hasProperty("sonatypeUsername")) {
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project {
name 'Spongy Castle'
packaging 'jar'
description 'Spongy Castle is a package-rename (org.bouncycastle.* to org.spongycastle.*) of Bouncy Castle\n' +
'intended for the Android platform. Android unfortunately ships with a stripped-down version of\n' +
'Bouncy Castle, which prevents easy upgrades - Spongy Castle overcomes this and provides a full,\n' +
'up-to-date version of the Bouncy Castle cryptographic libs.'
url 'http://rtyley.github.io/spongycastle/'
scm {
url 'scm:[email protected]:rtyley/spongycastle.git'
connection 'scm:[email protected]:rtyley/spongycastle.git'
developerConnection 'scm:[email protected]:rtyley/spongycastle.git'
}
licenses {
license {
name 'Bouncy Castle Licence'
url 'http://www.bouncycastle.org/licence.html'
distribution 'repo'
}
}
developers {
developer {
id 'rtyley'
name 'Roberto Tyley'
}
}
}
}
}
}
}
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}
sourceCompatibility = 1.5
targetCompatibility = 1.5
version = '1.54.0.0'
test {
systemProperty 'bc.test.data.home', bcTestDataHome
filter {
includeTestsMatching "*AllTests"
}
}
}
test.dependsOn([':core:test', ':prov:test', ':pkix:test', 'pg:test'])
cobertura {
coverageDirs = [
"${rootProject.projectDir}/core/build/classes/main",
"${rootProject.projectDir}/mail/build/classes/main",
"${rootProject.projectDir}/pg/build/classes/main",
"${rootProject.projectDir}/pkix/build/classes/main",
"${rootProject.projectDir}/prov/build/classes/main"
]
coverageSourceDirs = [
"${rootProject.projectDir}/core/src/main/java",
"${rootProject.projectDir}/mail/src/main/java",
"${rootProject.projectDir}/pg/src/main/java",
"${rootProject.projectDir}/pkix/src/main/java",
"${rootProject.projectDir}/prov/src/main/java",
]
coverageMergeDatafiles = [
file("${rootProject.projectDir}/core/build/cobertura/cobertura.ser"),
file("${rootProject.projectDir}/mail/build/cobertura/cobertura.ser"),
file("${rootProject.projectDir}/pg/build/cobertura/cobertura.ser"),
file("${rootProject.projectDir}/pkix/build/cobertura/cobertura.ser"),
file("${rootProject.projectDir}/prov/build/cobertura/cobertura.ser"),
]
auxiliaryClasspath += files("${rootProject.projectDir}/core/build/classes/main")
coverageFormats = ['html', 'xml']
coverageReportDir = new File("${rootProject.projectDir}/build/reports/cobertura")
}
subprojects {
buildscript {
repositories {
jcenter()
maven {
url "https://maven.java.net/content/groups/public/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath "net.saliman:gradle-cobertura-plugin:2.3.2"
}
}
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
project(':mail') {
repositories {
jcenter()
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}