This repository has been archived by the owner on Feb 19, 2023. It is now read-only.
forked from coil-kt/coil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
115 lines (101 loc) · 3.22 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
107
108
109
110
111
112
113
114
115
import coil.by
import coil.groupId
import coil.versionName
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import kotlinx.validation.ApiValidationExtension
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import java.net.URL
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(libs.gradlePlugin.android)
classpath(libs.gradlePlugin.kotlin)
classpath(libs.gradlePlugin.mavenPublish)
}
configurations.classpath {
resolutionStrategy.eachDependency {
when (requested.group) {
libs.ktlint.get().module.group -> useVersion(libs.versions.ktlint.get())
}
}
}
}
// https://youtrack.jetbrains.com/issue/KTIJ-19369
@Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
plugins {
alias(libs.plugins.binaryCompatibility)
alias(libs.plugins.dokka)
alias(libs.plugins.ktlint)
}
extensions.configure<ApiValidationExtension> {
ignoredProjects += arrayOf(
"coil-sample-common",
"coil-sample-compose",
"coil-sample-view",
"coil-test",
)
}
tasks.withType<DokkaMultiModuleTask>().configureEach {
outputDirectory by file("$rootDir/docs/api")
}
allprojects {
repositories {
google()
mavenCentral()
}
group = project.groupId
version = project.versionName
apply(plugin = "org.jmailen.kotlinter")
kotlinter {
disabledRules = arrayOf(
"annotation",
"argument-list-wrapping",
"filename",
"indent",
"max-line-length",
"parameter-list-wrapping",
"spacing-between-declarations-with-annotations",
"wrapping",
)
}
tasks.withType<DokkaTaskPartial>().configureEach {
dokkaSourceSets.configureEach {
jdkVersion by 8
skipDeprecated by true
suppressInheritedMembers by true
externalDocumentationLink {
url by URL("https://developer.android.com/reference/")
}
externalDocumentationLink {
url by URL("https://kotlinlang.org/api/kotlinx.coroutines/")
}
externalDocumentationLink {
url by URL("https://square.github.io/okhttp/4.x/")
packageListUrl by URL("https://colinwhite.me/okhttp3-package-list") // https://github.com/square/okhttp/issues/7338
}
externalDocumentationLink {
url by URL("https://square.github.io/okio/3.x/okio/")
packageListUrl by URL("https://square.github.io/okio/3.x/okio/okio/package-list")
}
}
}
plugins.withId("com.vanniktech.maven.publish.base") {
group = project.groupId
version = project.versionName
extensions.configure<MavenPublishBaseExtension> {
publishToMavenCentral()
signAllPublications()
pomFromGradleProperties()
}
}
// Uninstall test APKs after running instrumentation tests.
tasks.whenTaskAdded {
if (name == "connectedDebugAndroidTest") {
finalizedBy("uninstallDebugAndroidTest")
}
}
}