-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
100 lines (82 loc) · 2.84 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
// buildscript specifies dependencies for this build.gradle
buildscript {
ext.kotlin_version = '1.3.20'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
// Plugins
plugins {
id 'java' apply true
id 'application' apply true
id 'org.jetbrains.kotlin.jvm' version '1.3.10' apply true
id 'org.openjfx.javafxplugin' version '0.0.7' apply true
}
apply plugin: 'kotlin'
// Project information
group 'uk.ac.cam.cl.bravo'
version '1.0-SNAPSHOT'
// Specify java version and enforce it
def javaVersion = JavaVersion.VERSION_11;
sourceCompatibility = javaVersion;
targetCompatibility = javaVersion;
task enforceVersion() {
def foundVersion = JavaVersion.current();
if (foundVersion != javaVersion)
throw new IllegalStateException("Wrong Java version; required is "
+ javaVersion + ", but found " + foundVersion);
}
compileJava.dependsOn(enforceVersion);
// Dependencies
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testCompile group: 'junit', name: 'junit', version: '4.12'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1'
// https://mvnrepository.com/artifact/org.apache.commons/commons-math3
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
// https://mvnrepository.com/artifact/io.reactivex.rxjava2/rxjava
compile group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.2.6'
implementation 'com.github.andto:jhlabs:bd6e516fc9'
compile group: 'org.tensorflow', name: 'tensorflow', version: '1.12.0'
compile group: 'org.tensorflow', name: 'libtensorflow', version: '1.12.0'
compile group: 'org.tensorflow', name: 'libtensorflow_jni', version: '1.12.0'
compile group: 'org.tensorflow', name: 'libtensorflow_jni_gpu', version: '1.12.0'
// GSON
implementation 'com.google.code.gson:gson:2.8.5'
compile 'com.google.guava:guava:27.0.1-jre'
}
javafx {
modules = [ 'javafx.fxml', 'javafx.controls', 'javafx.graphics', 'javafx.swing']
version = "11.0.2"
}
mainClassName = "uk.ac.cam.cl.bravo.gui.Main"
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
sourceSets {
main {
resources {
srcDirs = ["src/main/resources"]
}
}
}
task("preprocess", dependsOn: 'classes', type: JavaExec) {
main = 'uk.ac.cam.cl.bravo.pipeline.PreprocessPipelineKt'
classpath = sourceSets.main.runtimeClasspath
}
task("preview", dependsOn: 'classes', type: JavaExec) {
main = 'uk.ac.cam.cl.bravo.MainKt'
classpath = sourceSets.main.runtimeClasspath
}