I am trying to upload a new version of my library to Bintray, however I am getting errors.
One of the changes I made was to add a custom attribute to my Javadoc. For example:
/**
* The method does something.
*
* @param myParameter This is my parameter
* @see #anotherMethod(int)
* @attr ref R.styleable#MyLibrary_anAttribute
*/
The custom attribute tag I added was @attr ref
which would show related XML attributes when generating Javadoc HTML (like in Android Developer documentation). I added this as a custom tag in my IDE (Android Studio), but it causes an error when uploading to Bintray. Also, I am using the novoda bintray plugin - here is part of my build.gradle
.
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
...
publish {
...
}
So when I run the following command in terminal:
gradlew bintrayUpload -PbintrayUser=me -PbintrayKey=key -PdryRun=false
I get the following error:
:mylibrary:compileDebugJavaWithJavac UP-TO-DATE
:mylibrary:mavenAndroidJavadocs
C:\Users\...\ALibraryFile.java:216: error: unknown tag: attr
* @attr ref R.styleable#MyLibrary_anAttribute
...
13 errors
:mylibrary:mavenAndroidJavadocs FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mylibrary:mavenAndroidJavadocs'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): 'C:\Users\...\build\tmp\mavenAndroidJavadocs\javadoc.options'
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12.711 secs
Is there any way round this (e.g. disabling this javadoc check?)?
./gradlew javadoc
. See this answer. – Acroterion