-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
62 lines (51 loc) · 1.72 KB
/
build.gradle.kts
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
plugins {
// Apply the java plugin to add support for Java
java
// Apply the application plugin to add support for building a CLI application
// You can run your app via task "run": ./gradlew run
application
/*
* Adds tasks to export a runnable jar.
* In order to create it, launch the "shadowJar" task.
* The runnable jar will be found in build/libs/projectname-all.jar
*/
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.danilopianini.gradle-java-qa") version "1.10.0"
}
repositories {
mavenCentral()
}
val javaFXModules = listOf(
"base",
"controls",
"fxml",
"swing",
"graphics"
)
val supportedPlatforms = listOf("linux", "mac", "win") // All required for OOP
dependencies {
// Suppressions for SpotBugs
compileOnly("com.github.spotbugs:spotbugs-annotations:4.7.3")
// Example library: Guava. Add what you need (and remove Guava if you don't use it)
// implementation("com.google.guava:guava:28.1-jre")
// JavaFX: comment out if you do not need them
val javaFxVersion = 15
for (platform in supportedPlatforms) {
for (module in javaFXModules) {
implementation("org.openjfx:javafx-$module:$javaFxVersion:$platform")
}
}
val jUnitVersion = "5.9.3"
// JUnit API and testing engine
testImplementation("org.junit.jupiter:junit-jupiter-api:$jUnitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jUnitVersion")
implementation("mysql:mysql-connector-java:8.0.29")
}
tasks.withType<Test> {
// Enables JUnit 5 Jupiter module
useJUnitPlatform()
}
application {
// Define the main class for the application
mainClass.set("it.unibo.nursery.PlantNursery")
}