blob: 58270b7f2173ffa49c83b14fdedede8612b963f8 [file] [log] [blame]
Brian Silverman26e4e522015-12-17 01:56:40 -05001apply plugin: 'java'
2apply plugin: 'application'
3apply plugin: 'com.github.johnrengelman.shadow'
4apply plugin: 'maven-publish'
5
6// Adds the dependency for the shadow plugin, which creates an uberjar with all dependencies
7buildscript {
8 repositories { jcenter() }
9 dependencies {
10 classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.1'
11 }
12}
13
14publishing {
15 publications {
16 maven(MavenPublication) {
17 artifact(shadowJar) {
18 // The shadow plugin has the 'all' classifier. We don't want this, so use null instead
19 classifier null
20 }
21 artifact(simDsSources) {
22 classifier 'sources'
23 }
24 artifact(simDsJavadoc) {
25 classifier 'javadoc'
26 }
27 groupId 'edu.wpi.first.wpilibj.simulation'
28 artifactId 'SimDS'
29 version '0.1.0-SNAPSHOT'
30 }
31 }
32 setupWpilibRepo(it)
33}
34
35mainClassName = 'edu.wpi.first.wpilibj.simulation.ds.Main'
36
37dependencies {
38 compile 'net.java.jinput:jinput:2.0.5'
39 compile project(':simulation:JavaGazebo')
40}
41
42task simDsSources(type: Jar, dependsOn: classes) {
43 description = 'Creates the sources jar for the SimDS'
44 group = 'WPILib'
45 classifier = 'sources'
46 from sourceSets.main.allJava
47}
48
49task simDsJavadoc(type: Jar, dependsOn: javadoc) {
50 description = 'Creates the javadoc jar for the SimDS'
51 group = 'WPILib'
52 classifier = 'javadoc'
53 from javadoc.destinationDir
Brian Silverman1a675112016-02-20 20:42:49 -050054}
55
56//we need to move the simulation jars to the install directory
57task copyJars(type: Copy) {
58 description = 'copy SimDS-all.jar to make simulation zip'
59 group = 'WPILib Simulation'
60 from shadowJar.archivePath
61 into "$simulationInstallDir/jar"
62}
63
64build.dependsOn shadowJar