configurations {
    javadoc
}

dependencies {
    javadoc "org.umlgraph:umlgraph:5.6.6"
}

afterEvaluate {
    def debugVariant = android.applicationVariants.find { variant ->
        variant.name == "debug"
    }

    task javadoc(type: Javadoc) {
        title = "Beem javadoc"
        dependsOn "generateDebugSources"
        source = debugVariant.javaCompile.source
        includes = ["**/com/beem/project/beem/**",
                    "**/com/google/android/apps/iosched/util/**"]
        classpath = files(android.getBootClasspath(),
                debugVariant.javaCompile.classpath)

        options.docletpath = configurations.javadoc.files.asType(List)
        options.doclet = "org.umlgraph.doclet.UmlGraphDoc"
        options.addStringOption "inferrel"
        options.addStringOption "inferdep"
        options.addStringOption "hide", "java.*"
        options.addStringOption "collpackages", "java.util.*"
        options.addStringOption "qualify"
        options.addStringOption "types"
        options.addStringOption "visibility"
        options.addStringOption "postfixpackage"
        options.addStringOption "nodefontsize", "9"
        options.addStringOption "nodefontpackagesize", "7"
    }

}
