-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
60 lines (54 loc) · 1.2 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 {
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
id "com.diffplug.spotless" version "6.2.2"
id 'maven-publish'
id "com.vanniktech.maven.publish" version "0.18.0"
id "signing"
}
group = 'io.github.martinwitt'
version = '1.0'
repositories {
// Use Maven Central for resolving dependencies.
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencies {
// Use JUnit Jupiter for testing.
implementation 'org.junit.jupiter:junit-jupiter:5.7.2'
}
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
spotless {
format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithTabs() // or spaces. Takes an integer argument if you don't like 4
endWithNewline()
}
java {
palantirJavaFormat()
}
groovyGradle {
target '*.gradle' // default target of groovyGradle
greclipse()
}
}
plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
}