forked from novabyte/diver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (88 loc) · 2.59 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
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'me.cmoz.diver'
version = file('VERSION').getText('UTF-8').trim()
mainClassName = 'me.cmoz.diver.Main'
buildDir = '_java_build'
sourceCompatibility = 1.7
targetCompatibility = 1.7
compileJava {
// enable all warnings as errors
options.compilerArgs = [
'-Xlint:cast,deprecation,divzero,empty,unchecked,fallthrough,path,serial,finally,overrides,-options',
'-Werror',
'-XprintProcessorInfo'
]
options.encoding = "UTF-8"
}
repositories {
mavenCentral()
}
configurations {
providedCompile
}
sourceSets.main.java.srcDir 'java_src/main/java'
sourceSets.main.compileClasspath += configurations.providedCompile
sourceSets.test.compileClasspath += configurations.providedCompile
dependencies {
def slf4jVersion = '1.7.7'
providedCompile(
[group: 'org.projectlombok', name: 'lombok', version: '1.14.8'])
compile(
[group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion],
[group: 'com.google.inject', name: 'guice', version: '3.0'],
[group: 'com.google.guava', name: 'guava', version: '18.0'],
[group: 'org.erlang.otp', name: 'jinterface', version: '1.5.6'],
[group: 'org.hbase', name: 'asynchbase', version: '1.6.0'])
runtime(
[group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion])
}
test {
forkEvery 100
jvmArgs '-Xms128m', '-Xmx512m', '-XX:MaxPermSize=1024m', '-enableassertions', '-Djava.awt.headless=true'
}
jar {
from(configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }) {
// remove all signature files
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Main-Class': mainClassName,
'Created-By': "Gradle $gradle.gradleVersion",
'Build-Jdk': System.properties['java.version'],
'Manifest-Version': 1.0
}
}
run {
jvmArgs '-Djava.awt.headless=true',
'-DOtpConnection.trace=4',
'-Dorg.slf4j.simpleLogger.defaultLogLevel=debug'
}
javadoc {
classpath += configurations.providedCompile
}
idea {
module {
downloadJavadoc = true
downloadSources = true
scopes.PROVIDED.plus += [ configurations.providedCompile ]
}
project {
jdkName = '1.7'
languageLevel = '1.7'
}
}
eclipse {
classpath {
plusConfigurations += [ configurations.providedCompile ]
defaultOutputDir = file("$buildDir/eclipse")
downloadSources = true
downloadJavadoc = true
}
}