-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
118 lines (97 loc) · 3.19 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
106
107
108
109
110
111
112
113
114
115
116
117
118
plugins {
id 'java'
id 'application'
id 'org.javamodularity.moduleplugin' version '1.8.12'
id 'org.openjfx.javafxplugin' version '0.0.13'
id 'org.beryx.jlink' version '2.25.0'
id 'jacoco'
}
group 'com.playground'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
ext {
junitVersion = '5.9.2'
}
sourceCompatibility = '11'
targetCompatibility = '11'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
application {
mainModule = 'com.playground.playground'
mainClass = 'com.playground.playground.MainLauncher'
}
javafx {
version = '17.0.6'
modules = ['javafx.controls', 'javafx.fxml']
}
dependencies {
implementation("org.slf4j:slf4j-api:2.0.7")
implementation("org.slf4j:slf4j-simple:2.0.7")
implementation("org.nd4j:nd4j-native-platform:0.9.1")
implementation("org.datavec:datavec-api:0.9.1")
implementation("org.deeplearning4j:deeplearning4j-core:0.9.1")
implementation("org.deeplearning4j:deeplearning4j-ui_2.11:0.9.1")
implementation('org.controlsfx:controlsfx:11.1.2')
implementation('com.dlsc.formsfx:formsfx-core:11.6.0') {
exclude(group: 'org.openjfx')
}
implementation("io.github.kostaskougios:cloning:1.10.3")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
testImplementation("org.mockito:mockito-core:3.+")
}
test {
useJUnitPlatform()
}
jlink {
imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip")
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'app'
}
}
jlinkZip {
group = 'distribution'
}
jacoco {
toolVersion '0.8.10'
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}
tasks.create(name: "testCoverage", type: JacocoReport, dependsOn: "test") {
group = "Reporting"
description = "Generate Jacoco coverage reports for the test build."
reports {
html.required.set(true)
xml.required.set(true)
csv.required.set(true)
}
// We exclude the following sets of files:
// - We were advised not to test UI which was testable using QA.
// - The MainLauncher class is responsible for launching JavaFX.
def excludes = [
'com/playground/playground/interface_adapter/views/*.*',
'com/playground/playground/*MainLauncher*.*',
'**/*View.*',
'**/actions/*.*',
'**/core/*.*',
'**/markers/*.*',
'**/services/**/*.*',
'**/toolwindow/*.*',
'**/utils/*.*'
]
def javaClasses = fileTree(dir: "${buildDir}/classes/java/main", excludes: excludes)
def kotlinClasses = fileTree(dir: "${buildDir}/classes/kotlin/main", excludes: excludes)
classDirectories.from = files([javaClasses, kotlinClasses])
sourceDirectories.from = files([
"$project.projectDir/src/main/java",
"$project.projectDir/src/main/kotlin",
"$buildDir/generated/source/kapt/test"
])
executionData.from = files("${project.buildDir}/jacoco/test.exec")
}