Skip to content

Commit 1b2f145

Browse files
committed
Bump gradle to 8.13 and build with Java 17
1 parent 61fd23e commit 1b2f145

20 files changed

Lines changed: 136 additions & 97 deletions

.github/workflows/codeql-analysis.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ jobs:
3535

3636
steps:
3737
- name: Checkout repository
38-
uses: actions/checkout@v2
38+
uses: actions/checkout@v4
3939

40-
- name: Set up JDK 8
41-
uses: actions/setup-java@v2
40+
- name: Set up JDK 17
41+
uses: actions/setup-java@v4
4242
with:
43-
java-version: '8'
44-
distribution: 'adopt'
43+
java-version: '17'
44+
distribution: 'temurin'
4545

4646
# Initializes the CodeQL tools for scanning.
4747
- name: Initialize CodeQL
48-
uses: github/codeql-action/init@v1
48+
uses: github/codeql-action/init@v3
4949
with:
5050
languages: ${{ matrix.language }}
5151
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -65,12 +65,10 @@ jobs:
6565
# and modify them (or add more) to build your code if your project
6666
# uses a compiled language
6767

68+
# Note: Assumes we're running on Ubuntu
69+
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
6870
- name: Build
69-
#run: ./gradlew build --warning-mode all
70-
uses: GabrielBB/xvfb-action@v1
71-
with:
72-
run: ./gradlew build -xsign --warning-mode all
73-
working-directory: ./ #optional
71+
run: xvfb-run ./gradlew build -xsign -xpublish --warning-mode all
7472

7573
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@v1
74+
uses: github/codeql-action/analyze@v3

.github/workflows/gradle.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,25 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
java: [ '8', '11', '14', '17']
19+
java: [ '17', '21', '23' ]
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
23+
24+
- name: Verify gradle wrapper
25+
uses: gradle/actions/wrapper-validation@v4
26+
if: matrix.java == '17'
2327

2428
- name: Set up JDK ${{ matrix.java }}
25-
uses: actions/setup-java@v2
29+
uses: actions/setup-java@v4
2630
with:
2731
java-version: ${{ matrix.java }}
28-
distribution: 'adopt'
32+
distribution: 'temurin'
2933

3034
- name: Grant execute permission for gradlew
3135
run: chmod +x gradlew
3236

37+
# Note: Assumes we're running on Ubuntu
38+
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
3339
- name: Build with Gradle
34-
#run: ./gradlew build --warning-mode all
35-
uses: GabrielBB/xvfb-action@v1
36-
with:
37-
run: ./gradlew build -xsign -xpublish --warning-mode all
38-
working-directory: ./ #optional
40+
run: xvfb-run ./gradlew build -xsign -xpublish --warning-mode all

RSTAUI/build.gradle

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,37 @@ plugins {
22
id 'java-library'
33
}
44

5-
['distribution', 'maven-publish', 'signing'].each { apply plugin: it }
5+
['base', 'distribution', 'maven-publish', 'signing'].each { apply plugin: it }
66

7-
assert JavaVersion.current().isJava8Compatible()
8-
9-
archivesBaseName = 'rstaui'
7+
base {
8+
archivesName = 'rstaui'
9+
}
1010

1111
dependencies {
12-
api 'com.fifesoft:rsyntaxtextarea:3.3.2'
13-
api 'com.fifesoft:autocomplete:3.3.1'
12+
api 'com.fifesoft:rsyntaxtextarea:3.5.4'
13+
api 'com.fifesoft:autocomplete:3.3.2'
14+
testImplementation platform('org.junit:junit-bom:5.12.1')
15+
testImplementation 'org.junit.jupiter:junit-jupiter'
16+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
1417
}
1518

1619
ext.isReleaseVersion = !project.version.endsWith('SNAPSHOT')
1720

18-
ext.sharedManifest = manifest {
19-
attributes('Class-Path': 'rsyntaxtextarea.jar autocomplete.jar',
20-
'Specification-Title': 'RSTAUI',
21-
'Specification-Version': version,
22-
'Implementation-Title': 'org.fife.ui',
23-
'Implementation-Version': version)
24-
25-
}
26-
2721
java {
2822
withSourcesJar()
2923
withJavadocJar()
3024
}
3125
jar {
32-
manifest { from sharedManifest }
26+
manifest {
27+
manifest {
28+
attributes('Class-Path': 'rsyntaxtextarea.jar autocomplete.jar',
29+
'Specification-Title': 'RSTAUI',
30+
'Specification-Version': version,
31+
'Implementation-Title': 'org.fife.ui',
32+
'Implementation-Version': version)
33+
34+
}
35+
}
3336
}
3437

