Kotlin android library mavenAndroidJavadocs task fail #71

Closed
busylee999 opened this Issue Dec 11, 2015 · 14 comments

Comments

Projects
None yet
@busylee999

I try to publish my android library on Kotlin using bintray-release plugin and feared followed error:

javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/info/InfoEntry.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/info/ObjectInfo.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/info/preferences/BooleanPreferenceInfo.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/info/preferences/FloatPreferenceInfo.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/info/preferences/IntPreferenceInfo.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/info/preferences/LongPreferenceInfo.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/info/preferences/PreferenceInfo.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/info/preferences/StringPreferenceInfo.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/mutable/BooleanMutable.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/mutable/MutableEntry.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/mutable/SetStringMutableEntry.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/ui/DevPanelActivity.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/ui/InfoListAdapter.kt" javadoc: error - Illegal package name: "/Users/busylee/work/DevPanel/devpanellib/src/main/kotlin/com/busylee/devpanel/ui/PanelLinearListView.kt" 14 errors :devpanellib:mavenAndroidJavadocs FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':devpanellib:mavenAndroidJavadocs'.

    Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/Users/busylee/work/DevPanel/devpanellib/build/tmp/mavenAndroidJavadocs/javadoc.options'

@kollway-app

This comment has been minimized.

Show comment
Hide comment
@kollway-app

kollway-app Dec 14, 2015

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.

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.

@busylee999

This comment has been minimized.

Show comment
Hide comment
@busylee999

busylee999 Dec 15, 2015

It did not help, same error. Any ideas?

It did not help, same error. Any ideas?

@BennyWang

This comment has been minimized.

Show comment
Hide comment
@BennyWang

BennyWang Dec 25, 2015

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

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

@busylee999

This comment has been minimized.

Show comment
Hide comment
@busylee999

busylee999 Dec 25, 2015

Have you tried to exclude explicit tasks?

Have you tried to exclude explicit tasks?

@busylee999

This comment has been minimized.

Show comment
Hide comment
@busylee999

busylee999 Dec 25, 2015

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

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

@BennyWang

This comment has been minimized.

Show comment
Hide comment
@BennyWang

BennyWang Dec 26, 2015

thank you very much

thank you very much

FarbodSalamat-Zadeh added a commit to FarbodSalamat-Zadeh/UsefulViews that referenced this issue Mar 27, 2016

FarbodSalamat-Zadeh added a commit to FarbodSalamat-Zadeh/UsefulViews that referenced this issue Mar 27, 2016

@asarazan

This comment has been minimized.

Show comment
Hide comment
@asarazan

asarazan Jun 7, 2016

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.
    // ...
}

asarazan commented Jun 7, 2016

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.
    // ...
}
@xrigau

This comment has been minimized.

Show comment
Hide comment
@xrigau

xrigau Sep 9, 2016

Member

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.

Member

xrigau commented Sep 9, 2016

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.

@xrigau xrigau closed this Sep 9, 2016

@ebnbin

This comment has been minimized.

Show comment
Hide comment
@ebnbin

ebnbin May 31, 2017

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.

ebnbin commented May 31, 2017

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.

@BoxResin

This comment has been minimized.

Show comment
Hide comment
@BoxResin

BoxResin Jul 8, 2017

@ebnbin It worked for me!

BoxResin commented Jul 8, 2017

@ebnbin It worked for me!

SmasSive pushed a commit to SchibstedSpain/Barista that referenced this issue Aug 28, 2017

SmasSive pushed a commit to SchibstedSpain/Barista that referenced this issue Aug 28, 2017

SmasSive added a commit to SchibstedSpain/Barista that referenced this issue Aug 30, 2017

Check drawable (#123)
* Add Kotlin to Barista! 🎉

* Add checkDrawable assertion

* Add sample tests

* Add README new assertion

* Add instrumentation test to check BitmapComparator

* Upgrade Barista version

* Revert version upgrade

* Simplify tests

* FIX findbugs violation. The generated object bytecode by Kotlin is not findbugs friendly :(

* Exclude Kotlin classes from javadoc due to generation error. More info at: novoda/bintray-release#71

* Exclude lint from javadoc. More info at: novoda/bintray-release#71

* Move javadoc exclusion from quality to library gradle

* The last one?

* Match previous comments style

* Improve reader (and Roc) productivity by adding more info to comments

* Improve method readability by specifying the body instead of returning a long block of code

* Move ic_barista from mipmap to drawable
@AdamSHurwitz

This comment has been minimized.

Show comment
Hide comment
@AdamSHurwitz

AdamSHurwitz Sep 17, 2017

@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/.

AdamSHurwitz commented Sep 17, 2017

@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/.

@briansalvattore

This comment has been minimized.

Show comment
Hide comment

@ebnbin worked!! Ty

@hendraanggrian

This comment has been minimized.

Show comment
Hide comment
@hendraanggrian

hendraanggrian Dec 26, 2017

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

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

@zcabez

This comment has been minimized.

Show comment
Hide comment
@zcabez

zcabez Feb 6, 2018

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

zcabez commented Feb 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment