https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
dokka
  • s

    Sebastian Sellmair [JB]

    07/30/2020, 4:52 PM
    Latest Builds • 1.4.10-dev-21 • 1.4.0-rc-21 Short Update • We are currently working on resolving types from native libraries • We are implementing more features of the javadoc format • We are working on largely simplifying the experience and implementation with/of our Gradle plugin • We are working on improving the rendering for unresolved types (will render class name instead of <ERROR CLASS> in the future
    👍 1
    🎉 11
    b
    m
    • 3
    • 6
  • p

    Paweł Marks

    08/04/2020, 12:07 PM
    The day has come! https://blog.jetbrains.com/kotlin/2020/08/dokka-preview-based-on-kotlin-1-4-0-rc/
    🎉 18
    s
    b
    +3
    • 6
    • 23
  • z

    Zach Klippenstein (he/him) [MOD]

    08/10/2020, 9:26 PM
    Haven’t been able to find anything by googling, is it possible to put a backquote in a backquoted string in kdoc? I have never seen any docs about escaping in kdoc backquoted strings.
    m
    • 2
    • 3
  • l

    Lukas K-G

    08/12/2020, 12:29 PM
    Hi guys & girls 👋 I am currently trying out dokka
    1.4.0-RC
    at my company. We had dokka
    0.10.0
    before and it worked, but with
    1.4.0-RC
    I get the following error in the
    Creating documentation models
    phase:
    Couldn't get delegate for class
    Does anyone have an idea what that could be or how to get any information what class causes this problem?
    s
    • 2
    • 18
  • a

    addamsson

    08/13/2020, 9:33 PM
    Hi there! I've read on twitter that now it is possible to document multimodule & multiplatform projects. I can't find examples however. Is there a good code example for a project that is both multiplatform & multimodule?
    b
    s
    • 3
    • 7
  • s

    Sebastian Sellmair [JB]

    08/17/2020, 11:05 AM
    Feedback welcome We have a new
    dev
    build available that we would be very happy to get feedback for 🎉 _Build_: 1.4.0-dev-35 _____ Gist of changes: 1. Gradle Plugin Our Gradle Plugin had some very hard to fix issues and we put a lot of effort into • Reducing complexity of its implementation • Fixing internal issues e.g. (bad UP-TO-DATE) behaviour,... • Fixing UX issues like "re-declaring source sets for mulitplatform projects", replacing paths with java.io.File, using Gradles Property/Provider APIs etc... We hope that "just applying the dokka plugin" is all that most build authors need. The plugin can be seen as companion to the Kotlin Gradle Plugin. See the pull-request for further details: Simplify Gradle Plugin Feel free to drop me dm's if you need any help migrating or experience any issues! 2. Merging visible source sets Issue: DokkaCollectorTask: Merge source set bubbles This was noticed while running the collector task on larger projects like the Spring framework. Source sets with the same displayName and platform will now be represented as one in the frontend. We hope that this unblocks some of you that rely on the collector task. 3. Updated compiler to 1.4.0 4. A lot of smaller bugfixes Further details are available in our milestones: • 1.4.0 • Stable __ Some comment on version numbers You already noticed, that we aligned our version number to the compiler version we bundle. (e.g. 1.4.0, 1.4.0-rc, ...). There were some minor hick-ups when we changed to this numbering schema, but I would like to clarify some things. Dokka 1.4.* is not a stable project. It is still considered alpha! For now, we agreed on using the following naming schema • `{comiler-version}-dev-{build-number}`: for preview builds •
    {compiler-verison}
    for releases and pre-releases (no dokka maturity included) •
    {compiler-version}-{patch number}
    for patch releases __ Some comment on kotlin-dev This will probably be the last build we push to the
    kotlin-dev
    repository. We will migrate dev builds to space packages in the near future.
    🙏 2
    🎉 5
    l
    z
    r
    • 4
    • 8
  • s

    Sebastian Sellmair [JB]

    08/18/2020, 4:14 PM
    📣 For everyone that wants to try out 1.4.0-dev-35, but has issues migrating • I pushed a pull request to the kotlin-examples repository, updating all examples to the new APIs (PULL REQUEST) Common Issues: • Make sure to use the new Provider/Property API:
    jdkVersion = 8
    ->
    jdkVersion.set(8)
    • Any path of type
    String
    is now represented as
    <http://java.io|java.io>.File
    • Any collection of files/directories is now represented as Gradles
    ConfigurableFileCollection
    • Make sure (especially in Android Projects) to configure Dokka tasks lazy:
    tasks.withType<DokkaTask>() { // config }
    ->
    tasks.withType<DokkaTask>().configureEach { }
    ,
    tasks.getByName
    ->
    tasks.named
    ,etc. Good read https://docs.gradle.org/current/userguide/task_configuration_avoidance.html • Note: MPP projects will have all source sets automatically configured. No need for
    register
    yourself! • Tip: Use
    ./gradlew --stacktrace
    to get better error messages of what is wrong. I noticed, that the short error message for Groovy scripts is not useful at all And as always: Feel free to drop me a DM at any time you encounter an issue ☺️ Have fun, folks. Enjoy Kotlin 1.4.0 ☺️ 🎊
    🔝 1
    🙏 6
    🎉 6
    s
    r
    • 3
    • 8
  • h

    Hadi Lashkari

    08/20/2020, 8:09 AM
    Hey everyone! I have the following config of dokka
    tasks.dokkaHtml {
      outputDirectory = "$buildDir/dokka"
      dokkaSourceSets {
        register("commonMain") {
          displayName = "common"
          platform = "common"
        }
        register("jvmMain") {
          displayName = "jvm"
          platform = "jvm"
        }
        register("androidMain") {
          noAndroidSdkLink = true
          displayName = "android"
          platform = "android"
        }
      }
    }
    but when I run
    ./gradlew dokkaJavadoc
    I got
    No source set with name 'main' found
    In the main directory is the
    AndroidManifest.xml
    without a source! So how can I unregister the
    main
    ?
    j
    s
    • 3
    • 25
  • e

    elect

    08/21/2020, 10:29 PM
    hey, is it possible to have the generated html dokka docs directly accessible on Github?
    z
    • 2
    • 6
  • j

    Javier

    08/23/2020, 6:02 PM
    To generate the javadoc in previous versions I was using this code:
    val dokkaJar by tasks.creating(Jar::class) {
        archiveClassifier.set("javadoc")
        from(tasks.dokka)
        dependsOn(tasks.dokka)
    }
    s
    • 2
    • 6
  • j

    jaguililla

    08/27/2020, 5:02 PM
    Yes, you have to set up Dokka to include *Test (I use *SampleTest) in its samples lookup
    👍 1
    e
    • 2
    • 3
  • s

    Sebastian Sellmair [JB]

    08/28/2020, 3:22 PM
    Feedback welcome ☺️ • 1.4.0-dev-62
    maven("<https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev>")
    🎉 6
    e
    m
    b
    • 4
    • 17
  • e

    elect

    08/28/2020, 3:52 PM
    I just learnt how to use
    @sample
    . I find cumbersome adding file by file in
    build.gradle.kts
    under
    samples: List
    . Wouldn't be possible for the plugin to group all the
    @sample
    from the sources and find the least necessary common group of files to be used for doc inlining?
    s
    • 2
    • 2
  • o

    oshai

    08/28/2020, 9:45 PM
    Hi, Is it possible to use older dokka versions (like
    0.10.0
    ) with Kotlin 1.4.0? After upgrading Kotlin version only (without upgrading dokka) I see some errors for KMP project.
    s
    • 2
    • 3
  • e

    elect

    08/29/2020, 12:12 PM
    I have been experiencing with
    dokkaJavadocJar
    a
    java.lang.OutOfMemoryError: Metaspace
    never ever saw this before, is it normal? It seems
    org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m
    in
    gradle.properties
    solves the issue
    s
    • 2
    • 2
  • j

    Jorrit

    08/29/2020, 5:45 PM
    First time Dokka user. Using 1.4.0-rc, dokkaHtml task. (1) My understanding was inline markdown was supported, but using bold doesn't seem to do anything in my function docs. [linking] does work though. (2) By default it seems Dokka documents only public members, but I also want to document protected members. It seems there's only includeNonPublic which in turn also includes private and internal, which is exactly what I don't want. Any options here I missed? (3) Continuing on point 2, I've tried using @suppress on private members, but everything still happily shows up in the docs anyway?
    s
    k
    • 3
    • 6
  • m

    mikehearn

    09/01/2020, 2:41 PM
    It's unfortunate that build.gradle.kts files are almost but not quite the same as the Groovy equivalents, meaning it's often not obvious how to translate
    r
    • 2
    • 2
  • n

    Nick Johnson

    09/01/2020, 10:39 PM
    Anyone else getting a StackOverflowError with version 1.4.0-rc? Message is
    s
    p
    • 3
    • 2
  • p

    pniederw

    09/02/2020, 5:19 PM
    Has anyone managed to apply dokka-gradle-plugin in a precompiled script plugin (buildSrc/src/main/kotlin) when using Gradle Kotlin DSL? I'm getting a version conflict between Kotlin 1.3.72 (required by Gradle) and Kotlin 1.4 (required by dokka-gradle-plugin).
    e
    s
    • 3
    • 8
  • r

    Rachel

    09/04/2020, 9:16 AM
    Hi 👋 I'd like to test Dokka again 🙌 please, would you recommend to test 1.4.0 Alpha -Gradle plugin overhaul or the latest DEV version? Thanks in advance!!
    p
    • 2
    • 2
  • o

    Or Cohen

    09/06/2020, 9:46 AM
    Hey guys, I’m trying to set up Dokka in a mono-repo that contains multiple Kotlin (v1.3.72) libraries and uses Gradle (v6.4.1). I have a top-level 
    build.gradle.kts
     script in which I apply the Dokka plugin to all libraries -
    configure(subprojects.filter { it.parent?.name == "libs" }) {
        apply {
            plugin("org.jetbrains.dokka")
        }
    }
    I’ve also added the following block that is mentioned in the docs for multi module support -
    tasks.dokkaHtmlMultiModule.configure {
        outputDirectory.set(buildDir.resolve("dokkaCustomMultiModuleOutput"))
        documentationFileName.set("README.md")
    }
    I also have a 
    README.md
     file under each of my libraries under 
    libs
     folder, and I added the following to the 
    build.gradle.kts
     script of each of the libraries which I want to include in the generated docs -
    tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
        dokkaSourceSets.configureEach {
            includes.from("README.md")
        }
    }
    After running 
    dokkaHtmlMultiModule
    , it seems like I get a folder for each library under 
    build/dokkaCustomMultiModuleOutput/libs
     (with all generated docs inside), but I can’t seem to find any top-level 
    index.html
     file. In addition, none of the libraries are listed in the top level 
    -modules.html
     file. Am I missing something, or doing something wrong? Thanks in advance 🙏
    j
    s
    k
    • 4
    • 37
  • d

    dfriehs

    09/09/2020, 6:08 PM
    Am I doing something wrong when private members show up in derived classes or is this a (known?) bug? I turned off
    includeNonPublic
    , which works for the base class, but prints the property for any and all derived classes:
    k
    • 2
    • 3
  • r

    Robert Jaros

    09/10/2020, 11:52 AM
    When upgrading dokka from 1.4.0-rc to 1.4.0 in Kotlin/JS project I have this error:
    Execution failed for task ':dokkaHtml'.
    > There was a failure while populating the build operation queue: NPM project resolved without org.jetbrains.kotlin.gradle.targets.js.npm.KotlinNpmResolutionManager@5fdc639
    Anyone else has this issue?
    • 1
    • 1
  • a

    AJ Alt

    09/11/2020, 12:49 AM
    With dokka 1.4.0 and no submodules in the project, is there any way to make the
    dokkaHtml
    task create index.html at the top level rather than nested in a project folder? It's not clear how to publish the output as a static site (e.g. github pages) without having the root 404.
    m
    • 2
    • 4
  • s

    shelbycohen

    09/14/2020, 10:23 PM
    Hi, is anyone available to help me with the above? ^ 🙂
    k
    a
    • 3
    • 21
  • f

    Felix

    09/15/2020, 1:03 PM
    Is there a way to customise the generated HTML when using dokka, such as defining the copyright footer message?
    m
    • 2
    • 1
  • t

    travisspencer

    09/15/2020, 6:30 PM
    Is it possible to set the overview page of the javadocs generated from KDoc comments?
    m
    • 2
    • 1
  • f

    Felix

    09/16/2020, 11:33 AM
    I've noticed that the generated
    dokka/html
    doesn't have any
    index.html
    in the root folder (only a
    navigation.html
    without any include stylesheet). The first
    index.html
    appears only inside the module. Is this supposed to be this way?
    b
    • 2
    • 2
  • m

    Michael

    09/19/2020, 6:27 PM
    dokka just runs out of metaspace when running the gradle tasks or randomly fails with no error
    b
    s
    • 3
    • 5
  • j

    Julien Verfaillie

    09/21/2020, 1:27 PM
    Hello! I setup my gradle file with Dokka 1.4.0 , but in the list of available tasks I only see dokka, not dokkaHtml, any idea why?
    s
    • 2
    • 14
Powered by Linen
Title
j

Julien Verfaillie

09/21/2020, 1:27 PM
Hello! I setup my gradle file with Dokka 1.4.0 , but in the list of available tasks I only see dokka, not dokkaHtml, any idea why?
s

Sebastian Sellmair [JB]

09/21/2020, 1:52 PM
Can you share your build files with us here? 🙄
There should not be a "dokka" task in 1.4.0+!
j

Julien Verfaillie

09/21/2020, 1:58 PM
import com.github.spotbugs.SpotBugsTask

project.extensions.extraProperties.set('SpotBugsTask', SpotBugsTask)

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'org.jetbrains.dokka'
apply from: '../ci/staticAnalysis/spotbugs/XxxxxxSpotBugs.gradle'


android {

    compileSdkVersion 29
    buildToolsVersion '29.0.3'

    afterEvaluate {
        def originalFilePath = "$buildDir/outputs/aar/XxxxxxZzzz-release.aar"
        def newFilePath = originalFilePath.replace(".aar", "_v${defaultConfig.versionName}.aar")
        def debugFile = file(originalFilePath)

        tasks.named("assembleRelease").configure {
            doLast {
                debugFile.renameTo(newFilePath)
            }
        }
    }

    defaultConfig {
        minSdkVersion 23
        targetSdkVersion 29
        versionCode 1
        versionName "1.9.0"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
        consumerProguardFiles '<http://proguard-rules.pro|proguard-rules.pro>'

        dimension "default"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), '<http://proguard-rules.pro|proguard-rules.pro>'
        }
    }

    flavorDimensions "default"

    productFlavors {
        def useSecureFlagProd = rootProject.hasProperty("useSecureFlagProd") ? rootProject.useSecureFlagProd : true
        def useSecureFlagDev = rootProject.hasProperty("useSecureFlagDev") ? rootProject.useSecureFlagDev : false

        prod {
            buildConfigField 'boolean', 'USE_SECURE_FLAG', "$useSecureFlagProd"
        }

        dev {
            buildConfigField 'boolean', 'USE_SECURE_FLAG', "$useSecureFlagDev"
        }

    }

    repositories {
        flatDir {
            dirs 'libs'
        }
    }

    compileOptions {
        // Flag to enable support for the new language APIs
        // Source <https://developer.android.com/studio/write/java8-support>
        coreLibraryDesugaringEnabled true

        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8
    }

    lintOptions {
        abortOnError false
    }

    testOptions {
        unitTests.returnDefaultValues = true
    }
}

