-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
68 lines (58 loc) · 1.99 KB
/
build.gradle.kts
File metadata and controls
68 lines (58 loc) · 1.99 KB
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.jetbrains.dokka")
}
repositories {
mavenCentral()
}
dokka {
dokkaPublications.configureEach {
outputDirectory.set(rootProject.file("docs/api"))
}
}
dependencies {
dokka(project(":richtext-ui"))
dokka(project(":richtext-ui-material"))
dokka(project(":richtext-ui-material3"))
dokka(project(":richtext-markdown"))
dokka(project(":richtext-commonmark"))
}
// See https://stackoverflow.com/questions/25324880/detect-ide-environment-with-gradle
fun isRunningFromIde(): Boolean {
return project.properties["android.injected.invoked.from.ide"] == "true"
}
subprojects {
repositories {
google()
mavenCentral()
}
tasks.withType<KotlinCompile>().all {
compilerOptions {
// TODO(stable); Disable warnings as errors until we get to 1.0.0
// Allow warnings when running from IDE, makes it easier to experiment.
// if (!isRunningFromIde()) {
// allWarningsAsErrors = true
// }
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn", "-Xexpect-actual-classes")
}
}
// taken from https://github.com/google/accompanist/blob/main/build.gradle
afterEvaluate {
if (tasks.findByName("dokkaHtmlPartial") == null) {
// If dokka isn't enabled on this module, skip
return@afterEvaluate
}
}
}
//disable until the library reaches 1.0.0-beta01
//apply plugin: 'binary-compatibility-validator'
//apiValidation {
// // Ignore all sample projects, since they're not part of our API.
// // Only leaf project name is valid configuration, and every project must be individually ignored.
// // See https://github.com/Kotlin/binary-compatibility-validator/issues/3
// ignoredProjects += project('sample').name
// ignoredProjects += project('desktop').name
// ignoredProjects += project('richtext-ui-kmm').name
// ignoredProjects += project('richtext-commonmark-kmm').name
//}