Skip to content

Commit 5a5c3b7

Browse files
authored
Merge pull request #339 from AdamaJava/java21
feat(all projects): upgrade to java 21
2 parents 559cee9 + 367a891 commit 5a5c3b7

File tree

78 files changed

+1010
-1394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1010
-1394
lines changed

build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "com.github.spotbugs" version "4.2.0"
2+
id("com.github.spotbugs") version "5.2.1"
33
}
44

55
defaultTasks "build"
@@ -18,11 +18,16 @@ allprojects {
1818
apply plugin: 'eclipse'
1919
apply plugin: 'checkstyle'
2020
apply plugin: 'com.github.spotbugs'
21-
sourceCompatibility = 1.8
21+
sourceCompatibility = 21
2222

2323
//default value is libs according to java plugin
2424
libsDirName = "lib"
2525
}
26+
java {
27+
toolchain {
28+
languageVersion = JavaLanguageVersion.of(21)
29+
}
30+
}
2631

2732
subprojects {
2833
//config spotbugs
@@ -44,7 +49,7 @@ subprojects {
4449
//config checkstyle
4550
checkstyle {
4651
configFile = file('../config/google_check.xml')
47-
toolVersion = '8.15'
52+
toolVersion = '10.12.4'
4853
checkstyleTest.enabled=false
4954
}
5055
checkstyleMain.onlyIf {project.hasProperty('checkstyle')}

config/google_check.xml

Lines changed: 350 additions & 223 deletions
Large diffs are not rendered by default.

q3indel/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,20 @@ def scriptname = 'q3indel'
66
def isExecutable = true
77

88
//control the ordering of jars, make sure junit before <tool>.jar
9-
configurations {
10-
junit
11-
}
129

1310
// q3indel has some scala classes that require the following task (along with the scalal plugin and api dependency)
1411
sourceSets {
1512
main { java.srcDirs=['src']; resources.srcDirs=['src']; scala.srcDirs=['scala/src'] }
1613
test { java.srcDirs=['test']; test.resources.srcDirs=['test'];scala.srcDirs=['scala/test'] }
1714
}
1815
dependencies {
19-
configurations.compile.transitive = true
2016

2117
api project(':qcommon')
2218
api project(':qio')
2319
api project(':qbamfilter')
2420
api project(':qpicard')
2521

26-
api 'org.scala-lang:scala-library:2.12.3'
22+
api 'org.scala-lang:scala-library:2.12.18'
2723
api 'net.sf.jopt-simple:jopt-simple:4.6'
2824
api group: 'org.ini4j', name: 'ini4j', version: '0.5.2'
2925
}

q3panel/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ def isExecutable = true
66

77

88
dependencies {
9-
configurations.compile.transitive = true
109

1110
api project(':qcommon')
1211
api project(':qio')

q3tiledaligner/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ def isExecutable = true
66

77

88
dependencies {
9-
configurations.compile.transitive = true
109
api project(':qcommon')
1110
api project(':qio')
1211

q3vcftools/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ configurations {
1010
}
1111

1212
dependencies {
13-
configurations.compile.transitive = true
1413

1514
api project(':qcommon')
1615
api project(':qio')

qannotate/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ dependencies {
2525
//this junit is required by snpEff-4.0
2626
junit ('junit:junit:4.10')
2727

28-
configurations.compile.transitive = true
29-
3028
api project(':qcommon')
3129
api project(':qio')
3230
api project(':qbamfilter')

qbamannotate/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ def scriptname = 'qbamannotate'
55
def isExecutable = true
66

77
dependencies {
8-
configurations.compile.transitive = true
98

109
implementation project(':qcommon')
1110
implementation project(':qio')
1211
implementation project(':qpicard')
1312

1413
implementation 'net.sf.jopt-simple:jopt-simple:4.6'
1514

15+
// https://mvnrepository.com/artifact/jakarta.xml.bind/jakarta.xml.bind-api
16+
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1'
17+
// https://mvnrepository.com/artifact/org.eclipse.persistence/org.eclipse.persistence.moxy
18+
implementation 'org.eclipse.persistence:org.eclipse.persistence.moxy:3.0.3'
19+
1620
testImplementation project(':qtesting')
1721
}
1822

qbamannotate/src/org/qcmg/qbamannotate/FragBarCodeReport.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
import java.math.BigInteger;
1515
import java.util.ArrayList;
1616
import java.util.List;
17-
import javax.xml.bind.annotation.XmlAccessType;
18-
import javax.xml.bind.annotation.XmlAccessorType;
19-
import javax.xml.bind.annotation.XmlElement;
20-
import javax.xml.bind.annotation.XmlRootElement;
21-
import javax.xml.bind.annotation.XmlSchemaType;
22-
import javax.xml.bind.annotation.XmlType;
17+
import jakarta.xml.bind.annotation.XmlAccessType;
18+
import jakarta.xml.bind.annotation.XmlAccessorType;
19+
import jakarta.xml.bind.annotation.XmlElement;
20+
import jakarta.xml.bind.annotation.XmlRootElement;
21+
import jakarta.xml.bind.annotation.XmlSchemaType;
22+
import jakarta.xml.bind.annotation.XmlType;
2323

2424

2525
/**
@@ -67,7 +67,7 @@ public class FragBarCodeReport {
6767
*
6868
* <p>
6969
* This accessor method returns a reference to the live list,
70-
* not a snapshot. Therefore any modification you make to the
70+
* not a snapshot. Therefore, any modification you make to the
7171
* returned list will be present inside the JAXB object.
7272
* This is why there is not a <CODE>set</CODE> method for the pairing property.
7373
*
@@ -86,7 +86,7 @@ public class FragBarCodeReport {
8686
*/
8787
public List<FragBarCodeReport.Pairing> getPairing() {
8888
if (pairing == null) {
89-
pairing = new ArrayList<FragBarCodeReport.Pairing>();
89+
pairing = new ArrayList<>();
9090
}
9191
return this.pairing;
9292
}

qbamannotate/src/org/qcmg/qbamannotate/FragReport.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
import java.math.BigInteger;
1515
import java.util.ArrayList;
1616
import java.util.List;
17-
import javax.xml.bind.annotation.XmlAccessType;
18-
import javax.xml.bind.annotation.XmlAccessorType;
19-
import javax.xml.bind.annotation.XmlElement;
20-
import javax.xml.bind.annotation.XmlRootElement;
21-
import javax.xml.bind.annotation.XmlSchemaType;
22-
import javax.xml.bind.annotation.XmlType;
17+
import jakarta.xml.bind.annotation.XmlAccessType;
18+
import jakarta.xml.bind.annotation.XmlAccessorType;
19+
import jakarta.xml.bind.annotation.XmlElement;
20+
import jakarta.xml.bind.annotation.XmlRootElement;
21+
import jakarta.xml.bind.annotation.XmlSchemaType;
22+
import jakarta.xml.bind.annotation.XmlType;
2323

2424

2525
/**
@@ -67,7 +67,7 @@ public class FragReport {
6767
*
6868
* <p>
6969
* This accessor method returns a reference to the live list,
70-
* not a snapshot. Therefore any modification you make to the
70+
* not a snapshot. Therefore, any modification you make to the
7171
* returned list will be present inside the JAXB object.
7272
* This is why there is not a <CODE>set</CODE> method for the uniquePairing property.
7373
*
@@ -86,7 +86,7 @@ public class FragReport {
8686
*/
8787
public List<FragReport.UniquePairing> getUniquePairing() {
8888
if (uniquePairing == null) {
89-
uniquePairing = new ArrayList<FragReport.UniquePairing>();
89+
uniquePairing = new ArrayList<>();
9090
}
9191
return this.uniquePairing;
9292
}

0 commit comments

Comments
 (0)