Skip to content

Commit e288d25

Browse files
Compile with Java 21
https://docs.gradle.org/current/userguide/compatibility.html: Java 21 requires Gradle 8.5
1 parent b1da316 commit e288d25

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
plugins {
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

66
apply plugin: 'java'
77
apply plugin: 'eclipse'
8-
apply plugin: 'maven'
8+
apply plugin: 'maven-publish'
99
apply plugin: 'signing'
1010

1111
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
@@ -15,7 +15,6 @@ Properties props = new Properties()
1515
props.load(new FileInputStream(buildDir.getAbsolutePath() + "/src/main/resources/com/neuronrobotics/nrjavaserial/build.properties"))
1616

1717
group = "com.neuronrobotics"
18-
archivesBaseName = "nrjavaserial"
1918
version = props."app.version"
2019

2120
sourceSets {
@@ -32,21 +31,21 @@ sourceSets {
3231
}
3332
}
3433

35-
jar.archiveName = "nrjavaserial-${props.'app.version'}.jar"
36-
3734
repositories {
3835
mavenCentral()
3936
jcenter()
4037
}
4138

4239
dependencies {
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+
5049
jar {
5150
jar.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
5251

@@ -64,12 +63,13 @@ jar {
6463
}
6564

6665
task javadocJar(type: Jar) {
67-
classifier = 'javadoc'
66+
archiveClassifier = 'javadoc'
6867
from javadoc
6968
}
7069

7170
task sourcesJar(type: Jar) {
72-
classifier = 'sources'
71+
archivesBaseName = "nrjavaserial"
72+
archiveClassifier = 'sources'
7373
from (sourceSets.main.allSource) {
7474
exclude 'native/'
7575
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)