From d3d29cb9d8ac094d6da0d0d90c623d918e502a4d Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Wed, 22 May 2024 18:38:23 +0200 Subject: [PATCH] Fix Android docs deployment (#2412) --- .github/workflows/android-ci.yml | 3 +++ .github/workflows/gh-pages-android-api.yml | 6 ++++++ platform/android/MapLibreAndroid/{README.md => Module.md} | 2 +- platform/android/MapLibreAndroid/build.gradle | 5 ++--- platform/android/gradle/libs.versions.toml | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) rename platform/android/MapLibreAndroid/{README.md => Module.md} (91%) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index fc6a832a23d..08469f47e88 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -109,6 +109,9 @@ jobs: - name: Build libmaplibre.so for arm-v8 run: make android-lib-arm-v8 + - name: Build documentation + run: ./gradlew dokkaHtml + - name: Copy developer config with API key for UI tests if: github.ref == 'refs/heads/main' run: | diff --git a/.github/workflows/gh-pages-android-api.yml b/.github/workflows/gh-pages-android-api.yml index 78f08374bd2..a5b8b111f0b 100644 --- a/.github/workflows/gh-pages-android-api.yml +++ b/.github/workflows/gh-pages-android-api.yml @@ -13,6 +13,11 @@ jobs: - name: Checkout 🛎️ uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + - name: Generate documentation run: ./gradlew dokkaHtml @@ -22,3 +27,4 @@ jobs: branch: gh-pages folder: platform/android/MapLibreAndroid/build/dokka/html target-folder: android/api/ + \ No newline at end of file diff --git a/platform/android/MapLibreAndroid/README.md b/platform/android/MapLibreAndroid/Module.md similarity index 91% rename from platform/android/MapLibreAndroid/README.md rename to platform/android/MapLibreAndroid/Module.md index ca86775598c..9050cdb5a93 100644 --- a/platform/android/MapLibreAndroid/README.md +++ b/platform/android/MapLibreAndroid/Module.md @@ -1,4 +1,4 @@ -# MapLibre Native for Android +# Module MapLibre Native Android This is the API documentation for the Android API of [MapLibre Native](https://github.com/maplibre/maplibre-native). diff --git a/platform/android/MapLibreAndroid/build.gradle b/platform/android/MapLibreAndroid/build.gradle index 2e04825695a..1cf69bd772b 100644 --- a/platform/android/MapLibreAndroid/build.gradle +++ b/platform/android/MapLibreAndroid/build.gradle @@ -34,12 +34,11 @@ dependencies { } tasks.withType(DokkaTask.class) { - moduleName.set("MapLibre Native for Android") + moduleName.set("MapLibre Native Android") dokkaSourceSets { - configureEach { - includes.from("README.md") + includes.from("Module.md") } } } diff --git a/platform/android/gradle/libs.versions.toml b/platform/android/gradle/libs.versions.toml index d3f9d806664..5ddce7f9e63 100644 --- a/platform/android/gradle/libs.versions.toml +++ b/platform/android/gradle/libs.versions.toml @@ -88,5 +88,5 @@ androidGradlePlugin = { group = "com.android.tools.build", name = "gradle", vers nexusPublishPlugin = { id = "io.github.gradle-nexus.publish-plugin", version = "1.1.0" } kotlinter = { id = "org.jmailen.kotlinter", version = "3.13.0" } kotlinAndroid = { id = "org.jetbrains.kotlin.android", version = "1.9.21" } -dokka = { id = "org.jetbrains.dokka", version = "1.7.20" } +dokka = { id = "org.jetbrains.dokka", version = "1.9.20" } kotlinPluginSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version = "1.9.21" } \ No newline at end of file