//------------------------ JAVADOC Processing ------------------------------------------------------
configurations {
BADoclet
}
dependencies {
def BALibs = "C:/Program Files (x86)/Anywhere Software/Basic4android/Libraries/"
BADoclet (fileTree(dir: "$BALibs",includes: ["**/Core.jar", "**/B4AShared.jar"]))
BADoclet (fileTree(dir: "../build/libs/RangeSeekBar.jar"))
}
task javadoc(type: Javadoc, dependsOn: [makeJars] ) {
def docXML = file("../javadoc/RangeSeekBar.xml")
def BADocletPath = file("C:/Users/Claude/Desktop/SimpleLibraryCompiler/Doclet/")
def javadocDir = file("../javadoc/")
doFirst {
if (file(docXML).exists()) {
docXML.delete()
println("Deleted doc file: " + docXML.name)
}
}
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.BADoclet
destinationDir = javadocDir
println("Destination Dir:" + destinationDir)
options.doclet("BADoclet")
options.docletpath = BADocletPath.listFiles().asType(List)
options.addStringOption("B4atarget", "$docXML")
options.addStringOption("B4aignore", "com.yahoo")
options.setMemberLevel(JavadocMemberLevel.PUBLIC)
doLast {
def s = docXML.text.replaceAll("<type>T</type>","<type>double</type>")
s = s.replaceAll("<version>1.0</version>","<version>1.01</version>")
docXML.text = s
copy {
from docXML
into BASharedLibrary
}
copy {
from outJar
into BASharedLibrary
}
println ("**** Remember to refresh your libraries ****")
}
failOnError true
}