Skip to content

Commit 041120e

Browse files
committed
Migrate to Maven
1 parent 0f818bf commit 041120e

14 files changed

Lines changed: 241 additions & 518 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will build a Java project with Gradle
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3-
41
name: Build JavaBot
52

63
on: [push, pull_request, workflow_dispatch]
@@ -16,13 +13,11 @@ jobs:
1613
uses: actions/setup-java@v4
1714
with:
1815
java-version: '25'
19-
distribution: 'temurin'
20-
- name: Grant execute permission for gradlew
21-
run: chmod +x gradlew
22-
- name: Build with Gradle
23-
run: ./gradlew build
24-
- name: Test with Gradle
25-
run: ./gradlew test
16+
distribution: 'graalvm-community'
17+
- name: Build and run tests
18+
run: mvn verify
19+
- name: Run tests with native-image
20+
run: mvn test -PnativeTest
2621
publish:
2722
runs-on: ubuntu-latest
2823
permissions:
@@ -37,7 +32,7 @@ jobs:
3732
java-version: '25'
3833
distribution: 'graalvm-community'
3934
- name: Build native-image
40-
run: ./gradlew nativeCompile -Pprod
35+
run: "mvn native:compile -Pnative -Pprod"
4136
- name: Build Docker image
4237
run: docker build -t javabot .
4338
- name: Tag docker image

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ build/
77
/purgeArchives
88
/logs
99
/db
10-
10+
/target/
1111
# Eclipse settings
1212
.classpath
1313
.project
1414
.settings/
1515
bin/
16+
/.factorypath
1617

1718
# H2 Database
1819
*.mv.db

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM alpine:latest
22
RUN apk add --no-cache libsm libxrender libxext libxtst libxi gcompat ttf-dejavu
33

4-
COPY build/native/nativeCompile /work
4+
COPY target/*.so /work/
5+
COPY target/javabot /work/
56
WORKDIR /work
67

78
RUN chown 1000:1000 /work

build.gradle.kts

Lines changed: 0 additions & 131 deletions
This file was deleted.

checkstyle/suppressions.xml

Whitespace-only changes.

gradle/wrapper/gradle-wrapper.jar

-42.7 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)