-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
64 lines (56 loc) · 1.58 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
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'maven'
configurations {
source {
extendsFrom archives
}
}
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
groovy localGroovy()
compile 'net.sourceforge.cobertura:cobertura:1.9.4.1'
testCompile 'junit:junit:3.8.2'
testCompile group: 'org.testng', name: 'testng', version: '5.8', classifier: 'jdk15'
}
project.tasks.test.configure {
includes = [ '**/*Test.class' ]
useTestNG()
}
project.tasks.uploadArchives.dependsOn 'test'
task jarSrc(type: Jar) {
classifier = 'src'
baseName = "${project.name}-src"
from sourceSets.main.java.srcDirs
from sourceSets.main.groovy.srcDirs
}
artifacts {
archives jarSrc
}
uploadArchives {
uploadDescriptor = true
repositories {
add (new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
name = 'localIvyRepository'
addArtifactPattern "${projectDir}/repo/[organisation]/[module]/[revision]/[artifact]-[revision](.[ext])"
addIvyPattern "${projectDir}/repo/[organisation]/[module]/[revision]/ivy.xml"
}
mavenDeployer {
repository(url: "file://${projectDir}/repo")
}
}
// this is hacky, but Gradle doesn't yet provide a way to publish non-archive objects
doLast {
copy {
from "${projectDir}/src/coberturainit"
into "${projectDir}/repo/gradle_cobertura/gradle_cobertura/${version}/"
}
}
}
task createWrapper(type: Wrapper) {
gradleVersion = '1.0-milestone-9'
}