-
Notifications
You must be signed in to change notification settings - Fork 505
MW-213 Discover and implement kotlin docs and generate documentation #1861
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
base: development
Are you sure you want to change the base?
Changes from 4 commits
114ae9b
27518ad
d23b76b
7b524a7
93415f6
3607573
7c8fdad
abd4782
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget | |
|
|
||
| plugins { | ||
| `kotlin-dsl` | ||
| alias(libs.plugins.dokka) | ||
|
||
| } | ||
|
|
||
| group = "org.mifospay.buildlogic" | ||
|
|
@@ -29,6 +30,7 @@ dependencies { | |
| compileOnly(libs.ktlint.gradlePlugin) | ||
| compileOnly(libs.spotless.gradle) | ||
| implementation(libs.truth) | ||
| implementation(libs.dokka.gradle.plugin) | ||
|
||
| } | ||
|
|
||
| tasks { | ||
|
|
@@ -91,5 +93,9 @@ gradlePlugin { | |
| implementationClass = "MifosGitHooksConventionPlugin" | ||
| description = "Installs git hooks for the project" | ||
| } | ||
| register("featureLibrary") { | ||
|
||
| id = "mifospay.feature.library" | ||
| implementationClass = "FeatureLibraryPlugin" | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,8 @@ class CMPFeatureConventionPlugin : Plugin<Project> { | |
| apply("mifospay.kmp.koin") | ||
| apply("org.jetbrains.kotlin.plugin.compose") | ||
| apply("org.jetbrains.compose") | ||
| apply("org.jetbrains.dokka") | ||
| apply(KMPLibraryPlugin::class.java) | ||
|
||
| } | ||
|
|
||
| dependencies { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import org.gradle.api.Plugin | ||
| import org.gradle.api.Project | ||
| import org.jetbrains.dokka.gradle.DokkaTask | ||
|
|
||
| class FeatureLibraryPlugin : Plugin<Project> { | ||
|
||
| override fun apply(target: Project) { | ||
| target.tasks.withType(DokkaTask::class.java).configureEach { | ||
| outputDirectory.set(target.layout.buildDirectory.dir("dokka")) | ||
| moduleName.set("feature") | ||
| dokkaSourceSets.configureEach { | ||
| sourceLink { | ||
| localDirectory.set(target.file("src")) | ||
| remoteUrl.set(java.net.URI("https://github.com/openMF/mobile-wallet.git").toURL()) | ||
| remoteLineSuffix.set("#L") | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,11 +13,13 @@ class KMPLibraryConventionPlugin: Plugin<Project> { | |
| override fun apply(target: Project) { | ||
| with(target) { | ||
| with(pluginManager) { | ||
| apply(KMPLibraryPlugin::class.java) | ||
|
||
| apply("com.android.library") | ||
| apply("org.jetbrains.kotlin.multiplatform") | ||
| apply("mifospay.kmp.koin") | ||
| apply("mifos.detekt.plugin") | ||
| apply("mifos.spotless.plugin") | ||
| apply("org.jetbrains.dokka") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is sufficient for docs generation
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok I will look into it |
||
| } | ||
|
|
||
| configureKotlinMultiplatform() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import org.gradle.api.Plugin | ||
| import org.gradle.api.Project | ||
| import org.gradle.kotlin.dsl.withType | ||
|
|
||
| class KMPLibraryPlugin : Plugin<Project> { | ||
|
||
| override fun apply(target: Project) { | ||
| target.plugins.apply("org.jetbrains.kotlin.multiplatform") | ||
| target.plugins.apply("org.jetbrains.dokka") | ||
|
|
||
| target.tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach { | ||
| outputDirectory.set(target.layout.buildDirectory.dir("dokka")) | ||
| dokkaSourceSets.configureEach { | ||
| if (name == "commonMain" || name == "androidMain") { | ||
| includeNonPublic.set(true) | ||
| skipDeprecated.set(true) | ||
| reportUndocumented.set(true) | ||
| jdkVersion.set(8) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| target.extensions.configure(org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension::class.java) { | ||
| // Add your existing KMP configuration here | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,7 @@ plugins { | |
| alias(libs.plugins.kotlinMultiplatform) apply false | ||
| alias(libs.plugins.wire) apply false | ||
| alias(libs.plugins.ktorfit) apply false | ||
| alias(libs.plugins.dokka) apply false | ||
| } | ||
|
|
||
| object DynamicVersion { | ||
|
|
@@ -57,7 +58,6 @@ tasks.register("printModulePaths") { | |
| } | ||
| } | ||
| } | ||
|
|
||
| // Configuration for CMP module dependency graph | ||
| moduleGraphAssert { | ||
| configurations += setOf("commonMainImplementation", "commonMainApi") | ||
|
|
@@ -66,4 +66,22 @@ moduleGraphAssert { | |
| configurations += setOf("jsMainImplementation", "jsMainApi") | ||
| configurations += setOf("nativeMainImplementation", "nativeMainApi") | ||
| configurations += setOf("wasmJsMainImplementation", "wasmJsMainApi") | ||
| } | ||
| } | ||
|
|
||
| subprojects { | ||
|
||
| plugins.withId("org.jetbrains.dokka") { | ||
| tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach { | ||
| outputDirectory.set(layout.buildDirectory.dir("dokka")) | ||
| dokkaSourceSets { | ||
| configureEach { | ||
| if (name == "commonMain" || name == "androidMain" || name == "desktopMain" || name == "jsMain" || name == "nativeMain") { | ||
| includeNonPublic.set(true) | ||
| skipDeprecated.set(true) | ||
| reportUndocumented.set(true) | ||
| jdkVersion.set(8) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,8 @@ | |
| plugins { | ||
| alias(libs.plugins.mifospay.cmp.feature) | ||
| alias(libs.plugins.kotlin.parcelize) | ||
| alias(libs.plugins.dokka) | ||
|
||
| alias(libs.plugins.mifospay.feature.library) | ||
| } | ||
|
|
||
| android { | ||
|
|
@@ -27,4 +29,4 @@ kotlin { | |
| implementation(libs.kotlinx.serialization.json) | ||
| } | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.