|
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | **/ |
16 | | -import org.jetbrains.dokka.DokkaConfiguration.Visibility |
17 | | -import org.jetbrains.dokka.gradle.DokkaTaskPartial |
| 16 | +import org.jetbrains.dokka.gradle.DokkaExtension |
| 17 | +import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier |
18 | 18 | import java.net.URI |
| 19 | +import java.time.LocalDate |
19 | 20 |
|
20 | 21 | plugins { |
21 | 22 | id("org.jetbrains.dokka") |
22 | 23 | } |
23 | 24 |
|
24 | | -// TODO: Update to Dokka 2.0.0 (Issue #121) |
25 | | -tasks.withType<DokkaTaskPartial>().configureEach { |
26 | | - suppressInheritedMembers = true |
| 25 | +rootProject.dependencies { dokka(project(project.path)) } |
| 26 | + |
| 27 | +extensions.configure<DokkaExtension> { |
| 28 | + dokkaPublications.configureEach { |
| 29 | + suppressInheritedMembers.set(true) |
| 30 | + } |
27 | 31 |
|
28 | 32 | dokkaSourceSets.configureEach { |
29 | 33 | includes.from("README.md") |
30 | | - noStdlibLink = true |
| 34 | + enableKotlinStdLibDocumentationLink.set(false) |
31 | 35 |
|
32 | | - externalDocumentationLink { |
33 | | - url = URI("https://error.kotlincrypto.org/").toURL() |
| 36 | + externalDocumentationLinks { |
| 37 | + register(project.path + ":error") { |
| 38 | + url.set(URI("https://error.kotlincrypto.org/")) |
| 39 | + } |
34 | 40 | } |
35 | 41 |
|
36 | 42 | sourceLink { |
37 | | - localDirectory = rootDir |
38 | | - remoteUrl = URI("https://github.com/KotlinCrypto/core/tree/master").toURL() |
39 | | - remoteLineSuffix = "#L" |
| 43 | + localDirectory.set(rootDir) |
| 44 | + remoteUrl.set(URI("https://github.com/KotlinCrypto/core/tree/master")) |
| 45 | + remoteLineSuffix.set("#L") |
40 | 46 | } |
41 | 47 |
|
42 | | - documentedVisibilities.set(setOf( |
43 | | - Visibility.PUBLIC, |
44 | | - Visibility.PROTECTED, |
45 | | - )) |
| 48 | + documentedVisibilities( |
| 49 | + VisibilityModifier.Public, |
| 50 | + VisibilityModifier.Protected, |
| 51 | + ) |
| 52 | + } |
| 53 | + |
| 54 | + pluginsConfiguration.html { |
| 55 | + footerMessage.set("© 2023-${LocalDate.now().year} Copyright KotlinCrypto") |
46 | 56 | } |
47 | 57 | } |
0 commit comments