blob: c2b7241d8ede55985c4af74ed40b4d695cdf0b25 [file] [log] [blame]
description = "JavaDoc Plugin for Tapestry that generates component reference documentation for component classes"
dependencies {
compile project(':tapestry-core')
compile "commons-lang:commons-lang:2.6"
if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
compile files(getTools())
}
}
/** Returns the tools.jar/classes.jar of the Java runtime. */
File getTools() {
def dir = isMacOSX_1_6() ? "classes" : "lib"
def jar = isMacOSX_1_6() ? "classes" : "tools.jar"
def jreRelpath = "../${dir}/${jar}"
def jdkRelpath = "$dir/${jar}"
def javaHome = System.properties['java.home']
return new File(javaHome, jdkRelpath).exists() ? new File(javaHome, jdkRelpath) : new File(javaHome, jreRelpath)
}
boolean isMacOSX_1_6() {
System.properties['os.name'].toLowerCase().contains('mac os') &&
System.properties['java.version'].startsWith("1.6.")
}