forked from AppXpress/PlatformModuleManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
74 lines (64 loc) · 1.65 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
sourceCompatibility = 1.7
targetCompatibility = 1.7
mainClassName = 'com.gtnexus.appxpress.PlatformModuleManager'
/*
* Gets the version name from the latest Git tag
* still needs to be added to .jar
*/
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags'
standardOutput = stdout
}
return stdout.toString().trim()
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked"
}
}
}
repositories {
mavenCentral()
flatDir {
dirs 'lib'
}
}
dependencies {
testCompile 'junit:junit:4.12'
compile 'com.google.guava:guava:19.0'
compile 'org.apache.poi:poi:3.14'
compile 'org.apache.poi:poi-ooxml:3.14'
compile name: 'commons-cli-1.3-SNAPSHOT'
compile name: 'zip4j_1.3.2'
compile name: 'mockito-all-1.9.5'
}
jar {
baseName = 'pmmanager'
version = '0.1.0'
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'PlatformModuleManager',
'Implementation-Version': '1.0.0',
'Main-Class': 'com.gtnexus.appxpress.PlatformModuleManager'
}
baseName = 'pmm' + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
compileJava.doFirst {
println ""
println "on tag -> " + getVersionName()
println "source compatibility >>" + sourceCompatibility
println "java_home: " + System.getProperty("java.home")
println ""
}