-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathbuild.gradle
68 lines (59 loc) · 1.36 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
plugins {
id 'java'
id 'maven-publish'
id 'com.diffplug.spotless' version '6.12.0'
id 'org.sonarqube' version '4.3.0.3225'
id 'jacoco'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:[5.10.0,)'
testImplementation 'org.hamcrest:hamcrest-core:[2.2,)'
testImplementation 'org.zapodot:embedded-db-junit-jupiter:[2.1.1,)'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
test {
useJUnitPlatform()
maxParallelForks = Runtime.runtime.availableProcessors()
}
group = 'com.github.javadev'
version = '1.25-SNAPSHOT'
description = 'leetcode-in-java'
java.sourceCompatibility = JavaVersion.VERSION_17
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
spotless {
java {
encoding 'UTF-8'
target fileTree(projectDir) {
include '**/src/**/*.java'
exclude '**/build/**'
}
importOrder '\\#', '', '*'
removeUnusedImports()
googleJavaFormat('1.15.0').aosp()
toggleOffOn()
endWithNewline()
}
}
jacocoTestReport {
reports {
xml.required = true
html.required = false
}
}