-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
74 lines (65 loc) · 2.94 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
74
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.metalava) apply false
alias(libs.plugins.maven.publish) apply false
alias(libs.plugins.jetbrains.dokka)
}
tasks.withType(DokkaMultiModuleTask).configureEach {
outputDirectory = rootProject.file('docs/api')
failOnWarning = true
}
subprojects {
// Read in the signing.properties file if it is exists
def signingPropsFile = rootProject.file('release/signing.properties')
if (signingPropsFile.exists()) {
def localProperties = new Properties()
signingPropsFile.withInputStream { is -> localProperties.load(is) }
localProperties.each { prop ->
if (prop.key == "signing.secretKeyRingFile") {
// If this is the key ring, treat it as a relative path
project.ext.set(prop.key, rootProject.file(prop.value).absolutePath)
} else {
project.ext.set(prop.key, prop.value)
}
}
}
// Must be afterEvaluate or else com.vanniktech.maven.publish will overwrite our
// dokka and version configuration.
afterEvaluate {
if (tasks.findByName('dokkaHtmlPartial') == null) {
// If dokka isn't enabled on this module, skip
return
}
tasks.named('dokkaHtmlPartial') {
dokkaSourceSets.configureEach {
reportUndocumented.set(true)
skipEmptyPackages.set(true)
skipDeprecated.set(true)
jdkVersion.set(8)
// Add Android SDK packages
noAndroidSdkLink.set(false)
// Add samples from :sample module
samples.from(rootProject.file("sample/src/main/java/"))
// AndroidX + Compose docs
externalDocumentationLink {
url.set(new URL("https://developer.android.com/reference/"))
packageListUrl.set(new URL("https://developer.android.com/reference/androidx/package-list"))
}
externalDocumentationLink {
url.set(new URL("https://developer.android.com/reference/kotlin/"))
packageListUrl.set(new URL("https://developer.android.com/reference/kotlin/androidx/package-list"))
}
sourceLink {
localDirectory.set(project.file("src/main/java"))
// URL showing where the source code can be accessed through the web browser
remoteUrl.set(new URL("https://github.com/webtoon/ReadMoreTextView/blob/main/${project.name}/src/main/java"))
// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#L")
}
}
}
}
}