|
1 | 1 | import com.android.build.gradle.internal.publishing.AndroidArtifacts |
| 2 | +import org.jetbrains.dokka.gradle.engine.parameters.KotlinPlatform |
| 3 | +import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier |
2 | 4 |
|
3 | 5 | apply plugin: 'org.jetbrains.kotlin.jvm' |
4 | 6 | apply plugin: 'org.jetbrains.kotlin.plugin.compose' |
@@ -74,32 +76,32 @@ dependencies { |
74 | 76 | testImplementation libs.truth |
75 | 77 | } |
76 | 78 |
|
77 | | -tasks.named("dokkaHtml").configure { |
78 | | - outputDirectory = rootProject.file("docs/1.x") |
79 | | - |
80 | | - dokkaSourceSets.named("main") { |
81 | | - configureEach { |
82 | | - reportUndocumented = false |
83 | | - skipDeprecated = true |
84 | | - jdkVersion = 8 |
85 | | - includeNonPublic = false |
86 | | - skipEmptyPackages = true |
87 | | - platform = "jvm" |
88 | | - |
89 | | - externalDocumentationLink { |
90 | | - url.set(java.net.URL("https://developer.android.com/reference/")) |
91 | | - } |
92 | | - |
93 | | - sourceLink { |
94 | | - localDirectory.set(file("src/main/java")) |
95 | | - remoteUrl.set(java.net.URL("https://github.com/cashapp/paparazzi/tree/master/paparazzi/src/main/java")) |
96 | | - remoteLineSuffix.set("#L") |
97 | | - } |
98 | | - |
99 | | - perPackageOption { |
100 | | - prefix = "app.cash.paparazzi.internal" |
101 | | - suppress = true |
102 | | - } |
| 79 | +dokka { |
| 80 | + dokkaPublications.html { |
| 81 | + outputDirectory.set(rootProject.file("docs/2.x")) |
| 82 | + } |
| 83 | + |
| 84 | + dokkaSourceSets.named("main").configure { |
| 85 | + reportUndocumented = false |
| 86 | + skipDeprecated = true |
| 87 | + jdkVersion = libs.versions.javaTarget.get() as int |
| 88 | + documentedVisibilities(VisibilityModifier.Public) |
| 89 | + skipEmptyPackages = true |
| 90 | + analysisPlatform = KotlinPlatform.JVM |
| 91 | + |
| 92 | + externalDocumentationLinks.register("docs") { |
| 93 | + url("https://developer.android.com/reference/") |
| 94 | + } |
| 95 | + |
| 96 | + sourceLink { |
| 97 | + localDirectory.set(file("src/main/java")) |
| 98 | + remoteUrl("https://github.com/cashapp/paparazzi/tree/master/paparazzi/src/main/java") |
| 99 | + remoteLineSuffix.set("#L") |
| 100 | + } |
| 101 | + |
| 102 | + perPackageOption { |
| 103 | + matchingRegex = /app\.cash\.paparazzi\.internal(\..*)?/ |
| 104 | + suppress = true |
103 | 105 | } |
104 | 106 | } |
105 | 107 | } |
|
0 commit comments