dependencies {
    // Specify Versions here to avoid coupling this module with the app.
    def koinVersion = '2.1.6'

    api project(path: ':XxxxxxYyyyy')

    implementation fileTree(include: ['*.jar'], dir: 'libs')

    // Source: <https://developer.android.com/studio/write/java8-support>
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'

    // Android x
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'androidx.legacy:legacy-support-v13:1.0.0'
    implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.core:core:1.3.1'
    implementation 'androidx.legacy:legacy-preference-v14:1.0.0'

    // Google Play services
    implementation "com.google.android.gms:play-services-maps:17.0.0"
    implementation "com.google.android.gms:play-services-location:17.0.0"

    // When you update play-services-fitness to 18.0.0 or higher, observe the breaking changes
    // here: <https://developers.google.com/android/guides/releases#august_22_2019>
    implementation "com.google.android.gms:play-services-fitness:17.0.0"
    implementation "com.google.android.gms:play-services-auth:17.0.0"

    // Phone number parser
    implementation 'com.googlecode.libphonenumber:libphonenumber:8.11.3'

    // Barcode scanner
    implementation 'com.journeyapps:zxing-android-embedded:3.6.0'

    // Misc libs
    implementation "com.google.code.gson:gson:2.8.6"
    implementation 'com.squareup.okhttp3:okhttp:4.8.0'
    implementation "com.afollestad.material-dialogs:core:0.9.0.2"

    // Material components
    api "com.google.android.material:material:1.2.0"

    // Make this available to Zzzz and PAT.
    // (latest Picasso is 2.5.2, not 2.7xxx, see picasso's website)
    api "com.squareup.picasso:picasso:2.5.2"

    // Kotlin
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
    testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"

    // Kotlin Coroutines
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesVersion"
    testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutinesVersion"

    // Koin for Android
    implementation "org.koin:koin-android:$koinVersion"
    implementation "org.koin:koin-android-scope:$koinVersion"
    implementation "org.koin:koin-androidx-viewmodel:$koinVersion"
    testImplementation "org.koin:koin-test:$koinVersion"

    // Navigation Component
    implementation "androidx.navigation:navigation-fragment-ktx:2.3.0"
    implementation "androidx.navigation:navigation-ui-ktx:2.3.0"

    // Mockito framework
    testImplementation "org.mockito:mockito-core:3.4.6"
    testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"

    // JUnit 4 framework
    testImplementation 'junit:junit:4.13'

    // OkHttp mock server
    testImplementation 'com.squareup.okhttp3:mockwebserver:4.3.1'
}

