@@ -5,27 +5,31 @@ buildscript {
5
5
repositories {
6
6
google()
7
7
mavenCentral()
8
- maven {
9
- url " https://oss.sonatype.org/content/repositories/snapshots"
10
- }
11
8
gradlePluginPortal()
12
9
}
13
10
14
11
dependencies {
15
- classpath " com.android.tools.build:gradle:${ ANDROID_GRADLE_VERSION} "
12
+ classpath " com.android.tools.build:gradle:$ANDROID_GRADLE_VERSION "
16
13
if (! hasProperty(' DISABLE_ERROR_PRONE' )) {
17
- classpath " net.ltgt.gradle:gradle-errorprone-plugin:${ ERROR_PRONE_PLUGIN_VERSION} "
14
+ classpath " net.ltgt.gradle:gradle-errorprone-plugin:$ERROR_PRONE_PLUGIN_VERSION "
18
15
}
19
16
classpath ' com.guardsquare:proguard-gradle:7.1.0'
20
- classpath " se.bjurr.violations:violations-gradle-plugin:${ VIOLATIONS_PLUGIN_VERSION} "
21
- classpath " androidx.benchmark:benchmark-gradle-plugin:${ ANDROID_X_BENCHMARK_VERSION} "
22
- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:${ JETBRAINS_KOTLIN_VERSION} "
17
+ classpath " se.bjurr.violations:violations-gradle-plugin:$VIOLATIONS_PLUGIN_VERSION "
18
+ classpath " androidx.benchmark:benchmark-gradle-plugin:$ANDROID_X_BENCHMARK_VERSION "
19
+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$JETBRAINS_KOTLIN_VERSION "
23
20
classpath " com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:$KSP_GRADLE_PLUGIN_VERSION "
24
- classpath " org.jetbrains.kotlinx:binary-compatibility-validator:0.11.0"
21
+ classpath " org.jetbrains.kotlinx:binary-compatibility-validator:$JETBRAINS_KOTLINX_BINARY_COMPATIBILITY_VALIDATOR_VERSION "
22
+ classpath " org.jetbrains.dokka:dokka-gradle-plugin:$JETBRAINS_DOKKA_VERSION "
25
23
}
26
24
}
27
25
26
+ repositories {
27
+ google()
28
+ mavenCentral()
29
+ }
30
+
28
31
apply plugin : ' binary-compatibility-validator'
32
+ apply plugin : ' org.jetbrains.dokka'
29
33
30
34
apiValidation {
31
35
ignoredProjects + = [" ksp" , " test" , " gallery" ]
@@ -41,8 +45,23 @@ if (JavaVersion.current().isJava8Compatible()) {
41
45
}
42
46
}
43
47
44
- subprojects { project ->
48
+ dokkaHtmlMultiModule. configure {
49
+ moduleName. set(" Glide" )
50
+ }
51
+ afterEvaluate {
52
+ tasks. named(" dokkaHtmlMultiModule" ) {
53
+ pluginsMapConfiguration. set(
54
+ [
55
+ " org.jetbrains.dokka.base.DokkaBase" : """ {
56
+ "customStyleSheets": ["${ projectDir.toString()} /static/logo-styles.css"],
57
+ "customAssets" : ["${ projectDir.toString()} /static/logo-icon.svg", "${ projectDir.toString()} /static/glide_circle_logo.png"]
58
+ }"""
59
+ ]
60
+ )
61
+ }
62
+ }
45
63
64
+ subprojects { project ->
46
65
repositories {
47
66
google()
48
67
mavenCentral()
@@ -61,6 +80,45 @@ subprojects { project ->
61
80
}
62
81
}
63
82
83
+ // Exclude packages not intended for public use.
84
+ if (! [
85
+ " testutil" ,
86
+ " flickr" ,
87
+ " giphy" ,
88
+ " imgur" ,
89
+ " svg" ,
90
+ " gallery" ,
91
+ " contacturi" ,
92
+ " test" ,
93
+ " gif_decoder" ,
94
+ " gifencoder" ,
95
+ " compiler" ,
96
+ " benchmark" ,
97
+ " instrumentation"
98
+ ]. contains(project. getName())) {
99
+ afterEvaluate {
100
+ project. apply plugin : ' org.jetbrains.dokka'
101
+
102
+ project. tasks. dokkaHtmlPartial. configure {
103
+ dokkaSourceSets {
104
+ // Kotlin works out of the box
105
+ if (! project. plugins. hasPlugin(" kotlin-android" ) && project. plugins. hasPlugin(" com.android.library" )) {
106
+ // Java Android modules
107
+ register(" main" ) {
108
+ sourceRoots. from(project. android. sourceSets. main. java. srcDirs)
109
+
110
+ }
111
+ } else if (project. plugins. hasPlugin(" java" ) && " ksp" != project. getName()) {
112
+ // Java only modules (ksp is not useful and uses multiple plugins)
113
+ register(" main" ) {
114
+ sourceRoots. from(sourceSets. main. java. srcDirs)
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+
64
122
tasks. withType(JavaCompile ) {
65
123
// gifencoder is a legacy project that has a ton of warnings and is basically never
66
124
// modified, so we're not going to worry about cleaning it up.
0 commit comments