blob: d72b91a730b2901c8009183dafa125bf160e4a6f [file] [log] [blame]
description = "JavaDoc Plugin for Tapestry that generates component reference documentation for component classes"
dependencies {
implementation project(':tapestry-core')
implementation "commons-lang:commons-lang:2.6"
if (JavaVersion.current() <= JavaVersion.VERSION_1_8) {
implementation 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.")
}