-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
157 lines (123 loc) · 3.7 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.5.0'
}
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'signing'
apply plugin: 'maven'
apply plugin: 'license'
apply plugin: 'eclipse' // Only used so the Eclipse STS Gradle plugin can see the 'provided' conf dependencies. :-(
apply plugin: 'idea'
defaultTasks 'build'
group = 'com.lmax.ant'
archivesBaseName = 'parallel-junit'
version = '0.1'
description = 'Parallel JUnit Ant Task'
ext {
fullName = 'Parallel JUnit'
sourceUrl = 'git@github.com:LMAX-Exchange/parallel-junit.git'
if (!project.hasProperty('sonatypeUsername')) sonatypeUsername = ''
if (!project.hasProperty('sonatypePassword')) sonatypePassword = ''
}
sourceCompatibility = 1.5
targetCompatibility = 1.5
repositories {
mavenCentral()
}
configurations {
provided
}
sourceSets {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
integrationTest {
java.srcDir 'src/itest/java'
groovy.srcDir 'src/itest/groovy'
resources.srcDir 'src/itest/resources'
compileClasspath += sourceSets.test.compileClasspath
runtimeClasspath += sourceSets.test.runtimeClasspath
}
}
eclipse.classpath.plusConfigurations += configurations.provided
idea.module {
scopes.PROVIDED.plus += [ configurations.provided ]
}
dependencies {
groovy 'org.codehaus.groovy:groovy-all:1.8.6'
provided 'org.apache.ant:ant-junit:1.8.4'
testCompile 'org.spockframework:spock-core:0.6-groovy-1.8'
testRuntime 'cglib:cglib-nodep:2.2'
testRuntime 'org.objenesis:objenesis:1.2'
}
task integrationTest(type: Test, dependsOn: ['classes', 'integrationTestClasses']) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
}
check.dependsOn integrationTest
tasks.withType(Compile) {
options.compilerArgs << '-Xlint:unchecked'
options.compilerArgs << '-Xlint:-options'
}
tasks.withType(Test) {
testReportDir = file("${reporting.baseDir}/${testReportDirName}/${name}")
testResultsDir = file("${buildDir}/${testResultsDirName}/${name}")
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts.archives sourcesJar
license {
header file('gradle/licence-header.txt')
strictCheck true
ignoreFailures false
ext.year = Calendar.getInstance().get(Calendar.YEAR)
}
signing {
required { gradle.taskGraph.hasTask(uploadArchives) }
sign configurations.archives
}
def projectPom = {
name = fullName
description = project.description
url = 'http://lmax-exchange.github.com/parallel-junit/'
scm {
url = "scm:$sourceUrl"
connection = "scm:$sourceUrl"
}
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'team'
name = 'LMAX OSS Team'
email = 'oss@lmax.com'
}
}
}
install {
repositories.mavenInstaller.pom.project(projectPom)
}
uploadArchives {
repositories.mavenDeployer {
beforeDeployment { deployment -> signing.signPom(deployment) }
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project(projectPom)
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.3'
}