Describe the bug
When trying to :publish an Android library with a project() dependency on another java-library module, Dokka 0.10.0+ results in an error due to not being able to resolve the dependency jar file that is not built yet.
Expected behavior
I would expect that running the publication task on a module would trigger the appropriate dependent build tasks, and then proceed in packaging the aforementioned module's artifacts for publication.
To Reproduce
Download the small project attached project.zip
and execute the following task: android-lib:publishToMavenLocal.
This results in the following error:
* What went wrong:
Could not determine the dependencies of task ':android-lib:dokka'.
> Could not resolve all files for configuration ':android-lib:releaseCompileClasspath'.
> Failed to transform some-lib.jar (project :some-lib) to match attributes {artifactType=android-classes, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.version=7, org.gradle.libraryelements=jar, org.gradle.usage=java-api, org.jetbrains.kotlin.localToProject=public, org.jetbrains.kotlin.platform.type=jvm}.
> Execution failed for JetifyTransform: [...]/some-lib/build/libs/some-lib.jar.
> Failed to transform '[...]/some-lib/build/libs/some-lib.jar' using Jetifier. Reason: [...]/some-lib/build/libs/some-lib.jar (No such file or directory). (Run with --stacktrace for more details.)
Installation
Additional context
This was previously working when using v0.9.18
In the example project, applying the following changes will cause the publication to succeed:
===================================================================
--- android-lib/build.gradle
+++ android-lib/build.gradle
@@ -4,7 +4,7 @@
apply plugin: 'maven-publish'
apply from: "$rootDir/gradle/scripts/android.gradle"
-apply plugin: "org.jetbrains.dokka"
+apply plugin: "org.jetbrains.dokka-android"
dokka {
outputFormat = "javadoc"
===================================================================
--- build.gradle
+++ build.gradle
@@ -11,7 +11,7 @@
}
plugins {
- id "org.jetbrains.dokka" version "0.10.1" apply false // broken
+ id "org.jetbrains.dokka-android" version "0.9.18" apply false
}
allprojects {
Thanks for reporting!
You can run ./gradlew build explicitly before publishToMavenLocal and it will fix this problem, but we should fix it in our plugin
@kamildoleglo Is this still relevant for 0.11.0?
Most helpful comment
@kamildoleglo Is this still relevant for 0.11.0?