-
Notifications
You must be signed in to change notification settings - Fork 113
/
build.gradle
52 lines (41 loc) · 1.1 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
project.version = '1.1.0'
version = '1.1.0'
def jarVersion = version
apply plugin: 'application'
mainClassName = 'org.cf.driver.OracleDriver'
repositories {
mavenCentral()
}
dependencies {
compile 'com.google.code.gson:gson:2.8.2'
// testCompile 'junit:junit:4.12-beta-3'
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
group = 'org.cf'
sourceCompatibility = 1.7
jar {
version = jarVersion
}
// Build a separate jar that contains all dependencies
task fatJar(type: Jar) {
from sourceSets.main.output
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes('Main-Class': mainClassName)
}
doLast {
if (!System.getProperty('os.name').toLowerCase().contains('windows')) {
ant.symlink(link: file("${destinationDir}/driver.jar"), resource: archivePath, overwrite: true)
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.7'
}