| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- //
- // This file is to be applied to every subproject.
- //
- apply plugin: 'java'
- apply plugin: 'maven'
- String mavenGroupId = 'com.jme3'
- String mavenVersion = jmeVersion + '-' + jmeVersionTag //'-SNAPSHOT'
- sourceCompatibility = '1.6'
- [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
- repositories {
- mavenCentral()
- maven{
- url "http://nifty-gui.sourceforge.net/nifty-maven-repo"
- }
- }
- dependencies {
- // Adding dependencies here will add the dependencies to each subproject.
- testCompile group: 'junit', name: 'junit', version: '4.10'
- }
- String mavenArtifactId = name
- group = mavenGroupId
- version = mavenVersion
- javadoc {
- failOnError = false
- options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
- options.docTitle = "jMonkeyEngine ${jmeMainVersion} ${project.name} Javadoc"
- options.windowTitle = "jMonkeyEngine ${jmeMainVersion} ${project.name} Javadoc"
- options.header = "<b>jMonkeyEngine ${jmeMainVersion} ${project.name}</b>"
- options.author = "true"
- options.use = "true"
- //disable doclint for JDK8, more quiet output
- options.addStringOption('Xdoclint:none', '-quiet')
- }
- task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
- classifier = 'sources'
- from sourceSets*.allSource
- }
- task javadocJar(type: Jar, dependsOn: javadoc, description: 'Creates a jar from the javadoc files.') {
- classifier = 'javadoc'
- from javadoc.destinationDir
- }
- artifacts {
- archives jar
- archives sourcesJar
- if(buildJavaDoc == "true"){
- archives javadocJar
- }
- }
- configure(install.repositories.mavenInstaller) {
- pom.project {
- groupId = mavenGroupId
- artifactId = mavenArtifactId
- version = mavenVersion
- }
- }
- task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
- // sourceSets*.allSource*.srcDirs*.each { File srcDir ->
- // if (!srcDir.isDirectory()) {
- // println "Creating source folder: ${srcDir}"
- // srcDir.mkdirs()
- // }
- // }
- }
|