buildscript {
    ext {
        dokkaVersion = "1.4.0"
        kotlinVersion = "1.3.72"
        kotlinCoroutinesVersion = '1.3.6'
    }

    repositories {
        mavenCentral()
        google()
        jcenter()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
        classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokkaVersion}"
    }
}

//publishing pom configurations
def Zzzz_POM_GROUP = "com.Xxxxxx.Zzzz"
def Zzzz_POM_ARTIFACT_ID = "ZzzzSDK"

afterEvaluate { project ->
    uploadArchives {
        repositories {
            mavenDeployer {
                pom.groupId = Zzzz_POM_GROUP
                pom.artifactId = Zzzz_POM_ARTIFACT_ID
                pom.version = android.defaultConfig.versionName

                def deployPath = file('./')
                repository(url: "file://${deployPath.absolutePath}/../sdkOutput/")

                pom.whenConfigured { pom ->
                    pom.dependencies.forEach { dep ->
                        if (dep.getVersion() == "unspecified") {
                            dep.setVersion(android.defaultConfig.versionName)
                        }
                    }
                }
            }
        }
    }
}

// publishing task is not modifying the "unspecified" dependencies as uploadArchives does
publishing {
    publications {
        maven(MavenPublication) {
            groupId Zzzz_POM_GROUP
            artifactId Zzzz_POM_ARTIFACT_ID
            version android.defaultConfig.versionName
            artifact "$buildDir/../../sdkOutput/com/Xxxxxx/Zzzz/ZzzzSDK/${version}/ZzzzSDK-${version}.aar"

            //generate pom nodes for dependencies
            pom.withXml {
                def dependenciesNode = asNode().appendNode('dependencies')
                configurations.compile.allDependencies.each { dependency ->
                    def dependencyNode = dependenciesNode.appendNode('dependency')
                    dependencyNode.appendNode('groupId', dependency.group)
                    dependencyNode.appendNode('artifactId', dependency.name)
                    dependencyNode.appendNode('version', dependency.version)
                }
            }
        }
    }

    //publish to filesystem repo
    repositories{
        maven {
            url "$buildDir/repo"
        }
    }
}
message has been deleted
s

