-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
86 lines (73 loc) · 3.47 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
75
76
77
78
79
80
81
82
83
84
85
86
import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import java.time.Year
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.9.20"
}
}
plugins {
id 'com.android.application' version '8.4.1' apply false
id 'com.android.library' version '8.4.1' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
id 'org.jetbrains.dokka' version '1.9.20'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.22' apply false
}
tasks.register('updateVersion') {
def sdkVersion = project.ext.sdkVersion
ant.replaceregexp(file: 'gradle.properties', match: 'sdkVersion=.*', replace: "sdkVersion=$sdkVersion", flags: 'g', byline: true)
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
tasks.withType(DokkaMultiModuleTask.class).configureEach {
moduleName = "THEOplayer Connectors for Android"
String dokkaBaseConfiguration = """
{
"customAssets": ["${file("assets/logo-icon.svg").path.replace('\\', "\\\\")}"],
"footerMessage": "© ${Year.now().value} THEO Technologies"
}
"""
pluginsMapConfiguration.set(
// fully qualified plugin name to json configuration
["org.jetbrains.dokka.base.DokkaBase": dokkaBaseConfiguration]
)
}
tasks.dokkaHtmlMultiModule.configure {
outputDirectory = rootProject.file("site/api")
}
subprojects {
version = sdkVersion
tasks.withType(AbstractDokkaLeafTask.class).configureEach {
suppressObviousFunctions.set(true)
suppressInheritedMembers.set(true)
dokkaSourceSets {
configureEach {
includeNonPublic.set(false) // Use to include or exclude non public members
skipDeprecated.set(false) // Do not output deprecated members. Applies globally, can be overridden by packageOptions
// Emit warnings about not documented members. Applies globally, also can be overridden by packageOptions
reportUndocumented.set(true)
skipEmptyPackages.set(false) // Do not create index pages for empty packages
jdkVersion.set(11) // Used for linking to JDK documentation
noStdlibLink.set(false) // Use to enable or disable linking to online kotlin-stdlib documentation
noJdkLink.set(false) // Use to enable or disable linking to online JDK documentation
// Use to enable or disable linking to online Android documentation (only applicable for Android projects)
noAndroidSdkLink.set(false)
externalDocumentationLink {
url.set(new URL("https://www.theoplayer.com/docs/theoplayer/v7/api-reference/android/"))
// TODO: Fix link to https://www.theoplayer.com/docs/theoplayer/v7/api-reference/android/package-list
packageListUrl.set(new URL("https://raw.githubusercontent.com/THEOplayer/documentation/main/theoplayer/static/theoplayer/v7/api-reference/android/package-list"))
}
perPackageOption {
matchingRegex.set("com[.]theoplayer[.]android[.]connector[.].*[.]internal.*")
suppress.set(true)
}
}
}
}
}