--- a/buildSrc/build.gradle.kts Fri May 02 18:29:03 2025 -0400
+++ b/buildSrc/build.gradle.kts Sun May 04 15:16:29 2025 -0400
@@ -67,6 +67,8 @@
implementation(libs.plugins.kotlin.android.gav())
implementation("gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1")
implementation(libs.plugins.vanniktech.maven.publish.gav())
+ implementation(libs.plugins.dokka.gav())
+ implementation(libs.dokka.android.plugin)
implementation("com.geekorum.gradle.avdl:plugin:0.0.3")
implementation("com.geekorum.gradle.avdl:flydroid:0.0.3")
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/buildSrc/src/main/kotlin/Dokka.kt Sun May 04 15:16:29 2025 -0400
@@ -0,0 +1,45 @@
+/*
+ * AboutOss is a utility library to retrieve and display
+ * opensource licenses in Android applications.
+ *
+ * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+ *
+ * This file is part of AboutOss.
+ *
+ * AboutOss is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AboutOss is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.geekorum.build
+
+import org.gradle.api.Project
+import org.gradle.kotlin.dsl.apply
+import org.gradle.kotlin.dsl.assign
+import org.gradle.kotlin.dsl.configure
+import org.jetbrains.dokka.gradle.DokkaExtension
+import org.jetbrains.dokka.gradle.DokkaPlugin
+
+
+internal fun Project.configureDokka() {
+ apply<DokkaPlugin>()
+
+ configure<DokkaExtension> {
+ dokkaSourceSets.configureEach {
+ reportUndocumented = true
+ sourceLink {
+ localDirectory = rootDir
+ remoteUrl = uri("https://github.com/fbarthelery/AboutOss/tree/main/")
+ }
+ }
+ }
+
+}
\ No newline at end of file
--- a/buildSrc/src/main/kotlin/MavenPublish.kt Fri May 02 18:29:03 2025 -0400
+++ b/buildSrc/src/main/kotlin/MavenPublish.kt Sun May 04 15:16:29 2025 -0400
@@ -26,6 +26,7 @@
import com.vanniktech.maven.publish.SonatypeHost
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
+import org.gradle.kotlin.dsl.assign
import org.gradle.kotlin.dsl.configure
internal fun Project.configureMavenPublish() {
@@ -37,32 +38,31 @@
// default pom info. each field can be overridden in specific project
pom {
- name.set("${project.group}:${project.name}")
- description.set("A library to retrieve and display opensource licenses in applications")
- inceptionYear.set("2023")
+ name = "${project.group}:${project.name}"
+ description = "A library to retrieve and display opensource licenses in applications"
+ inceptionYear = "2023"
val githubUrl = "https://github.com/fbarthelery/AboutOss/"
- url.set(githubUrl)
+ url = githubUrl
scm {
- url.set(githubUrl)
- connection.set("scm:git:$githubUrl.git")
+ url = githubUrl
+ connection = "scm:git:$githubUrl.git"
}
licenses {
license {
- name.set("GPL-3.0-or-later")
- url.set("https://www.gnu.org/licenses/gpl-3.0.html")
- distribution.set("repo")
+ name = "GPL-3.0-or-later"
+ url = "https://www.gnu.org/licenses/gpl-3.0.html"
+ distribution = "repo"
}
}
developers {
developer {
- id.set("da_risk")
- name.set("Frédéric Barthéléry")
- email.set("da_risk@geekorum.com")
+ id = "da_risk"
+ name = "Frédéric Barthéléry"
+ email = "da_risk@geekorum.com"
}
}
}
}
-
}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/buildSrc/src/main/kotlin/dokka.gradle.kts Sun May 04 15:16:29 2025 -0400
@@ -0,0 +1,34 @@
+/*
+ * AboutOss is a utility library to retrieve and display
+ * opensource licenses in Android applications.
+ *
+ * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+ *
+ * This file is part of AboutOss.
+ *
+ * AboutOss is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AboutOss is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.geekorum.build
+
+plugins {
+ id("org.jetbrains.dokka")
+}
+
+val libs = the<VersionCatalogsExtension>().named("libs")
+dependencies {
+ val dokkaAndroidDep = libs.findLibrary("dokka-android-plugin").get().get()
+ dokkaPlugin(dokkaAndroidDep)
+}
+
+configureDokka()
\ No newline at end of file
--- a/gradle.properties Fri May 02 18:29:03 2025 -0400
+++ b/gradle.properties Sun May 04 15:16:29 2025 -0400
@@ -17,3 +17,7 @@
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
+
+#dokka v2
+org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
+org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
\ No newline at end of file
--- a/gradle/libs.versions.toml Fri May 02 18:29:03 2025 -0400
+++ b/gradle/libs.versions.toml Sun May 04 15:16:29 2025 -0400
@@ -20,6 +20,7 @@
[versions]
android-gradle-plugin = "8.9.2"
+dokka = "2.0.0"
kotlin = "2.1.20"
jetbrains-compose-multiplatform = "1.8.0-rc01" # rc for adaptive
junit = "4.13.2"
@@ -70,12 +71,13 @@
androidx-compose-uiTestJunit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
-
+dokka-android-plugin = { module = "org.jetbrains.dokka:android-documentation-plugin", version.ref = "dokka" }
[plugins]
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
android-library = { id = "com.android.library", version.ref = "android-gradle-plugin" }
jetbrains-compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose-multiplatform" }
+dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
google-gms-oss-license = { id = "com.google.android.gms.oss-licenses-plugin", version = "0.10.6" }