11plugins {
2- id " biz.aQute.bnd.builder" version " 5.0.1 "
2+ id " biz.aQute.bnd.builder" version " 6.4.0 "
33 id " com.diffplug.spotless" version " 5.9.0"
44}
55
66apply plugin : ' java'
77apply plugin : ' eclipse'
8- apply plugin : ' maven'
8+ apply plugin : ' maven-publish '
99apply plugin : ' signing'
1010
1111[compileJava, compileTestJava]* . options* . encoding = ' UTF-8'
@@ -15,7 +15,6 @@ Properties props = new Properties()
1515props. load(new FileInputStream (buildDir. getAbsolutePath() + " /src/main/resources/com/neuronrobotics/nrjavaserial/build.properties" ))
1616
1717group = " com.neuronrobotics"
18- archivesBaseName = " nrjavaserial"
1918version = props. " app.version"
2019
2120sourceSets {
@@ -32,21 +31,21 @@ sourceSets {
3231 }
3332}
3433
35- jar. archiveName = " nrjavaserial-${ props.'app.version'} .jar"
36-
3734repositories {
3835 mavenCentral()
3936 jcenter()
4037}
4138
4239dependencies {
43- compile fileTree(dir : ' libs' , includes : [' *.jar' ])
44- testCompile ' junit:junit:4.12'
45- compile ' commons-net:commons-net:3.9.0'
40+ implementation fileTree(dir : ' build/ libs' , includes : [' *.jar' ])
41+ testImplementation ' junit:junit:4.12'
42+ implementation ' commons-net:commons-net:3.9.0'
4643 compileOnly ' net.java.dev.jna:jna:4.4.0'
4744 compileOnly ' net.java.dev.jna:jna-platform:4.4.0'
4845}
4946
47+ compileTestJava. dependsOn jar
48+
5049jar {
5150 jar. duplicatesStrategy = DuplicatesStrategy . EXCLUDE
5251
@@ -64,12 +63,13 @@ jar {
6463}
6564
6665task javadocJar (type : Jar ) {
67- classifier = ' javadoc'
66+ archiveClassifier = ' javadoc'
6867 from javadoc
6968}
7069
7170task sourcesJar (type : Jar ) {
72- classifier = ' sources'
71+ archivesBaseName = " nrjavaserial"
72+ archiveClassifier = ' sources'
7373 from (sourceSets. main. allSource) {
7474 exclude ' native/'
7575 }
0 commit comments