-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
114 lines (93 loc) · 3.6 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
allprojects {
apply plugin: 'maven'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'signing'
group = 'org.fix4j'
version = '1.6'
}
def deployUsername = hasProperty('ossrhUsername') ? ossrhUsername : 'not-given'
def deployPassword = hasProperty('ossrhPassword') ? ossrhPassword : 'not-given'
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
subprojects {
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "http://repo.marketcetera.org/maven" }
}
dependencies {
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.3.0'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.3.0'
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
// dependencies for using Spock
testCompile "org.hamcrest:hamcrest-core:1.3" // only necessary if Hamcrest matchers are used
testRuntime "cglib:cglib-nodep:3.1" // allows mocking of classes (in addition to interfaces)
testRuntime "org.objenesis:objenesis:2.1" // allows mocking of classes without default constructor (together with CGLIB)
}
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") }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: deployUsername, password: deployPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: deployUsername, password: deployPassword)
}
pom.project {
name 'Fix4j Assert'
packaging 'jar'
artifactId project.name
description 'fix4j-assert is a library to assist in testing of applications using FIX protocol'
url 'http://www.fix4j.org'
scm {
connection 'scm:git:git://github.com/tools4j/groovy-tables.git'
developerConnection 'scm:git:git@github.com:tools4j/fix4j-assert.git'
url 'https://github.com/tools4j/fix4j-assert'
}
licenses {
license {
name 'GNU General Public License (GPL)'
url 'http://www.gnu.org/licenses/gpl.txt'
}
}
developers {
developer {
id 'ben'
name 'Ben Warner'
email 'bjwarner@gmail.com'
}
}
}
}
}
}
}