-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (96 loc) · 3.63 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
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: org.gradle.api.plugins.CoberturaPlugin
buildscript {
repositories {
mavenCentral()
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = "cobertura"
addArtifactPattern 'https://github.com/valkolovos/gradle_cobertura/raw/master/ivy/[module]/[revision]/[module].[ext]'
}
}
dependencies {
classpath 'gradle_cobertura:gradle_cobertura:1.0-rc1'
}
}
repositories {
flatDir name: 'mdfRepository', dirs: 'lib'
mdfRepository {
addArtifactPattern(file('lib').absolutePath + '/[organisation]/[artifact](.[ext])')
}
}
configurations {
castor
hibernateTests
}
dependencies {
compile 'org.acegisecurity:acegi-security:1.0.1'
compile 'org.springframework:spring:2.5.6'
compile 'apache.commons:commons-httpclient:3.0.1'
compile 'org.aspectj:aspectjweaver:1.6.9'
compile 'com.thoughtworks.xstream:xstream:1.3.1'
compile 'org.codehaus.castor:castor:1.2'
compile 'org.mockejb:mockejb:0.6-beta2'
compile 'org.apache.tomcat:servlet-api:6.0.29'
compile 'commons-lang:commons-lang:2.5'
compile 'commons-pool:commons-pool:1.5.5'
compile 'commons-collections:commons-collections:3.2.1'
compile 'com.google.protobuf:protobuf-java:2.0.3'
compile 'org.testng:testng:5.14.2'
compile 'joda-time:joda-time:1.6.2'
compile 'xerces:xercesImpl:2.9.1'
compile 'mockrunner:mockrunner-jdbc'
testCompile 'org.easymock:easymock:2.5.2'
testCompile 'org.easymock:easymockclassextension:2.5.2'
testCompile 'cglib:cglib-nodep:2.2'
castor 'org.codehaus.castor:castor-codegen:1.2'
castor 'org.codehaus.castor:castor-xml-schema:1.2'
castor 'org.apache.velocity:velocity:1.5'
groovy 'org.codehaus.groovy:groovy:1.7.3'
hibernateTests 'org.codehaus.castor:castor:1.2'
hibernateTests 'mockrunner:mockrunner-jdbc'
hibernateTests 'org.testng:testng:5.14.2'
hibernateTests 'org.hibernate:hibernate:3.2.6.ga'
hibernateTests 'javax.transaction:jta:1.1'
}
task castor(type: JavaExec, dependsOn: [ 'cleanCastor' ]) {
@org.gradle.api.tasks.OutputDirectory
outputDir = file('build/generated-sources/')
onlyIf {
!outputDir.exists()
}
main = 'org.exolab.castor.builder.SourceGeneratorMain'
args '-i', 'src/main/resources/MockTestData.xsd', '-dest', outputDir.path, '-package', 'org.mdf.mockdata.generated', '-types', 'j2'
classpath = configurations['castor'].fileCollection { return true }
project.sourceSets.main.java.srcDir 'build/generated-sources'
}
sourceSets {
hibernateTests {
compileClasspath = configurations.hibernateTests + sourceSets.main.classes + sourceSets.test.classes
runtimeClasspath = classes + compileClasspath
}
}
cobertura {
coverageExcludes = [ '.*org\\.mdf\\.mockdata\\.generated\\..*' ]
}
project.tasks['test'].configure {
includes = [ '**/*Test.class' ]
dependsOn 'hibernateTests'
useTestNG()
}
tasks['compileJava'].dependsOn 'castor'
tasks['javadoc'].exclude '**/generated/**/*'
tasks['eclipseClasspath'].plusConfigurations << configurations['hibernateTests']
tasks['compileHibernateTestsJava'].dependsOn 'testClasses'
task hibernateTests(type: Test, dependsOn: 'hibernateTestsClasses') {
includes = [ '**/*HibernateTest.class' ]
testClassesDir = sourceSets.hibernateTests.classesDir
testResultsDir = file("${buildDir}/hibernate-test-results")
testReportDir = file("${buildDir}/reports/hibernate-tests")
classpath = sourceSets.hibernateTests.runtimeClasspath
useTestNG()
}
task wrapper(type: Wrapper) {
gradleVersion = '0.9-rc-3'
}