Sebastian Sellmair [JB]

09/21/2020, 2:43 PM
Would you mind sending me the output of
.gradlew tasks
or
./gradlew :{app}:tasks
j

Julien Verfaillie

09/21/2020, 2:50 PM
Of course
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build. 
This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal.
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.
If the parent project does not need the plugin, add 'apply false' to the plugin line.
See: <https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl>
The Kotlin plugin was loaded in the following projects: ':ZzzzzZzzz', ':ZzzzzYyyyy'

> Task :tasks

------------------------------------------------------------
Tasks runnable from root project
------------------------------------------------------------

Android tasks
-------------
androidDependencies - Displays the Android dependencies of the project.
signingReport - Displays the signing info for the base and test modules
sourceSets - Prints out all the source sets defined in this project.

Build tasks
-----------
assemble - Assemble main outputs for all the variants.
assembleAndroidTest - Assembles all the Test applications.
assembleDebug - Assembles main outputs for all Debug variants.
assembleDev - Assembles main outputs for all Dev variants.
assembleProd - Assembles main outputs for all Prod variants.
assembleRelease - Assembles main outputs for all Release variants.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
classes - Assembles main classes.
clean - Deletes the build directory.
cleanBuildCache - Deletes the build cache directory.
compileDebugAndroidTestSources
compileDebugSources
compileDebugUnitTestSources
compileDevDebugAndroidTestSources
compileDevDebugSources
compileDevDebugUnitTestSources
compileDevReleaseSources
compileDevReleaseUnitTestSources
compileProdDebugAndroidTestSources
compileProdDebugSources
compileProdDebugUnitTestSources
compileProdReleaseSources
compileProdReleaseUnitTestSources
compileReleaseSources
compileReleaseUnitTestSources
extractDebugAnnotations - Extracts Android annotations for the debug variant into the archive file
extractDevDebugAnnotations - Extracts Android annotations for the devDebug variant into the archive file
extractDevReleaseAnnotations - Extracts Android annotations for the devRelease variant into the archive file
extractProdDebugAnnotations - Extracts Android annotations for the prodDebug variant into the archive file
extractProdReleaseAnnotations - Extracts Android annotations for the prodRelease variant into the archive file
extractReleaseAnnotations - Extracts Android annotations for the release variant into the archive file

