11apply plugin : ' java'
22apply plugin : ' eclipse'
3- apply plugin : ' maven'
3+ if (project == rootProject) {
4+ apply plugin : ' maven'
5+ }
6+ apply plugin : ' java-library'
47apply plugin : ' signing'
58
69[compileJava, compileTestJava]* . options* . encoding = ' UTF-8'
@@ -9,14 +12,14 @@ File buildDir = file(".");
912
1013Properties props = new Properties ()
1114props. load(new FileInputStream (buildDir. getAbsolutePath()+ " /src/main/resources/com/neuronrobotics/sdk/config/build.properties" ))
12- // sourceSets {
13- //
14- // test {
15- // java {
16- // srcDirs = ["test/java/src" ] // Note @Peter's comment below
17- // }
18- // }
19- // }
15+ sourceSets {
16+
17+ test {
18+ java {
19+ srcDirs = [" test/java/src" ]
20+ }
21+ }
22+ }
2023
2124manifest {
2225 attributes(
@@ -31,7 +34,7 @@ manifest {
3134
3235 )
3336}
34-
37+ if (project == rootProject)
3538jar. archiveName = " nrsdk-" + props. " app.version" + " -jar-with-dependencies.jar"
3639
3740// apply from: 'http://gradle-plugins.mihosoft.eu/latest/vlicenseheader.gradle'
@@ -40,27 +43,36 @@ jar.archiveName = "nrsdk-"+props."app.version"+"-jar-with-dependencies.jar"
4043
4144repositories {
4245 mavenCentral()
46+ // maven {
47+ // url "https://repository.ow2.org/nexus/content/repositories/public/"
48+ // }
4349}
4450
4551dependencies {
4652 // TODO change as many of these as possible to Maven repositories
47- compile fileTree (dir : ' libs' , includes : [' *.jar' ])
48- testCompile ' junit:junit:4.12'
49- compile ' gov.nist.math:jama:1.0.2'
50- compile ' com.miglayout:miglayout-swing:4.1'
51- compile ' org.igniterealtime.smack:smack:3.2.1'
53+ api fileTree (dir : ' libs' , includes : [' *.jar' ])
54+ testImplementation ' junit:junit:4.12'
55+ implementation ' com.google.code.gson:gson:2.5'
56+
57+ api ' gov.nist.math:jama:1.0.2'
58+ implementation ' com.miglayout:miglayout-swing:4.1'
59+ implementation ' org.igniterealtime.smack:smack:3.2.1'
5260
53- compile ' org.igniterealtime.smack:smackx:3.2.1'
54- compile ' org.apache.commons:commons-lang3:3.2.1'
55- compile ' org.usb4java:usb4java:1.2.0'
56- compile ' org.usb4java:usb4java-javax:1.2.0'
61+ implementation ' org.igniterealtime.smack:smackx:3.2.1'
62+ implementation ' org.apache.commons:commons-lang3:3.2.1'
63+ api ' org.usb4java:usb4java:1.2.0'
64+ api ' org.usb4java:usb4java-javax:1.2.0'
5765
5866 // compile fileTree (dir: '../doychinNRJAVASERISL/nrjavaserial/build/libs', includes: ['*.jar'])
59- compile " com.neuronrobotics:nrjavaserial:5.1.1"
67+ api " com.neuronrobotics:nrjavaserial:5.1.1"
6068 // https://mvnrepository.com/artifact/org.apache.commons/commons-math3
61- compile group : ' org.apache.commons' , name : ' commons-math3' , version : ' 3.6.1'
62-
63-
69+ api group : ' org.apache.commons' , name : ' commons-math3' , version : ' 3.6.1'
70+ // https://mvnrepository.com/artifact/net.sf.bluecove/bluecove-gpl
71+ api group : ' net.sf.bluecove' , name : ' bluecove-gpl' , version : ' 2.1.0'
72+ api group : ' io.ultreia' , name : ' bluecove' , version : ' 2.1.1'
73+ // https://mvnrepository.com/artifact/motej/motej
74+ // api group: 'motej', name: 'motej', version: '0.9-2008.02.05-patched', ext: 'pom'
75+
6476
6577}
6678
@@ -73,11 +85,13 @@ archivesBaseName = "java-bowler"
7385version = props. " app.version"
7486
7587task javadocJar (type : Jar ) {
88+ if (project == rootProject)
7689 classifier = ' javadoc'
7790 from javadoc
7891}
7992
8093task sourcesJar (type : Jar ) {
94+ if (project == rootProject)
8195 classifier = ' sources'
8296 from sourceSets. main. allSource
8397}
0 commit comments