2

The build is successful, but fails when running gradlew dokkaHtml in terminal. Have tried to search for the error message, but couldn't find anything.

build.gradle file (modul)

plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-android'
id("org.jetbrains.dokka") version "1.6.20"
}

android {
compileSdk 31

defaultConfig {
    applicationId "com.example.soilroverapp"
    minSdk 29
    targetSdk 29
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

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'
}
buildFeatures {
    viewBinding true
    dataBinding true
}
}

dependencies {
a lot of dependencies...
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.20")
}

build.gradle file (project)

plugins {
    id 'com.android.application' version '7.1.1' apply false
    id 'com.android.library' version '7.1.1' apply false
    id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

This is the Terminal output after running gradlew dokkaHtml

Task :app:dokkaHtml FAILED
:app:dokkaHtml (Thread[Execution worker for ':',5,main]) completed. Took 0.01 secs.

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:dokkaHtml'.
Error while evaluating property 'unsuppressedSourceSets' of task ':app:dokkaHtml'
Could not create domain object 'androidTestDebug' (GradleDokkaSourceSetBuilder)
raily2595
  • 21
  • 1
  • I guess you are facing the same issue as I am, Gradle plugin has a Dokka dependency with version 1.4, this is colliding with Dokka 1.6.+ or 1.7.+. – user3471194 Sep 13 '22 at 19:47

0 Answers0