-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
96 lines (78 loc) · 2.5 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
/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/3.5/userguide/java_library_plugin.html
*/
// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
apply plugin: 'java'
apply plugin: 'scala'
apply plugin: 'eclipse'
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
flatDir {
dirs 'lib'
}
}
sourceSets {
main {
java {
srcDir 'bsd/src'
srcDir 'gpl/src'
srcDir 'tools/src'
srcDir 'src'
}
scala {
srcDir 'bsd/src'
srcDir 'gpl/src'
srcDir 'tools/src'
srcDir 'src'
}
}
test{
java{
srcDir 'test/src'
}
scala{
srcDir 'test/src'
}
}
}
dependencies {
compile name: 'mail'
compile group: 'commons-io', name: 'commons-io', version: '2.4'
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.2'
compile group: 'jfree', name: 'jcommon', version: '1.0.16'
compile group: 'jfree', name: 'jfreechart', version: '1.0.13'
compile group: 'com.lowagie', name: 'itext', version: '2.1.5'
// https://mvnrepository.com/artifact/org.scalatest/scalatest
//compile group: 'org.scalatest', name: 'scalatest_2.12.0-M4', version: '2.2.6'
// https://mvnrepository.com/artifact/junit/junit
testCompile group: 'junit', name: 'junit', version: '4.12'
compile 'org.scala-lang:scala-library:2.12.3'
testImplementation 'junit:junit:4.12'
compile 'org.scalatest:scalatest_2.12:3.0.5'
}
task fatJar(type: Jar) {
if(!hasProperty('$BUILD_NUMBER')){
ext{
$BUILD_NUMBER='develop'
}
}
baseName = project.name +'-'+$BUILD_NUMBER+ '-all'
from { configurations.compile.collect {
it.isDirectory() ? it : zipTree(it).matching{exclude{it.path.contains('META-INF')}}
}
}
with jar
}
task spec(dependsOn: ['testClasses'], type: JavaExec) {
main = 'org.scalatest.tools.Runner'
args = ['-R', 'build/classes/scala/test', '-o']
classpath = sourceSets.test.runtimeClasspath
}