Giter Club home page Giter Club logo

Comments (19)

asarazan avatar asarazan commented on July 22, 2024 63

I'm not an expert in the gradle api, but I fixed this in my personal .gradle files like this:

task javadoc(type: Javadoc) {
    excludes = ['**/*.kt'] // < ---- Exclude all kotlin files from javadoc file.
    // ...
}

from bintray-release.

ebnbin avatar ebnbin commented on July 22, 2024 61

I don't think this is the best way but it works for me. Add

tasks.withType(Javadoc).all {
    enabled = false
}

to your build.gradle.

Hope it helps.

from bintray-release.

kollway-app avatar kollway-app commented on July 22, 2024 21

you can try add the followed code to ignore checking javadoc's error(add these code into build.gradle file):

allprojects {
    tasks.withType(Javadoc) {
        options.addStringOption('Xdoclint:none', '-quiet')
        options.addStringOption('encoding', 'UTF-8')
    }
}

hope it helps you.

from bintray-release.

busylee999 avatar busylee999 commented on July 22, 2024 4

... -x mavenAndroidJavadocs ... helps me
you can read more about skipping tasks here http://www.practicalgradle.org/blog/2010/10/skipping-tasks/

from bintray-release.

busylee999 avatar busylee999 commented on July 22, 2024 2

It did not help, same error. Any ideas?

from bintray-release.

BennyWang avatar BennyWang commented on July 22, 2024 2

I face the same problem, How can I skip the javadoc task for kotlin sources

from bintray-release.

xrigau avatar xrigau commented on July 22, 2024 2

This is a problem in the Javadoc generation itself and not in this plugin, many suggestions in this thread work, for me adding this to the library build.gradle file worked well

tasks.withType(Javadoc) {
    options.addBooleanOption('Xdoclint:none', true)
}

from: http://stackoverflow.com/questions/34874175/disable-all-javadoc-in-gradle

Thanks all for your input.

from bintray-release.

BennyWang avatar BennyWang commented on July 22, 2024 1

thank you very much

from bintray-release.

BoxResin avatar BoxResin commented on July 22, 2024 1

@ebnbin It worked for me!

from bintray-release.

adam-hurwitz avatar adam-hurwitz commented on July 22, 2024 1

@ebnbin your solution worked! Thank you!!!

@BennyWang, @asarazan, @xrigau I tried inserting your code in my project level build.gradle, but unfortunately having the same issue.

@busylee999 Unfortunately your link from December 25, 2015 above no longer works. http://www.practicalgradle.org/blog/2010/10/skipping-tasks/.

from bintray-release.

erikhuizinga avatar erikhuizinga commented on July 22, 2024 1

It seems this issue has become a place to discuss problems with Kotlin and androidJavadocs... 😹

@hendraanggrian Yes, dokka can fix the problem if you disable androidJavadocs and let dokka create docs for all languages in you project (e.g. Java and Kotlin). It can also create Javadoc, if you want you documentation to look just like if you just have Java.

However, in my particular project I have problems with the generation of Javadocs, but nothing breaking; it just takes a long time to generate the docs compared to androidJavadocs: 3 minutes vs. 10 seconds.

So, can it replace androidJavadocs: yes. Does it replace it with flair and grace: no.

from bintray-release.

busylee999 avatar busylee999 commented on July 22, 2024

Have you tried to exclude explicit tasks?

from bintray-release.

briansalvattore avatar briansalvattore commented on July 22, 2024

@ebnbin worked!! Ty

from bintray-release.

hanggrian avatar hanggrian commented on July 22, 2024

I'm just wondering here, is dokka in any way supposed to fix this issue?

from bintray-release.

rifqimfahmi avatar rifqimfahmi commented on July 22, 2024

After doing @ebnbin solution, i clean & rebuild my project and it worked. Thank you!!

from bintray-release.

nirukk52 avatar nirukk52 commented on July 22, 2024

@asarazan
Its giving me this Cannot add task ':<...>:javadoc' as a task with that name already exists.

from bintray-release.

StefMa avatar StefMa commented on July 22, 2024

The thing is that dokka generated javadoc/kdoc can't be displayed in IntelliJ somehow.
I don't know why but the issue is described here.
Meaning if you don't publish your sources and generate the javadoc via dokka, the consumer of your lib will not be see the javadoc in IntelliJ.

from bintray-release.

kronos317 avatar kronos317 commented on July 22, 2024

I have tried all solutions what explained above comments.
But I am getting error like below:

...
> Task :library-kt-beta:javadoc FAILED
javadoc: error - Illegal package name: "....\xxxManager.kt"
javadoc: error - Illegal package name: "....\xxxActivity.kt"
javadoc: error - Illegal package name: "....\xxxFragment.kt"
javadoc: error - Illegal package name: "....\xxxObject.kt"
...
7 errors


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':library-kt-beta:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '....\library-kt-beta\build\tmp\javadoc\javadoc.options'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
37 actionable tasks: 33 executed, 4 up-to-date

from bintray-release.

JhoanesFreitas avatar JhoanesFreitas commented on July 22, 2024

@ebnbin worked! Thanks!

from bintray-release.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.