-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
73 lines (60 loc) · 1.98 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
69
70
71
72
73
buildscript {
apply from: 'dependencies.gradle'
dependencies {
classpath deps.kotlinGradlePlugin
classpath "org.jetbrains.kotlin:kotlin-serialization:${versions.kotlin}"
classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.1.0'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.14.2'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.4.32'
classpath 'de.undercouch:gradle-download-task:4.1.1'
}
repositories {
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version "1.8.10"
id 'com.vanniktech.maven.publish' version "0.25.3"
}
dependencies {
compileOnly gradleApi()
compileOnly deps.kotlinGradlePlugin
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.0'
testImplementation 'org.assertj:assertj-core:3.19.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.0-M1'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.0-M1'
testImplementation 'org.junit.platform:junit-platform-gradle-plugin:1.2.0'
testImplementation 'org.jetbrains.kotlin:kotlin-test:1.4.32'
}
repositories {
mavenCentral()
google()
}
test {
useJUnitPlatform()
testLogging {
if (System.getenv("CI") == "true") {
events = ["failed", "skipped", "passed"]
}
exceptionFormat "full"
}
}
import com.vanniktech.maven.publish.SonatypeHost
mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT, true)
signAllPublications()
}
apply plugin: 'com.diffplug.spotless'
spotless {
kotlin {
target('**/*.kt')
licenseHeaderFile(rootProject.file('gradle/license-header.txt'))
// Spotless doesn't read .editorconfig yet: https://github.com/diffplug/spotless/issues/142
ktlint('0.41.0').userData([
'insert_final_newline': 'true',
'end_of_line' : 'lf',
'indent_size' : '2',
])
}
}