forked from coil-kt/coil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
106 lines (95 loc) · 3.69 KB
/
build.gradle.kts
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
@file:Suppress("UnstableApiUsage")
import coil.groupId
import coil.versionName
import com.android.build.gradle.BaseExtension
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jlleitschuh.gradle.ktlint.KtlintExtension
import java.net.URL
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven("https://oss.sonatype.org/content/repositories/snapshots")
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.3")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.9.0-SNAPSHOT")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:0.10.0")
classpath("org.jlleitschuh.gradle:ktlint-gradle:9.1.1")
classpath(kotlin("gradle-plugin", version = "1.3.61"))
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
group = project.groupId
version = project.versionName
extensions.configure<KtlintExtension>("ktlint") {
version.set("0.36.0")
enableExperimentalRules.set(true)
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-progressive", "-Xuse-experimental=kotlin.Experimental")
jvmTarget = "1.8"
}
}
tasks.withType<Test> {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
events = setOf(TestLogEvent.SKIPPED, TestLogEvent.PASSED, TestLogEvent.FAILED)
showStandardStreams = true
}
}
// Must be afterEvaluate or else com.vanniktech.maven.publish will overwrite our dokka configuration.
afterEvaluate {
tasks.withType<DokkaTask> {
configuration {
jdkVersion = 8
reportUndocumented = false
skipDeprecated = true
skipEmptyPackages = true
externalDocumentationLink {
url = URL("https://developer.android.com/reference/androidx/")
packageListUrl = URL("https://developer.android.com/reference/androidx/package-list")
}
externalDocumentationLink {
url = URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-android/")
packageListUrl = URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-android/package-list")
}
externalDocumentationLink {
url = URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/")
packageListUrl = URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/package-list")
}
externalDocumentationLink {
url = URL("https://square.github.io/okhttp/3.x/okhttp/")
packageListUrl = URL("https://square.github.io/okhttp/3.x/okhttp/package-list")
}
externalDocumentationLink {
url = URL("https://square.github.io/okio/2.x/okio/")
packageListUrl = URL("https://square.github.io/okio/2.x/okio/package-list")
}
}
}
}
}
// Require that all Android projects target Java 8.
subprojects {
afterEvaluate {
extensions.configure<BaseExtension> {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
}
}