Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Upgrade to Dokka 2.0.0-Beta #3054

Merged
merged 3 commits into from
Nov 28, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ jobs:
run: make android-lib-arm-v8

- name: Build API documentation
run: ./gradlew dokkaHtml
run: ./gradlew dokkaGenerate

- name: Build Examples documentation
run: make mkdocs-build

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/gh-pages-android-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ jobs:
java-version: "17"

- name: Generate documentation
run: ./gradlew dokkaHtml
run: ./gradlew dokkaGenerate

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: platform/android/MapLibreAndroid/build/dokka/html
target-folder: android/api/

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/platform/android/armeabi-v7a
/platform/android/MapLibreAndroid/.cxx
/platform/android/MapLibreAndroid/build
/platform/android/MapLibrePlugin/build
/platform/android/MapLibreAndroidTestApp/.cxx
/platform/android/MapLibreAndroidTestApp/build
/platform/android/buildSrc/build
Expand Down
15 changes: 11 additions & 4 deletions platform/android/MapLibreAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.dokka.gradle.DokkaTask

plugins {
alias(libs.plugins.kotlinter)
alias(libs.plugins.dokka)
Expand Down Expand Up @@ -38,12 +36,21 @@ dependencies {
androidTestImplementation(libs.testRules)
}

tasks.withType<DokkaTask> {
dokka {
moduleName.set("MapLibre Native Android")

dokkaSourceSets {
named("main") {
main {
includes.from("Module.md")

sourceLink {
remoteUrl("https://github.com/maplibre/maplibre-native/tree/main/platform/android/")
localDirectory.set(rootDir)
}

// TODO add externalDocumentationLinks when these get dokka or javadocs:
// - https://github.com/maplibre/maplibre-java
// - https://github.com/maplibre/maplibre-gestures-android
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions platform/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ org.gradle.jvmargs=-Xmx4096M
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.injected.androidTest.leaveApksInstalledAfterRun=true
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
6 changes: 3 additions & 3 deletions platform/android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ androidxTestExtJUnit = { group = "androidx.test.ext", name = "junit", version =
androidxTestCoreKtx = { group = "androidx.test", name = "core-ktx", version = "1.6.1" }
kotlinxSerializationJson = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.7.2" }

androidGradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin"}
androidGradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }


[plugins]
nexusPublishPlugin = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
kotlinter = { id = "org.jmailen.kotlinter", version = "4.4.1" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version = "2.0.20" }
dokka = { id = "org.jetbrains.dokka", version = "1.9.20" }
dokka = { id = "org.jetbrains.dokka", version = "2.0.0-Beta" }
kotlinPluginSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version = "2.0.20" }
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
4 changes: 2 additions & 2 deletions platform/android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {

include(":MapLibreAndroid", ":MapLibreAndroidTestApp", ":MapLibreAndroidLint")

rootProject.name = "MapLibre Native for Android"
louwers marked this conversation as resolved.
Show resolved Hide resolved
rootProject.name = "MapLibreAndroid"

val renderTestProjectDir = file("$rootDir/../../render-test/android")
includeBuild(renderTestProjectDir) {
Expand All @@ -37,4 +37,4 @@ includeBuild(cppTestProjectDir) {
name = "cppUnitTestsApp"
}

includeBuild("./MapLibrePlugin")
includeBuild("./MapLibrePlugin")
Loading