From 65eba1389af06cb5a0b327e9af759175fa177faa Mon Sep 17 00:00:00 2001 From: Normen Hansen Date: Wed, 28 Jan 2015 13:56:58 +0100 Subject: [PATCH] - enable building of JavaDoc - add option to disable JavaDoc building in gradle.properties --- common.gradle | 36 ++++++++++++++---------------------- gradle.properties | 3 +++ 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/common.gradle b/common.gradle index 91d4ab204..2a2b10ab3 100644 --- a/common.gradle +++ b/common.gradle @@ -5,9 +5,6 @@ apply plugin: 'java' apply plugin: 'maven' -//String jmeVersion = '3.0.10' -//String jmeVersion = rootProject.version; - String mavenGroupId = 'com.jme3' String mavenVersion = jmeVersion + '-' + jmeVersionTag //'-SNAPSHOT' @@ -19,9 +16,6 @@ repositories { maven{ url "http://nifty-gui.sourceforge.net/nifty-maven-repo" } - // You may define additional repositories, or even remove "mavenCentral()". - // Read more about repositories here: - // http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:repositories } dependencies { @@ -34,21 +28,17 @@ String mavenArtifactId = name group = mavenGroupId version = mavenVersion -//jar.doFirst{ -// manifest { -// attributes('Manifest-Version' : '1.0', -// 'Created-By' : vendor, -// 'Specification-Title' : appName, -// 'Specification-Version' : version, -// 'Specification-Vendor' : vendor, -// 'Implementation-Title' : appName, -// 'Implementation-Version' : version, -// 'Implementation-Vendor' : vendor, -// 'Main-Class' : getProperty('mainClass'), -// 'Class-Path' : configurations.compile.collect { 'lib/' + it.getName() }.join(' ') -// ) -// } -//} +javadoc { + failOnError = false + project.configure(options) { + memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED + docTitle = "jMonkeyEngine ${jmeMainVersion} ${project.name} Javadoc" + windowTitle = "jMonkeyEngine ${jmeMainVersion} ${project.name} Javadoc" + header = "jMonkeyEngine ${jmeMainVersion} ${project.name}" + author = "true" + use = "true" + } +} task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') { classifier = 'sources' @@ -63,7 +53,9 @@ task javadocJar(type: Jar, dependsOn: javadoc, description: 'Creates a jar from artifacts { archives jar archives sourcesJar -// archives javadocJar + if(buildJavaDoc == "true"){ + archives javadocJar + } } configure(install.repositories.mavenInstaller) { diff --git a/gradle.properties b/gradle.properties index 80d3274f4..4d8b56aa7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,9 @@ jmeMainVersion = 3.1 # Version addition pre-alpha-svn, Stable, Beta jmeVersionTag = snapshot-github +# specify if JavaDoc should be built +buildJavaDoc = true + # specify if SDK and Native libraries get built buildSdkProject = true buildNativeProjects = false