This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathbuild.gradle
56 lines (48 loc) · 1.54 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23"
classpath "org.jetbrains.kotlin:kotlin-serialization:1.9.23"
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.25.0'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.28.0'
}
}
apply plugin: 'java-library'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.jetbrains.kotlin.plugin.serialization'
apply plugin: 'com.vanniktech.maven.publish'
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
api "com.squareup.retrofit2:retrofit:2.10.0"
api "org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3"
testImplementation "junit:junit:4.13.2"
testImplementation "com.squareup.okhttp3:mockwebserver:4.12.0"
testImplementation "com.google.truth:truth:1.4.2"
testImplementation "org.jetbrains.kotlinx:kotlinx-serialization-protobuf:1.6.3"
testImplementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
}
tasks.withType(KotlinJvmCompile).configureEach { task ->
task.compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
freeCompilerArgs.add(
'-Xjsr305=strict',
)
}
}
apply plugin: 'com.diffplug.spotless'
spotless {
kotlin {
target("src/*/kotlin/**/*.kt")
ktlint('0.48.1').editorConfigOverride([
'ktlint_standard_filename': 'disabled',
])
}
}