diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3f42863e..86f29448 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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 diff --git a/.github/workflows/main-merge-java-16.yml b/.github/workflows/main-merge-java-16.yml deleted file mode 100644 index 6b37de4f..00000000 --- a/.github/workflows/main-merge-java-16.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: ReBot - Java 16 - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 16 - uses: actions/setup-java@v1 - with: - java-version: 16 - - name: Test with Maven - run: mvn clean package --no-transfer-progress --file pom.xml \ No newline at end of file diff --git a/.github/workflows/main-merge-java-17.yml b/.github/workflows/main-merge-java-17.yml index 813c7657..9854e7b1 100644 --- a/.github/workflows/main-merge-java-17.yml +++ b/.github/workflows/main-merge-java-17.yml @@ -15,4 +15,4 @@ jobs: with: java-version: 17 - name: Test with Maven - run: mvn clean package --no-transfer-progress --file pom.xml \ No newline at end of file + run: mvn clean package --no-transfer-progress --file pom.xml -Dnet.bytebuddy.experimental=true \ No newline at end of file diff --git a/.github/workflows/main-merge-java-11.yml b/.github/workflows/main-merge-java-21.yml similarity index 70% rename from .github/workflows/main-merge-java-11.yml rename to .github/workflows/main-merge-java-21.yml index 53d08ba9..56cfb03a 100644 --- a/.github/workflows/main-merge-java-11.yml +++ b/.github/workflows/main-merge-java-21.yml @@ -1,4 +1,4 @@ -name: ReBot - Java 11 +name: ReBot - Java 21 on: push: @@ -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 \ No newline at end of file + run: mvn clean package --no-transfer-progress --file pom.xml -Dnet.bytebuddy.experimental=true \ No newline at end of file diff --git a/.github/workflows/main-native-merge-java-11.yml b/.github/workflows/main-native-merge-java-17.yml similarity index 67% rename from .github/workflows/main-native-merge-java-11.yml rename to .github/workflows/main-native-merge-java-17.yml index 66ddb48d..0d47ade6 100644 --- a/.github/workflows/main-native-merge-java-11.yml +++ b/.github/workflows/main-native-merge-java-17.yml @@ -1,4 +1,4 @@ -name: ReBot - Native Java 11 +name: ReBot - Native Java 17 on: push: @@ -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 \ No newline at end of file + run: mvn clean package --no-transfer-progress --file pom.xml -Pnative -Dquarkus.native.container-build=true -DskipTests -Dnet.bytebuddy.experimental=true \ No newline at end of file diff --git a/.github/workflows/native-pull-request-java-11.yml b/.github/workflows/native-pull-request-java-11.yml deleted file mode 100644 index 232e5bbc..00000000 --- a/.github/workflows/native-pull-request-java-11.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: ReBot CI - Native Java 11 - -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 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: package - run: mvn clean package --no-transfer-progress --file pom.xml -Pnative -Dmaven.javadoc.skip=true -Dquarkus.native.container-build=true -DskipTests - diff --git a/.github/workflows/native-pull-request-java-17.yml b/.github/workflows/native-pull-request-java-17.yml new file mode 100644 index 00000000..f225db6b --- /dev/null +++ b/.github/workflows/native-pull-request-java-17.yml @@ -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 + diff --git a/.github/workflows/pull-request-java-11.yml b/.github/workflows/pull-request-java-11.yml deleted file mode 100644 index f80a25c2..00000000 --- a/.github/workflows/pull-request-java-11.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: ReBot CI - Java 11 - -on: pull_request -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Test with Maven - run: mvn clean test --no-transfer-progress --file pom.xml -Dmaven.javadoc.skip=true - diff --git a/.github/workflows/pull-request-java-16.yml b/.github/workflows/pull-request-java-21.yml similarity index 64% rename from .github/workflows/pull-request-java-16.yml rename to .github/workflows/pull-request-java-21.yml index 9e529613..9c92055c 100644 --- a/.github/workflows/pull-request-java-16.yml +++ b/.github/workflows/pull-request-java-21.yml @@ -1,4 +1,4 @@ -name: ReBot CI - Java 16 +name: ReBot CI - Java 21 on: pull_request jobs: @@ -6,10 +6,10 @@ jobs: 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 diff --git a/.lift.toml b/.lift.toml index 21864095..0ac0cccf 100644 --- a/.lift.toml +++ b/.lift.toml @@ -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" ] \ No newline at end of file diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 00000000..2f4dc488 --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1 @@ +-Dnet.bytebuddy.experimental=true \ No newline at end of file diff --git a/README.md b/README.md index f550345a..2e17f2ad 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/pom.xml b/pom.xml index 4f5f9b47..30d21b89 100644 --- a/pom.xml +++ b/pom.xml @@ -63,10 +63,12 @@ 1.0-SNAPSHOT 1.0-SNAPSHOT 1.0-SNAPSHOT - 2.8.0.Final + 2.13.4.Final 1.20.0.Final 4.5.13 - 4.9.3 + + 4.12.0 + 3.6.0 2.0.0.0 4.13.1 2.12.0 @@ -83,10 +85,10 @@ 1.6.8 UTF-8 - 11 - 11 - 11 - 11 + 17 + 17 + 17 + 17 @@ -127,7 +129,11 @@ okhttp ${version.com.squareup.okhttp3} - + + com.squareup.okio + okio + ${version.com.squareup.okio} + xyz.rebasing diff --git a/rebot-telegram/pom.xml b/rebot-telegram/pom.xml index 2129858c..0b616355 100644 --- a/rebot-telegram/pom.xml +++ b/rebot-telegram/pom.xml @@ -18,7 +18,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> - 4.0.0 @@ -108,6 +109,18 @@ xyz.rebasing rebot-welcome-message-plugin + + + + com.github.javaparser + javaparser-core + 3.24.2 + + + com.github.javaparser + javaparser-symbol-solver-core + 3.24.2 + @@ -124,7 +137,6 @@ io.quarkus quarkus-maven-plugin ${io.quarkus.version} - diff --git a/rebot-telegram/src/main/resources/META-INF/native-image/reflection-config.json b/rebot-telegram/src/main/resources/META-INF/native-image/reflection-config.json new file mode 100644 index 00000000..2bb47f12 --- /dev/null +++ b/rebot-telegram/src/main/resources/META-INF/native-image/reflection-config.json @@ -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"] } + ] + } +] \ No newline at end of file diff --git a/rebot-telegram/src/main/resources/application.properties b/rebot-telegram/src/main/resources/application.properties index f54f2da1..daa68ae1 100644 --- a/rebot-telegram/src/main/resources/application.properties +++ b/rebot-telegram/src/main/resources/application.properties @@ -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 \ No newline at end of file