-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
143 lines (109 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
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
apply plugin: 'java'
apply plugin: 'eclipse'
buildDir = 'output'
project.ext.fixedLibDir = file('lib')
project.ext.stagingDir = file('staging')
project.ext.toStagingDir = file(new File(buildDir, project.name))
project.ext.toStagingLibsDir = file(new File(toStagingDir, 'lib'))
project.ext.libDeploy = file(new File(buildDir, 'lib-deploy'))
repositories {
mavenCentral()
}
sourceSets {
main {
java {
// enable this if we want extra source code in the directory structure isolated
//srcDir "${projectDir}/src/extra/java/"
}
}
}
// http://search.maven.org/
// http://mvnrepository.com/
dependencies {
// logging framework
// This should be used so messages can be customized at runtime
compile 'org.slf4j:slf4j-api:1.7.2'
//compile 'org.slf4j:log4j-over-slf4j:1.6.6'
//compile 'org.slf4j:jcl-over-slf4j:1.6.6'
compile 'ch.qos.logback:logback-classic:1.0.7'
compile 'ch.qos.logback:logback-core:1.0.7'
// args4j is used to setup the command line args
// http://args4j.kohsuke.org
// http://mvnrepository.com/artifact/args4j/args4j
// compile 'args4j:args4j:2.0.24'
// https://code.google.com/p/guava-libraries/
// google i/o library
// Has some really good stuff that we should use
// compile 'com.google.guava:guava:14.0.1'
// compile 'org.apache.commons:commons-lang3:3.1';
// Good time library to have.
// compile 'joda-time:joda-time:2.1'
// commons math has lots of good math functions to use
// http://mvnrepository.com/artifact/org.apache.commons/commons-math3/3.2
// http://commons.apache.org/proper/commons-math/userguide/stat.html
// compile 'org.apache.commons:commons-math3:3.2'
// JSON library
// Basic library is directly included in the extra folder
//compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.8'
// compile 'commons-io:commons-io:2.4'
// For dependancy injection
// This is the way to go
//compile 'com.google.inject:guice:3.0'
//compile 'com.google.inject.extensions:guice-assistedinject:3.0'
// includes all the libraries that are in the lib folder
// this is an easy way to include them
compile fileTree(dir: 'lib', include: '*.jar')
// The testing framework to include
testCompile 'junit:junit:4.+'
// Other stuff that we may want to use...
// commented out until needed
// if we want to use mongoDB
// compile 'org.mongodb:mongo-java-driver:2.11.2'
//compile 'org.acegisecurity:acegi-security:1.0.7'
//http://commons.apache.org/sandbox/commons-cli2/index.html
//http://commons.apache.org/proper/commons-cli/index.html
// should look into where we can get 2 (although this seems pretty basic)
// compile 'commons-cli:commons-cli:1.2'
//compile 'org.apache.httpcomponents:httpclient:4.2.3'
//compile 'org.apache.httpcomponents:httpmime:4.2.3'
}
task staging(type: Sync) {
from(stagingDir) {}
into toStagingDir
}
task syncJars(type: Sync) {
from(configurations.compile) {}
from(fixedLibDir) {}
into toStagingLibsDir
}
task copyMainJar(type: Copy) {
from(libsDir) {}
into toStagingLibsDir
}
task myZip(type: Tar) {
archiveName project.name+'.tar.gz'
from(buildDir) {
include project.name+'/**'
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
destinationDir = libDeploy
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
destinationDir = libDeploy
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
// uncommenting the line below will build the java doc as part of the build process
// this can also be called with javadocJar or javadocjar
// this can add some additional time to the build process
// archives javadocJar
}
syncJars.dependsOn('staging')
copyMainJar.dependsOn('syncJars')
myZip.dependsOn('copyMainJar')
assemble.dependsOn('myZip')