Skip to content

Commit

Permalink
Upgrade Quarkus to 2.13.4 (#113)
Browse files Browse the repository at this point in the history
- Upgrade okhttp to 4.12.0 and okio to 3.6.0
- upgrade quarkus to 2.12.3
- fix native builds
- Deprecate java 11 and add support for java 21

Signed-off-by: Spolti <filippespolti@gmail.com>
  • Loading branch information
spolti authored Dec 26, 2024
1 parent 75d3af3 commit 874959b
Show file tree
Hide file tree
Showing 16 changed files with 96 additions and 77 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/main-merge-java-16.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/main-merge-java-17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
with:
java-version: 17
- name: Test with Maven
run: mvn clean package --no-transfer-progress --file pom.xml
run: mvn clean package --no-transfer-progress --file pom.xml -Dnet.bytebuddy.experimental=true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ReBot - Java 11
name: ReBot - Java 21

on:
push:
Expand All @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 21
- name: Test with Maven
run: mvn clean package --no-transfer-progress --file pom.xml
run: mvn clean package --no-transfer-progress --file pom.xml -Dnet.bytebuddy.experimental=true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ReBot - Native Java 11
name: ReBot - Native Java 17

on:
push:
Expand All @@ -12,9 +12,9 @@ jobs:
- uses: actions/checkout@v2
- name: Install Dependencies
run: sudo apt-get install -y build-essential libz-dev zlib1g-dev
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: package
run: mvn clean package --no-transfer-progress --file pom.xml -Pnative -Dquarkus.native.container-build=true -DskipTests
run: mvn clean package --no-transfer-progress --file pom.xml -Pnative -Dquarkus.native.container-build=true -DskipTests -Dnet.bytebuddy.experimental=true
17 changes: 0 additions & 17 deletions .github/workflows/native-pull-request-java-11.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/native-pull-request-java-17.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: ReBot CI - Native Java 17

on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: sudo apt-get install -y build-essential libz-dev zlib1g-dev
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: package
run: -|
mvn clean package --no-transfer-progress --file pom.xml -Pnative -Dmaven.javadoc.skip=true -Dquarkus.native.container-build=true -DskipTests -Dnet.bytebuddy.experimental=true

15 changes: 0 additions & 15 deletions .github/workflows/pull-request-java-11.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: ReBot CI - Java 16
name: ReBot CI - Java 21

on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 16
java-version: 21
- name: Test with Maven
run: mvn clean test --no-transfer-progress --file pom.xml -Dmaven.javadoc.skip=true
run: mvn clean test --no-transfer-progress --file pom.xml -Dmaven.javadoc.skip=true -Dnet.bytebuddy.experimental=true

2 changes: 1 addition & 1 deletion .lift.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build = "mvn install -DskipTests -Dmaven.javadoc.skip=true"
jdk11 = true
jdk17 = true
customTools = [ "https://help.sonatype.com/lift/files/78578763/78578764/1/1623180860953/pmd.sh rulesets/java/quickstart.xml" ]
1 change: 1 addition & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Dnet.bytebuddy.experimental=true
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
### ReBot - A Java API for Telegram

![ReBot - Java 11](https://github.com/rebasing-xyz/rebot/workflows/ReBot%20-%20Java%2011/badge.svg)
![ReBot - Java 16](https://github.com/rebasing-xyz/rebot/workflows/ReBot%20-%20Java%2016/badge.svg)
![ReBot - Java 17](https://github.com/rebasing-xyz/rebot/workflows/ReBot%20-%20Java%2017/badge.svg)
![ReBot - Java 17](https://github.com/rebasing-xyz/rebot/workflows/ReBot%20-%20Native%20Java%2011/badge.svg)
![ReBot - Java 21](https://github.com/rebasing-xyz/rebot/workflows/ReBot%20-%20Java%2021/badge.svg)
![ReBot - Native Java 17](https://github.com/rebasing-xyz/rebot/workflows/ReBot%20-%20Native%20Java%2011/badge.svg)
![Code Analysis](https://lift.sonatype.com/api/badge/github.com/rebasing-xyz/rebot)


Expand Down
20 changes: 13 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@
<version.xyz.rebasing.rebot.plugins>1.0-SNAPSHOT</version.xyz.rebasing.rebot.plugins>
<version.xyz.rebasing.rebot.services>1.0-SNAPSHOT</version.xyz.rebasing.rebot.services>
<version.xyz.rebasing.rebot.api>1.0-SNAPSHOT</version.xyz.rebasing.rebot.api>
<io.quarkus.version>2.8.0.Final</io.quarkus.version>
<io.quarkus.version>2.13.4.Final</io.quarkus.version>
<version.org.kie.kogito>1.20.0.Final</version.org.kie.kogito>
<version.httpclient>4.5.13</version.httpclient>
<version.com.squareup.okhttp3>4.9.3</version.com.squareup.okhttp3>

<version.com.squareup.okhttp3>4.12.0</version.com.squareup.okhttp3>
<version.com.squareup.okio>3.6.0</version.com.squareup.okio>
<version.org.hamcrest.java.hamcrest>2.0.0.0</version.org.hamcrest.java.hamcrest>
<version.junit>4.13.1</version.junit>
<version.org.mockito>2.12.0</version.org.mockito>
Expand All @@ -83,10 +85,10 @@
<version.nexus.staging.maven.plugin>1.6.8</version.nexus.staging.maven.plugin>
<!-- project build properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.release>11</maven.compiler.release>
<project.compile.java.version>11</project.compile.java.version>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.release>17</maven.compiler.release>
<project.compile.java.version>17</project.compile.java.version>
</properties>

<modules>
Expand Down Expand Up @@ -127,7 +129,11 @@
<artifactId>okhttp</artifactId>
<version>${version.com.squareup.okhttp3}</version>
</dependency>

<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>${version.com.squareup.okio}</version>
</dependency>
<!-- rebot dependencies -->
<dependency>
<groupId>xyz.rebasing</groupId>
Expand Down
16 changes: 14 additions & 2 deletions rebot-telegram/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
Expand Down Expand Up @@ -108,6 +109,18 @@
<groupId>xyz.rebasing</groupId>
<artifactId>rebot-welcome-message-plugin</artifactId>
</dependency>

<!-- Fix native compilation -->
<dependency>
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-core</artifactId>
<version>3.24.2</version>
</dependency>
<dependency>
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-symbol-solver-core</artifactId>
<version>3.24.2</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand All @@ -124,7 +137,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${io.quarkus.version}</version>

<executions>
<execution>
<goals>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"name": "com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserTypeParameter",
"allDeclaredMethods": true,
"allDeclaredFields": true
},
{
"name": "com.github.javaparser.ast.expr.ThisExpr",
"methods": [
{ "name": "findAncestor", "parameterTypes": ["java.lang.Class"] }
]
},
{
"name": "com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade",
"allDeclaredMethods": true,
"allDeclaredFields": true
},
{
"name": "com.github.javaparser.ast.body.ConstructorDeclaration",
"methods": [
{ "name": "findAncestor", "parameterTypes": ["java.lang.Class"] }
]
}
]
5 changes: 4 additions & 1 deletion rebot-telegram/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ quarkus.log.category."org.hibernate".level=INFO
%dev.quarkus.devservices.enabled=false

# jib configuration
quarkus.jib.base-jvm-image=registry.access.redhat.com/ubi8/openjdk-11
quarkus.jib.base-jvm-image=registry.access.redhat.com/ubi8/openjdk-17

# native builds
# quarkus.native.additional-build-args=-H:-CheckToolchain

0 comments on commit 874959b

Please sign in to comment.