package Ġcom . v ann ik tech . maven . publish . tasks Ċ Ċ import Ġcom . android . build . gradle . Library Extension Ċ import Ġorg . gradle . api . tasks . javadoc . Javadoc Ċ import Ġorg . gradle . external . javadoc . Standard Javadoc Doc let Options Ċ import Ġjava . io . File Ċ Ċ open Ġclass ĠAndroid Javadoc s Ġ: ĠJ avadoc () Ġ{ ĊĊĠ Ġinit Ġ{ ĊĠĠĠ Ġval Ġandroid Extension Ġ= Ġproject . extensions . getBy Type ( Library Extension :: class . java ) ĊĊĠĠĠ Ġ// ĠAppend Ġalso Ġthe Ġclasspath Ġand Ġfiles Ġfor Ġrelease Ġlibrary Ġvariants . ĠThis Ġfixes Ġthe Ġjavadoc Ġwarnings . ĊĠĠĠ Ġ// ĠGot Ġit Ġfrom Ġhere Ġ- Ġhttps :// github . com / nov oda / bin tray - release / pull / 3 9 / files ĊĠĠĠ Ġval Ġrelease Variant Compile Provider Ġ= Ġandroid Extension . library Variants . toList (). last (). java Compile Provider ĊĠĠĠ Ġdepends On ( android Extension . library Variants . toList (). last (). java Compile Provider ) ĊĠĠĠ Ġif Ġ(! project . plugins . has Plugin (" org . jetbrains . kotlin . android ")) Ġ{ ĊĠĠĠĠĠ Ġset Source ( android Extension . source Sets . get ByName (" main "). java . src Dirs ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġis Fail OnError Ġ= Ġtrue ĊĠĠĠ Ġclasspath Ġ+= Ġproject . files ( android Extension . get Boot Classpath (). join ToString ( File . path Separator )) ĊĠĠĠ Ġ// ĠSafe Ġto Ġcall Ġget () Ġhere Ġbecause Ġwe 've d Ġmarked Ġthis Ġas Ġdependent Ġon Ġthe ĠTask Provider ĊĠĠĠ Ġclasspath Ġ+= Ġrelease Variant Compile Provider . get (). classpath ĊĠĠĠ Ġclasspath Ġ+= Ġrelease Variant Compile Provider . get (). outputs . files ĊĊĠĠĠ Ġ// ĠWe Ġdon 't Ġneed Ġjavadoc Ġfor Ġinternals . ĊĠĠĠ Ġexclude (" **/ internal /* ") ĊĊĠĠĠ Ġ// ĠAppend ĠJava Ġ 8 Ġand ĠAndroid Ġreferences ĊĠĠĠ Ġval Ġoptions Ġ= Ġoptions Ġas ĠStandard Javadoc Doc let Options ĊĠĠĠ Ġoptions . links (" https :// developer . android . com / reference ") ĊĠĠĠ Ġoptions . links (" https :// docs . oracle . com / javase / 8 / docs / api /") ĊĠ Ġ} Ċ } Ċ