generated from unibo-oop/sample-gradle-project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
67 lines (57 loc) · 2.12 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
63
64
65
66
67
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.52.0"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17)) //pmd compatibilty
}
}
repositories { // Where to search for dependencies
mavenCentral()
}
dependencies {
// Suppressions for SpotBugs
compileOnly("com.github.spotbugs:spotbugs-annotations:4.8.1")
testImplementation("com.github.spotbugs:spotbugs-annotations:4.8.1")
// Maven dependencies are composed by a group name, a name and a version, separated by colons
implementation("org.jooq:jool:0.9.15")
implementation("org.json:json:20240205")
implementation("org.apache.commons:commons-lang3:3.14.0")
implementation("com.google.guava:guava:33.1.0-jre")
implementation("org.imgscalr:imgscalr-lib:4.2")
/*
* Simple Logging Facade for Java (SLF4J) with Apache Log4j
* See: http://www.slf4j.org/
*/
val slf4jVersion = "2.0.9"
implementation("org.slf4j:slf4j-api:$slf4jVersion")
// Logback backend for SLF4J
runtimeOnly("ch.qos.logback:logback-classic:1.4.11")
// JUnit API and testing engine
val jUnitVersion = "5.10.1"
// when dependencies share the same version, grouping in a val helps to keep them in sync
testImplementation("org.junit.jupiter:junit-jupiter-api:$jUnitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jUnitVersion")
}
application {
// Define the main class for the application.
mainClass.set("it.unibo.towerdefense.TowerDefense")
}
tasks.test {
useJUnitPlatform()
testLogging {
events(*org.gradle.api.tasks.testing.logging.TestLogEvent.values())
showStandardStreams = true
}
}