|
| 1 | +buildscript { |
| 2 | + repositories { |
| 3 | + jcenter() |
| 4 | + } |
| 5 | + dependencies { |
| 6 | + // This sucks down a lot of stuff that 'normal' users wouldn't |
| 7 | + // have and won't need anyway. |
| 8 | + if( project.hasProperty('releaseUser') ) { |
| 9 | + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' |
| 10 | + } |
| 11 | + } |
| 12 | +} |
| 13 | + |
| 14 | +apply plugin: 'java' |
| 15 | +apply plugin: 'maven' |
| 16 | + |
| 17 | +version='1.0.1' |
| 18 | +group='com.simsilica' |
| 19 | + |
| 20 | +ext.jmeVersion = "[3.1,)" |
| 21 | + |
| 22 | +// Version meta-data |
| 23 | +ext { |
| 24 | + releaseDescription = "Sim-Math ${project.version}" |
| 25 | + releaseVcsTag = "${project.name}-v${project.version}" |
| 26 | +} |
| 27 | + |
| 28 | +// Project-wide meta-data |
| 29 | +ext { |
| 30 | + bintrayLabels = ['jMonkeyEngine', 'gamedev', 'networking'] |
| 31 | + websiteUrl = 'https://github.com/Simsilica/SimEthereal' |
| 32 | + vcsUrl = 'https://github.com/Simsilica/SimEthereal.git' |
| 33 | + githubRepo = 'Simsilica/SimEthereal' |
| 34 | + issueTrackerUrl = 'https://github.com/Simsilica/SimEthereal/issues' |
| 35 | +} |
| 36 | + |
| 37 | +compileJava { |
| 38 | + options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" |
| 39 | +} |
| 40 | + |
| 41 | +repositories { |
| 42 | + mavenLocal() |
| 43 | + jcenter() |
| 44 | +} |
| 45 | + |
| 46 | +// Make sure the build file declares what it actually imports |
| 47 | +configurations.compile { |
| 48 | + transitive = false |
| 49 | +} |
| 50 | + |
| 51 | +dependencies { |
| 52 | + // Based on JME networking |
| 53 | + compile "org.jmonkeyengine:jme3-networking:$jmeVersion" |
| 54 | + |
| 55 | + // Uses SimMath for bit streaming utilities and transition buffers |
| 56 | + compile "com.simsilica:sim-math:[1.0,)" |
| 57 | + |
| 58 | + // Base logging |
| 59 | + compile 'org.slf4j:slf4j-api:1.7.15' |
| 60 | +} |
| 61 | + |
| 62 | + |
| 63 | +// Configuration to produce maven-repo style -sources and -javadoc jars |
| 64 | +task sourcesJar(type: Jar) { |
| 65 | + classifier = 'sources' |
| 66 | + from sourceSets.main.allSource |
| 67 | + exclude '**/.backups' |
| 68 | +} |
| 69 | + |
| 70 | +task javadocJar(type: Jar, dependsOn: javadoc) { |
| 71 | + classifier = 'javadoc' |
| 72 | + from javadoc.destinationDir |
| 73 | +} |
| 74 | + |
| 75 | +artifacts { |
| 76 | + archives sourcesJar |
| 77 | + archives javadocJar |
| 78 | +} |
| 79 | + |
| 80 | + |
| 81 | +// Put this at the end or it won't pick up the project.version and stuff |
| 82 | +if( project.hasProperty('releaseUser') ) { |
| 83 | + apply plugin: 'com.jfrog.bintray' |
| 84 | + apply from: 'https://raw.githubusercontent.com/Simsilica/gradle-plugins/master/simtools-release.gradle' |
| 85 | +} |
| 86 | + |
| 87 | + |
0 commit comments