3538
publishing {
@@ -86,7 +89,7 @@ publishing {
8689

8790
signing {
8891
// Don't require signing for e.g. ./gradlew install
89-
required { gradle.taskGraph.hasTask('publish') && isReleaseVersion }
92+
required = { gradle.taskGraph.hasTask('publish') && isReleaseVersion }
9093
sign publishing.publications.maven
9194
}
9295
tasks.withType(Sign) {

RSTAUI/src/main/java/org/fife/rsta/ui/AssistanceIconPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public void updateUI() {
176176
/**
177177
* Listens for events in the text component we're annotating.
178178
*/
179-
private class ComponentListener implements FocusListener {
179+
private final class ComponentListener implements FocusListener {
180180

181181
/**
182182
* Called when the combo box or text component gains focus.

RSTAUI/src/main/java/org/fife/rsta/ui/CollapsibleSectionPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ private void uiUpdated() {
362362
/**
363363
* Hides the bottom component.
364364
*/
365-
private class HideBottomComponentAction extends AbstractAction {
365+
private final class HideBottomComponentAction extends AbstractAction {
366366

367367
@Override
368368
public void actionPerformed(ActionEvent e) {

RSTAUI/src/main/java/org/fife/rsta/ui/GoToDialog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public void setVisible(boolean visible) {
299299
/**
300300
* Listens for events in this dialog.
301301
*/
302-
private class Listener implements ActionListener, DocumentListener {
302+
private final class Listener implements ActionListener, DocumentListener {
303303

304304
@Override
305305
public void actionPerformed(ActionEvent e) {
@@ -332,7 +332,7 @@ public void removeUpdate(DocumentEvent e) {
332332
/**
333333
* A document filter that only lets the user enter digits.
334334
*/
335-
private class NumberDocumentFilter extends DocumentFilter {
335+
private final class NumberDocumentFilter extends DocumentFilter {
336336

337337
private String fix(String str) {
338338
if (str!=null) {

RSTAUI/src/main/java/org/fife/rsta/ui/UIUtil.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,8 @@ public static void makeSpringCompactGrid(Container parent, int rows,
298298
try {
299299
layout = (SpringLayout)parent.getLayout();
300300
} catch (ClassCastException cce) {
301-
System.err.println("The first argument to makeCompactGrid " +
302-
"must use SpringLayout.");
303-
return;
301+
throw new IllegalArgumentException("The first argument to makeSpringCompactGrid " +
302+
"must use SpringLayout.", cce);
304303
}
305304

306305
//Align all cells in each column and make them the same width.

RSTAUI/src/main/java/org/fife/rsta/ui/search/AbstractSearchDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ public final void setWrapCheckboxText(String text) {
651651
/**
652652
* Listens for properties changing in the search context.
653653
*/
654-
private class SearchContextListener implements PropertyChangeListener {
654+
private final class SearchContextListener implements PropertyChangeListener {
655655

656656
@Override
657657
public void propertyChange(PropertyChangeEvent e) {

RSTAUI/src/main/java/org/fife/rsta/ui/search/FindDialog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public void updateUI() {
231231
/**
232232
* Listens for changes in the text field (find search field).
233233
*/
234-
private class FindDocumentListener implements DocumentListener {
234+
private final class FindDocumentListener implements DocumentListener {
235235

236236
@Override
237237
public void insertUpdate(DocumentEvent e) {
@@ -260,7 +260,7 @@ public void changedUpdate(DocumentEvent e) {
260260
* Listens for the text field gaining focus. All it does is select all
261261
* text in the combo box's text area.
262262
*/
263-
private class FindFocusAdapter extends FocusAdapter {
263+
private final class FindFocusAdapter extends FocusAdapter {
264264

265265
@Override
266266
public void focusGained(FocusEvent e) {

RSTAUI/src/main/java/org/fife/rsta/ui/search/FindToolBar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ public void setSearchContext(SearchContext context) {
603603
* Listens for events in this toolbar. Keeps the UI in sync with the
604604
* search context and vice versa.
605605
*/
606-
private class ToolBarListener extends MouseAdapter
606+
private final class ToolBarListener extends MouseAdapter
607607
implements ActionListener, PropertyChangeListener {
608608

609609
@Override
@@ -792,7 +792,7 @@ public void removeUpdate(DocumentEvent e) {
792792
* delay. Fires a "mark all" search event for applications that want to
793793
* display "mark all" results on the fly.
794794
*/
795-
private class MarkAllEventNotifier implements ActionListener {
795+
private final class MarkAllEventNotifier implements ActionListener {
796796

797797
@Override
798798
public void actionPerformed(ActionEvent e) {

0 commit comments

Comments
 (0)