i done my term project but my professor said you need Class Diagrams with UML class diagram using yWorksUMLDoclet community edition. i know how to do it in normal java app, but i dont konw how to add additional javadoc options in netbeans gradle.
technical my professor want Class Diagrams so now i put this code in my build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
}
}
allprojects { apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "java"
configurations {
umljavadoc
}
dependencies {
umljavadoc 'org.umlgraph:umlgraph:5.6'
}
task javadoc(overwrite: true, dependsOn: compileJava) {
setDescription('Generates Javadoc API documentation with UMLGraph diagrams')
setGroup(JavaBasePlugin.DOCUMENTATION_GROUP)
doLast {
def javaFilePath = file('C:/Users/khunjuice/Desktop/java project')
if (javaFilePath.exists()) {
ant.javadoc(classpath: (configurations.runtime + configurations.provided).asPath,
sourcepath: file('C:/Users/khunjuice/Desktop/java project'),
packagenames: '*',
destdir: "${docsDir}/javadoc",
private: 'true',
docletpath: configurations.umljavadoc.asPath) {
doclet(name: 'org.umlgraph.doclet.UmlGraphDoc') {
param(name: '-inferrel')
param(name: '-inferdep')
param(name: '-qualify')
param(name: '-postfixpackage')
param(name: '-hide', value: 'java.*')
param(name: '-collpackages', value: 'java.util.*')
param(name: '-nodefontsize', value: '9')
param(name: '-nodefontpackagesize', value: '7')
param(name: '-link', value: 'http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/spec')
param(name: '-link', value: 'http://java.sun.com/j2se/1.5/docs/api')
}
}
}
}
}
version = '1.0'
ext {
appName = 'my-gdx-game'
gdxVersion = '1.4.1'
roboVMVersion = '1.0.0-alpha-04'
box2DLightsVersion = '1.3'
ashleyVersion = '1.3.1'
aiVersion = '1.4.0'
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
project(":desktop") {
apply plugin: "java"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-controllers-desktop:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-controllers-platform:$gdxVersion:natives-desktop"
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
compile "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion"
compile "com.badlogicgames.ashley:ashley:$ashleyVersion"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
compile fileTree(dir: '../libs', include: '*.jar')}
}
tasks.eclipse.doLast {
delete ".project"
}
but noting happen
在我的情况下,项目根目录中的控制台命令gradlew javadoc
生成文档。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.