123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- //
- // This file is to be applied to every subproject.
- //
- apply plugin: 'java'
- apply plugin: 'maven'
- apply plugin: 'maven-publish'
- group = 'com.jme3'
- version = jmeVersion + '-' + jmeVersionTag
- 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'
- }
- 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
- if (JavaVersion.current().isJava8Compatible()){
- 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
- }
- }
- publishing {
- publications {
- maven(MavenPublication) {
- from components.java
- artifact sourcesJar
- artifact javadocJar
- pom.withXml {
- asNode().children().last() + {
- resolveStrategy = Closure.DELEGATE_FIRST
- name POM_NAME
- description POM_DESCRIPTION
- url POM_URL
- scm {
- url POM_SCM_URL
- connection POM_SCM_CONNECTION
- developerConnection POM_SCM_DEVELOPER_CONNECTION
- }
- licenses {
- license {
- name POM_LICENSE_NAME
- url POM_LICENSE_URL
- distribution POM_LICENSE_DISTRIBUTION
- }
- }
- }
- }
- }
- }
- repositories {
- maven {
- url "${rootProject.buildDir}/repo" // change to point to your repo, e.g. http://my.org/repo
- }
- }
- }
- 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()
- // }
- // }
- }
|