Build Setup tasks
-----------------
init - Initializes a new Gradle build.
wrapper - Generates Gradle wrapper files.

Cleanup tasks
-------------
lintFix - Runs lint on all variants and applies any safe suggestions to the source code.

Documentation tasks
-------------------
dokka - Generates dokka documentation for Kotlin

Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in root project 'ZzzzLib'.
components - Displays the components produced by root project 'ZzzzLib'. [incubating]
dependencies - Displays all dependencies declared in root project 'ZzzzLib'.
dependencyInsight - Displays the insight into a specific dependency in root project 'ZzzzLib'.
dependentComponents - Displays the dependent components of components in root project 'ZzzzLib'. [incubating]
help - Displays a help message.
model - Displays the configuration model of root project 'ZzzzLib'. [incubating]
outgoingVariants - Displays the outgoing variants of root project 'ZzzzLib'.
projects - Displays the sub-projects of root project 'ZzzzLib'.
properties - Displays the properties of root project 'ZzzzLib'.
tasks - Displays the tasks runnable from root project 'ZzzzLib' (some of the displayed tasks may belong to subprojects).

Install tasks
-------------
installDebugAndroidTest - Installs the android (on device) tests for the Debug build.
installDevDebugAndroidTest - Installs the android (on device) tests for the DevDebug build.
installProdDebugAndroidTest - Installs the android (on device) tests for the ProdDebug build.
uninstallAll - Uninstall all applications.
uninstallDebugAndroidTest - Uninstalls the android (on device) tests for the Debug build.
uninstallDevDebugAndroidTest - Uninstalls the android (on device) tests for the DevDebug build.
uninstallProdDebugAndroidTest - Uninstalls the android (on device) tests for the ProdDebug build.

