Did anyone encounter the same issue? When using Dokka to document a data class
/**
* Data class for which we want documentation
*/
data class DokkaData(
/** A String value */
val aString: String,
/** An Integer value */
val anInt: Int,
/** Yes, a Boolean value. My favorite. */
val aBoolean: Boolean) {
/**
* Checks that all values are representation of `1`
*/
fun isOne() = aString == "1" && anInt == 1 && aBoolean
}
the documentation is correctly displayed in Android Studio
But then, when exporting library to mavenLocal using dokkaJavadoc:
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
id("org.jetbrains.dokka") version "1.6.10"
}
android {
compileSdk 31
defaultConfig {
minSdk 21
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.4.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
task dokkaJavadocJar(type: Jar, dependsOn: dokkaJavadoc) {
archiveClassifier.set("javadoc")
from dokkaJavadoc.outputDirectory
}
publishing {
publications {
release(MavenPublication) {
groupId = "com.dokkatests.testlib"
artifactId = "lib"
version = "2.1-dataDoc"
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
artifact(dokkaJavadocJar)
}
}
}
the generated library javadoc is correctly displayed for methods, but not for the data class level
Note: The html documentation is complete, the issue is only for the documentation displayed in Android Studio. I didn't find any other reference to this issue, which is strange because it looks like a blocker to me. Any clue?