-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
112 lines (92 loc) · 3.79 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
import org.apache.tools.ant.filters.ReplaceTokens
import org.apache.tools.ant.taskdefs.condition.Os
import static groovy.io.FileType.FILES
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven'
jar {
baseName = 'krishagni-commons'
version = '4.0.0'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
configurations {
ajc
aspects
aspectCompile
providedCompile
compile {
extendsFrom aspects
}
}
configurations.all {
transitive = false
}
sourceSets {
main.compileClasspath += configurations.providedCompile
test.compileClasspath += configurations.providedCompile
test.runtimeClasspath += configurations.providedCompile
}
idea {
module {
scopes.PROVIDED.plus += [configurations.providedCompile]
}
}
def springVersion = "4.3.5.RELEASE"
dependencies {
ajc "org.aspectj:aspectjtools:1.8.6"
compile "org.aspectj:aspectjrt:1.8.6"
compile "javax.persistence:persistence-api:1.0.2"
aspects "org.springframework:spring-aspects:4.3.5.RELEASE"
compile group: 'asm', name: 'asm', version:'3.3.1'
compile group: 'org.aspectj', name: 'aspectjweaver', version:'1.8.6'
compile group: 'org.javassist', name: 'javassist', version:'3.19.0-GA'
compile group: 'cglib', name: 'cglib', version:'3.1'
compile group: 'javax', name: 'javaee-api', version: '7.0'
compile group: 'commons-collections', name: 'commons-collections', version:'3.2.1'
compile group: 'commons-logging', name: 'commons-logging', version:'1.2'
compile group: 'commons-io', name: 'commons-io', version:'2.4'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.12'
compile group: 'log4j', name: 'log4j', version:'1.2.16'
compile group: 'velocity', name: 'velocity-dep', version:'1.4'
compile group: 'net.sf.ehcache', name: 'ehcache', version:'1.2.3'
compile group: 'net.sf.opencsv', name: 'opencsv', version:'2.3'
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.4'
compile group: 'org.hibernate.common', name: 'hibernate-commons-annotations', version:'5.0.1.Final'
compile group: 'org.hibernate', name: 'hibernate-core', version:'5.2.5.Final'
compile group: 'org.springframework', name: 'spring-aop', version:springVersion
compile group: 'org.springframework', name: 'spring-beans', version:springVersion
compile group: 'org.springframework', name: 'spring-tx', version:springVersion
compile group: 'org.springframework', name: 'spring-context', version:springVersion
compile group: 'org.springframework', name: 'spring-context-support', version:springVersion
compile group: 'org.springframework', name: 'spring-web', version:springVersion
compile group: 'org.springframework', name: 'spring-webmvc', version:springVersion
compile group: 'org.springframework', name: 'spring-core', version:springVersion
compile group: 'org.springframework.security', name: 'spring-security-core', version:'4.2.1.RELEASE'
}
sourceSets.main.compileClasspath += configurations.providedCompile
sourceSets.test.compileClasspath += configurations.providedCompile
sourceSets.test.runtimeClasspath += configurations.providedCompile
compileJava {
doLast{
ant.taskdef(resource: "org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties",
classpath: configurations.ajc.asPath)
ant.iajc(
source: 1.8, target: 1.8,
destDir: sourceSets.main.output.classesDir.absolutePath,
maxmem: "512m", fork: "true",
aspectPath: configurations.aspects.asPath,
sourceRootCopyFilter: "**/*.java",
classpath: "${configurations.compile.asPath};${configurations.providedCompile.asPath};${configurations.aspectCompile.asPath}") {
sourceroots {
sourceSets.main.java.srcDirs.each {
pathelement(location:it.absolutePath)
}
}
}
}
}