Publishing tasks
----------------
generateMetadataFileForMavenPublication - Generates the Gradle metadata file for publication 'maven'.
generatePomFileForMavenPublication - Generates the Maven POM file for publication 'maven'.
publish - Publishes all publications produced by this project.
publishAllPublicationsToMavenRepository - Publishes all Maven publications produced by this project to the maven repository.
publishMavenPublicationToMavenLocal - Publishes Maven publication 'maven' to the local Maven repository.
publishMavenPublicationToMavenRepository - Publishes Maven publication 'maven' to Maven repository 'maven'.
publishToMavenLocal - Publishes all Maven publications produced by this project to the local Maven cache.

Upload tasks
------------
uploadArchives - Uploads all artifacts belonging to configuration ':ZzzzzZzzz:archives'

Verification tasks
------------------
check - Runs all checks.
connectedAndroidTest - Installs and runs instrumentation tests for all flavors on connected devices.
connectedCheck - Runs all device checks on currently connected devices.
connectedDebugAndroidTest - Installs and runs the tests for debug on connected devices.
connectedDevDebugAndroidTest - Installs and runs the tests for devDebug on connected devices.
connectedProdDebugAndroidTest - Installs and runs the tests for prodDebug on connected devices.
deviceAndroidTest - Installs and runs instrumentation tests using all Device Providers.
deviceCheck - Runs all device checks using Device Providers and Test Servers.
lint - Runs lint on all variants.
lintDebug - Runs lint on the Debug build.
lintDevDebug - Runs lint on the DevDebug build.
lintDevRelease - Runs lint on the DevRelease build.
lintProdDebug - Runs lint on the ProdDebug build.
lintProdRelease - Runs lint on the ProdRelease build.
lintRelease - Runs lint on the Release build.
spotbugsMain - Run SpotBugs analysis for main classes
test - Run unit tests for all variants.
testDebugUnitTest - Run unit tests for the debug build.
testDevDebugUnitTest - Run unit tests for the devDebug build.
testDevReleaseUnitTest - Run unit tests for the devRelease build.
testProdDebugUnitTest - Run unit tests for the prodDebug build.
testProdReleaseUnitTest - Run unit tests for the prodRelease build.
testReleaseUnitTest - Run unit tests for the release build.

To see all tasks and more detail, run gradlew tasks --all

To see more detail about a task, run gradlew help --task <task>

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings>

BUILD SUCCESSFUL in 690ms
1 actionable task: 1 executed
s

Sebastian Sellmair [JB]

09/22/2020, 4:28 PM
You seem to have an old version of dokka in your classpath (for some reason) 🤔
is your project public?
j

Julien Verfaillie

09/22/2020, 4:36 PM
@Sebastian Sellmair [JB] you were right, there was a subproject that used a previosu dokka version, and I missed that
Documentation tasks
-------------------
dokkaGfm - Generates documentation in GitHub flavored markdown format
dokkaHtml - Generates documentation in 'html' format
dokkaJavadoc - Generates documentation in 'javadoc' format
dokkaJekyll - Generates documentation in Jekyll flavored markdown format
all good now!
s

Sebastian Sellmair [JB]

09/22/2020, 4:36 PM
👍 Glad to hear!
j

Julien Verfaillie

09/22/2020, 4:36 PM
thanks!
View count: 14