|
1 | | -/* |
2 | | - * Copyright (c) 2024. ForteScarlet. |
3 | | - * |
4 | | - * This file is part of simbot-component-onebot. |
5 | | - * |
6 | | - * simbot-component-onebot is free software: you can redistribute it and/or modify it under the terms |
7 | | - * of the GNU Lesser General Public License as published by the Free Software Foundation, |
8 | | - * either version 3 of the License, or (at your option) any later version. |
9 | | - * |
10 | | - * simbot-component-onebot is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
11 | | - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
12 | | - * See the GNU Lesser General Public License for more details. |
13 | | - * |
14 | | - * You should have received a copy of the GNU Lesser General Public License along with simbot-component-onebot. |
15 | | - * If not, see <https://www.gnu.org/licenses/>. |
16 | | - */ |
17 | | - |
18 | | - |
19 | | -import org.jetbrains.dokka.base.DokkaBase |
20 | | -import org.jetbrains.dokka.base.DokkaBaseConfiguration |
21 | | -import java.time.Year |
22 | | - |
23 | | -plugins { |
24 | | - id("org.jetbrains.dokka") |
25 | | -} |
26 | | - |
27 | | -repositories { |
28 | | - mavenCentral() |
29 | | -} |
30 | | - |
31 | | -fun org.jetbrains.dokka.gradle.AbstractDokkaTask.configOutput(format: String) { |
32 | | - moduleName.set("Simple Robot 组件 | OneBot") |
33 | | - outputDirectory.set(rootProject.file("build/dokka/$format")) |
34 | | -} |
35 | | - |
36 | | -@Suppress("MaxLineLength") |
37 | | -tasks.named<org.jetbrains.dokka.gradle.DokkaMultiModuleTask>("dokkaHtmlMultiModule") { |
38 | | - configOutput("html") |
39 | | - if (isSimbotLocal()) { |
40 | | - offlineMode.set(true) |
41 | | - } |
42 | | - // rootProject.file("README.md").takeIf { it.exists() }?.also { |
43 | | - // includes.from(it) |
44 | | - // } |
45 | | - |
46 | | - pluginConfiguration<DokkaBase, DokkaBaseConfiguration> { |
47 | | - customAssets = listOf( |
48 | | - rootProject.file(".simbot/dokka-assets/logo-icon.svg"), |
49 | | - rootProject.file(".simbot/dokka-assets/logo-icon-light.svg"), |
50 | | - ) |
51 | | - customStyleSheets = listOf(rootProject.file(".simbot/dokka-assets/css/kdoc-style.css")) |
52 | | - if (!isSimbotLocal()) { |
53 | | - templatesDir = rootProject.file(".simbot/dokka-templates") |
54 | | - } |
55 | | - val now = Year.now().value |
56 | | - val yearRange = if (now == 2024) "2024" else "2024-$now" |
57 | | - footerMessage = "© $yearRange <a href='https://github.com/simple-robot'>Simple Robot</a>. All rights reserved." |
58 | | - separateInheritedMembers = true |
59 | | - mergeImplicitExpectActualDeclarations = true |
60 | | - homepageLink = P.ComponentOneBot.HOMEPAGE |
61 | | - } |
62 | | -} |
63 | | - |
| 1 | +// /* |
| 2 | +// * Copyright (c) 2024. ForteScarlet. |
| 3 | +// * |
| 4 | +// * This file is part of simbot-component-onebot. |
| 5 | +// * |
| 6 | +// * simbot-component-onebot is free software: you can redistribute it and/or modify it under the terms |
| 7 | +// * of the GNU Lesser General Public License as published by the Free Software Foundation, |
| 8 | +// * either version 3 of the License, or (at your option) any later version. |
| 9 | +// * |
| 10 | +// * simbot-component-onebot is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 11 | +// * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 12 | +// * See the GNU Lesser General Public License for more details. |
| 13 | +// * |
| 14 | +// * You should have received a copy of the GNU Lesser General Public License along with simbot-component-onebot. |
| 15 | +// * If not, see <https://www.gnu.org/licenses/>. |
| 16 | +// */ |
| 17 | +// |
| 18 | +// |
| 19 | +// import org.jetbrains.dokka.base.DokkaBase |
| 20 | +// import org.jetbrains.dokka.base.DokkaBaseConfiguration |
| 21 | +// import java.time.Year |
| 22 | +// |
| 23 | +// plugins { |
| 24 | +// id("org.jetbrains.dokka") |
| 25 | +// } |
| 26 | +// |
| 27 | +// repositories { |
| 28 | +// mavenCentral() |
| 29 | +// } |
| 30 | +// |
| 31 | +// fun org.jetbrains.dokka.gradle.AbstractDokkaTask.configOutput(format: String) { |
| 32 | +// moduleName.set("Simple Robot 组件 | OneBot") |
| 33 | +// outputDirectory.set(rootProject.file("build/dokka/$format")) |
| 34 | +// } |
| 35 | +// |
| 36 | +// @Suppress("MaxLineLength") |
| 37 | +// tasks.named<org.jetbrains.dokka.gradle.DokkaMultiModuleTask>("dokkaHtmlMultiModule") { |
| 38 | +// configOutput("html") |
| 39 | +// if (isSimbotLocal()) { |
| 40 | +// offlineMode.set(true) |
| 41 | +// } |
| 42 | +// // rootProject.file("README.md").takeIf { it.exists() }?.also { |
| 43 | +// // includes.from(it) |
| 44 | +// // } |
| 45 | +// |
| 46 | +// pluginConfiguration<DokkaBase, DokkaBaseConfiguration> { |
| 47 | +// customAssets = listOf( |
| 48 | +// rootProject.file(".simbot/dokka-assets/logo-icon.svg"), |
| 49 | +// rootProject.file(".simbot/dokka-assets/logo-icon-light.svg"), |
| 50 | +// ) |
| 51 | +// customStyleSheets = listOf(rootProject.file(".simbot/dokka-assets/css/kdoc-style.css")) |
| 52 | +// if (!isSimbotLocal()) { |
| 53 | +// templatesDir = rootProject.file(".simbot/dokka-templates") |
| 54 | +// } |
| 55 | +// val now = Year.now().value |
| 56 | +// val yearRange = if (now == 2024) "2024" else "2024-$now" |
| 57 | +// footerMessage = "© $yearRange <a href='https://github.com/simple-robot'>Simple Robot</a>. All rights reserved." |
| 58 | +// separateInheritedMembers = true |
| 59 | +// mergeImplicitExpectActualDeclarations = true |
| 60 | +// homepageLink = P.ComponentOneBot.HOMEPAGE |
| 61 | +// } |
| 62 | +// } |
| 63 | +// |
0 commit comments