-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
build.gradle
71 lines (59 loc) · 2.15 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
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.gradle.DokkaTask
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.9.23'
ext.dokka_version = '1.9.20'
dependencies {
classpath("org.jetbrains.dokka:dokka-base:$dokka_version")
}
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id 'com.android.application' version '8.4.0' apply false
id 'com.android.library' version '8.4.0' apply false
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
id 'com.google.devtools.ksp' version '1.9.23-1.0.20' apply false
id 'com.diffplug.spotless' version '6.25.0'
id "org.jetbrains.dokka" version "$dokka_version"
}
subprojects {
apply plugin: 'com.diffplug.spotless'
spotless {
kotlin {
target '**/*.kt'
targetExclude "${layout.buildDirectory}/**/*.kt"
targetExclude 'bin/**/*.kt'
ktlint()
licenseHeaderFile rootProject.file('spotless/copyright.kt')
}
format('kts') {
target '**/*.kts'
targetExclude '**/build/**/*.kts'
// Look for the first line that doesn't have a block comment (assumed to be the license)
licenseHeaderFile rootProject.file('spotless/copyright.kts'), '(^(?![\\/ ]\\*).*$)'
}
format('xml') {
target '**/*.xml'
targetExclude '**/build/**/*.xml'
// Look for the first XML tag that isn't a comment (<!--) or the xml declaration (<?xml)
licenseHeaderFile rootProject.file('spotless/copyright.xml'), '(<[^!?])'
}
}
}
tasks.withType(DokkaMultiModuleTask).configureEach {
moduleName = "Why Not! Image Carousel!"
outputDirectory = rootProject.file('docs/api')
failOnWarning = true
pluginsMapConfiguration.set(
[
"org.jetbrains.dokka.base.DokkaBase": """{
"footerMessage": "Copyright © 2021 Md. Mahmudul Hasan Shohag"
}"""
]
)
}