forked from grails/grails-data-mapping
/
build.gradle
98 lines (91 loc) · 3.69 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
configurations {
optional
}
dependencies {
compile project(":grails-datastore-core")
compile("org.grails:grails-core:$grailsVersion") {
exclude group:'aopalliance',module:'aopalliance'
exclude group:'commons-logging',module:'commons-logging'
exclude group:'commons-lang',module:'commons-lang'
// TODO: When the commons-collection dependency on grails-core is removed, then uncomment this
// exclude group:'commons-collections',module:'commons-collections'
exclude group:'commons-io',module:'commons-io'
exclude group:'org.grails',module:'grails-spring'
exclude group:'org.grails',module:'grails-bootstrap'
exclude group:'org.aspectj',module:'aspectjweaver'
exclude group:'org.aspectj',module:'aspectjrt'
exclude group:'oro',module:'oro'
exclude group:'asm',module:'asm'
exclude group:'cglib',module:'cglib'
exclude group:'xalan',module:'serializer'
exclude group:'org.springframework',module:'spring-aspects'
exclude group:'org.springframework',module:'spring-beans'
exclude group:'org.springframework',module:'spring-context'
exclude group:'org.springframework',module:'spring-context-support'
exclude group:'org.springframework',module:'spring-expression'
exclude group:'org.springframework',module:'spring-web'
exclude group:'org.springframework',module:'spring-aop'
exclude group:'commons-logging',module:'commons-logging'
exclude group:'commons-validator',module:'commons-validator'
exclude group:'com.googlecode.concurrentlinkedhashmap',module:'concurrentlinkedhashmap-lru'
}
compile("org.grails:grails-bootstrap:$grailsVersion") {
exclude group:'org.apache.ant',module:'ant'
exclude group:'org.apache.ant',module:'ant-launcher'
exclude group:'org.apache.ant',module:'ant-trax'
exclude group:'org.apache.ant',module:'ant-junit'
exclude group:'org.apache.ant',module:'ant'
exclude group:'org.apache.ivy',module:'ivy'
exclude group:'org.codehaus.gant',module:'gant_groovy1.8'
exclude group:'jline',module:'jline'
exclude group:'org.fusesource.jansi',module:'jansi'
exclude group:'net.java.dev.jna',module:'jna'
}
compile "org.grails:grails-async:$grailsVersion"
compile "org.slf4j:slf4j-api:$slf4jVersion"
compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
optional "org.springframework:spring-web:$springVersion"
}
def astTransformPath
jar.doFirst {
def metaInfPath = "${compileGroovy.destinationDir}/META-INF/services"
ant.mkdir(dir:metaInfPath)
astTransformPath = new File(metaInfPath, "org.codehaus.groovy.transform.ASTTransformation")
astTransformPath.text = "org.grails.datastore.gorm.query.transform.GlobalDetachedCriteriaASTTransformation"
}
jar.doLast {
if(astTransformPath) {
ant.delete file:astTransformPath
}
}
eclipse {
classpath {
file {
whenMerged { classpath ->
def testSrc = classpath.entries.find { entry -> entry.kind == 'src' && entry.path == "src/test/groovy" }
if (testSrc) {
// greclipse cannot use ASTs that are in the same project, so exclude this from compilation
testSrc.excludes = ["**/DirtyCheckTransformationSpec.groovy"]
}
}
}
}
}
sourceSets {
main {
compileClasspath += configurations.optional
}
javadoc {
classpath += configurations.optional
}
}
idea {
module {
scopes.PROVIDED.plus += configurations.optional
}
}
eclipse {
classpath {
plusConfigurations += configurations.optional
}
}