-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
87 lines (71 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
plugins {
id 'com.github.hierynomus.license' version '0.11.0' // https://github.com/hierynomus/license-gradle-plugin
id 'com.github.ben-manes.versions' version '0.11.3'
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'application'
apply plugin: 'license'
version = '0.0.1-SNAPSHOT'
def fileEncoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceSets.main.java.srcDirs = ['src/main/java']
sourceSets.test.java.srcDirs = []
sourceSets.main.groovy.srcDirs = []
sourceSets.test.groovy.srcDirs = ['src/test/groovy']
mainClassName = 'ch.petikoch.examples.feedbackControlInJava.FeedbackControlInJavaMain'
repositories {
jcenter()
}
def rxJavaVersion = '1.0.+'
def apacheCommonsMath3Version = '3.5'
def jFreeChartVersion = '1.0.19'
def googleGuavaVersion = '18.0'
def jcipVersion = '1.0'
def groovyVersion = '2.4.4'
def spockVersion = '1.0-groovy-2.4'
def cglibVersion = '3.1'
def asmVersion = '5.0.4'
dependencies {
compile "org.codehaus.groovy:groovy-all:${groovyVersion}" // Apache 2.0 licence
compile "org.apache.commons:commons-math3:${apacheCommonsMath3Version}" // Apache 2.0 licence
compile "org.jfree:jfreechart:${jFreeChartVersion}" // LGPL V2 licence
compile "com.google.guava:guava:${googleGuavaVersion}" // Apache 2.0 licence
compile "net.jcip:jcip-annotations:${jcipVersion}" // http://creativecommons.org/licenses/by/2.5
compile "io.reactivex:rxjava:${rxJavaVersion}" // Apache 2.0 licence
testCompile("org.spockframework:spock-core:${spockVersion}") { // Apache 2.0 licence
exclude group: 'org.codehaus.groovy'
}
testCompile("cglib:cglib:${cglibVersion}") { // spock mocks
exclude group: 'org.ow2.asm'
}
testCompile "org.ow2.asm:asm:${asmVersion}" // spock mocks -> Java 8
}
test {
systemProperty 'file.encoding', fileEncoding
}
tasks.withType(GroovyCompile) {
groovyOptions.encoding = fileEncoding
options.encoding = fileEncoding
}
tasks.withType(JavaCompile) {
options.encoding = fileEncoding
}
// http://forums.gradle.org/gradle/topics/set_maxparallelforks_to_number_of_cores_on_the_current_machine
tasks.withType(Test) {
maxParallelForks = Runtime.getRuntime().availableProcessors()
}
jar {
manifest {
attributes 'Implementation-Title': project.name,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Built-Gradle': gradle.gradleVersion
}
}
license {
header = rootProject.file('config/HEADER_apache_license2.txt')
strictCheck = true
}