Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions build-logic/src/main/kotlin/dokka.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,45 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
import org.jetbrains.dokka.DokkaConfiguration.Visibility
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.dokka.gradle.DokkaExtension
import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier
import java.net.URI
import java.time.LocalDate

plugins {
id("org.jetbrains.dokka")
}

// TODO: Update to Dokka 2.0.0 (Issue #121)
tasks.withType<DokkaTaskPartial>().configureEach {
suppressInheritedMembers = true
rootProject.dependencies { dokka(project(project.path)) }

extensions.configure<DokkaExtension> {
dokkaPublications.configureEach {
suppressInheritedMembers.set(true)
}

dokkaSourceSets.configureEach {
includes.from("README.md")
noStdlibLink = true
enableKotlinStdLibDocumentationLink.set(false)

externalDocumentationLink {
url = URI("https://error.kotlincrypto.org/").toURL()
externalDocumentationLinks {
register(project.path + ":error") {
url.set(URI("https://error.kotlincrypto.org/"))
}
}

sourceLink {
localDirectory = rootDir
remoteUrl = URI("https://github.com/KotlinCrypto/core/tree/master").toURL()
remoteLineSuffix = "#L"
localDirectory.set(rootDir)
remoteUrl.set(URI("https://github.com/KotlinCrypto/core/tree/master"))
remoteLineSuffix.set("#L")
}

documentedVisibilities.set(setOf(
Visibility.PUBLIC,
Visibility.PROTECTED,
))
documentedVisibilities(
VisibilityModifier.Public,
VisibilityModifier.Protected,
)
}

pluginsConfiguration.html {
footerMessage.set("© 2023-${LocalDate.now().year} Copyright KotlinCrypto")
}
}
8 changes: 7 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ plugins {
}

allprojects {
findProperty("GROUP")?.let { group = it }
// https://github.com/Kotlin/dokka/issues/4030#issuecomment-2669254887
if (this.project == this.rootProject) {
group = "root"
} else {
findProperty("GROUP")?.let { group = it }
}

findProperty("VERSION_NAME")?.let { version = it }
findProperty("POM_DESCRIPTION")?.let { description = it.toString() }

Expand Down
4 changes: 2 additions & 2 deletions gh-pages/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ echo "$REPO_NAME.kotlincrypto.org" > "$DIR_SCRIPT/$REPO_NAME/CNAME"

cd ..
./gradlew clean -DKMP_TARGETS_ALL
./gradlew dokkaHtmlMultiModule --no-build-cache -DKMP_TARGETS_ALL
cp -aR build/dokka/htmlMultiModule/* gh-pages/$REPO_NAME
./gradlew dokkaGenerate --no-build-cache -DKMP_TARGETS_ALL
cp -aR build/dokka/html/* gh-pages/$REPO_NAME

cd "$DIR_SCRIPT/$REPO_NAME"
sed -i "s|module:|module:library/|g" "package-list"
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ kotlin.mpp.applyDefaultHierarchyTemplate=false
kotlin.mpp.stability.nowarn=true
kotlin.native.ignoreDisabledTargets=true

org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=true

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ androidx-test-runner = "1.5.2" # Do not upgrade. Tests run for API 15+, w
gradle-benchmark = "0.4.13"
gradle-android = "8.7.3"
gradle-binary-compat = "0.17.0"
gradle-dokka = "1.9.20"
gradle-dokka = "2.0.0"
gradle-kmp-configuration = "0.4.0"
gradle-kotlin = "2.1.10"
gradle-publish-maven = "0.30.0"
Expand Down
4 changes: 1 addition & 3 deletions test-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ plugins {
id("configuration")
}

repositories {
google()
}
repositories { google() }

kmpConfiguration {
configure {
Expand Down
Loading