-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
build.gradle
60 lines (51 loc) · 1.53 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
plugins {
id "jacoco"
id "java"
id "application"
id("org.sonarqube") version "5.0.0.4638"
}
description = 'Example of SonarScanner for Gradle Usage'
version = '1.0'
sonar {
properties {
property('sonar.projectName', 'Example of SonarScanner for Gradle Usage')
property("sonar.projectKey", "sonar-scanner-gradle")
property("sonar.sources", "src/main")
property "sonar.tests", "src/test"
}
}
// 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.
mavenCentral()
}
dependencies {
// This dependency is found on compile classpath of this component and consumers.
implementation 'com.google.guava:guava:31.1-jre'
// Use JUnit test framework
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
implementation 'org.junit.jupiter:junit-jupiter:5.9.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
sourceSets.main.java.srcDirs = ['src']
}
application {
// Define the main class for the application.
mainClass='com.acme.App'
}
test {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
jacocoTestReport {
reports {
xml.required = true
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
}