Skip to content

Commit da2ec7c

Browse files
committed
Completely rebuilt the project to separate features into different modules
1 parent be8f151 commit da2ec7c

File tree

72 files changed

+3277
-1015
lines changed

Some content is hidden

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

72 files changed

+3277
-1015
lines changed

.github/workflows/dev-branch.yml

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
name: Main Branch Workflow
2+
3+
on:
4+
push:
5+
branches: [ "dev" ]
6+
7+
jobs:
8+
build-jars:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up JDK 17
14+
uses: actions/setup-java@v4
15+
with:
16+
java-version: '17'
17+
distribution: 'temurin'
18+
19+
- name: Setup Gradle
20+
uses: gradle/actions/setup-gradle@v4
21+
22+
- name: Build with Gradle Wrapper
23+
run: ./gradlew build --no-daemon
24+
25+
- name: Extract project name from Gradle
26+
id: extract-name
27+
run: |
28+
PROJECT_NAME=$(./gradlew -q printProjectName --no-daemon)
29+
echo "PROJECT_NAME=${PROJECT_NAME}" >> $GITHUB_ENV
30+
31+
- name: Extract version from Gradle
32+
id: extract-version
33+
run: |
34+
VERSION=$(./gradlew -q printProjectVersion --no-daemon)
35+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
36+
37+
- name: Upload jars
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-jars
41+
path: build/libs/*.jar
42+
43+
- name: Upload JaCoCo test report
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-test-report
47+
path: build/reports/jacoco/test/jacocoTestReport.xml
48+
49+
upload-codecov:
50+
runs-on: ubuntu-latest
51+
needs:
52+
- build-jars
53+
54+
steps:
55+
- uses: actions/checkout@v4
56+
- name: Extract project name from Gradle
57+
id: extract-name
58+
run: |
59+
PROJECT_NAME=$(./gradlew -q printProjectName --no-daemon)
60+
echo "PROJECT_NAME=${PROJECT_NAME}" >> $GITHUB_ENV
61+
62+
- name: Extract version from Gradle
63+
id: extract-version
64+
run: |
65+
VERSION=$(./gradlew -q printProjectVersion --no-daemon)
66+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
67+
68+
- name: Download JaCoCo test report
69+
uses: actions/download-artifact@v4
70+
with:
71+
name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-test-report
72+
path: artifacts/
73+
74+
- name: Upload coverage to Codecov
75+
uses: codecov/codecov-action@v5
76+
with:
77+
token: ${{ secrets.CODECOV_TOKEN }}
78+
files: ./build/reports/jacoco/test/jacocoTestReport.xml
79+
fail_ci_if_error: true
80+
81+
# publish:
82+
# runs-on: ubuntu-latest
83+
# needs:
84+
# - create-release
85+
#
86+
# permissions:
87+
# contents: read
88+
# packages: write
89+
#
90+
# steps:
91+
# - name: Checkout source
92+
# uses: actions/checkout@v4
93+
#
94+
# - name: Set up JDK 17
95+
# uses: actions/setup-java@v4
96+
# with:
97+
# distribution: 'temurin'
98+
# java-version: '17'
99+
#
100+
# - name: Configure Gradle
101+
# uses: gradle/gradle-build-action@v3
102+
#
103+
# - name: Publish to GitHub Packages
104+
# run: ./gradlew publish --no-daemon
105+
# env:
106+
# REPO: ${{ github.repository }}
107+
# USERNAME: ${{ github.actor }}
108+
# TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
110+
dependency-submission:
111+
runs-on: ubuntu-latest
112+
permissions:
113+
contents: write
114+
115+
steps:
116+
- uses: actions/checkout@v4
117+
- name: Set up JDK 17
118+
uses: actions/setup-java@v4
119+
with:
120+
java-version: '17'
121+
distribution: 'temurin'
122+
123+
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
124+
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
125+
- name: Generate and submit dependency graph
126+
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
127+
128+
generate-git-badges:
129+
name: Generate Git Badges
130+
runs-on: ubuntu-latest
131+
permissions:
132+
contents: write
133+
134+
steps:
135+
- name: Checkout repository
136+
uses: actions/checkout@v4
137+
138+
- name: Output git info
139+
id: git_info
140+
run: |
141+
function format_size { echo $(numfmt --to iec --suffix B $1); }
142+
function format_number { LC_ALL=en_US.UTF-8 printf "%'d\n" $1; }
143+
echo "file_count=$(format_number $(git ls-files | wc -l))" >> $GITHUB_OUTPUT
144+
echo "lines_of_code=$(find . -type f -name "*.kt" -exec wc -l {} + | awk '{s+=$1} END {print s}')" >> $GITHUB_OUTPUT
145+
git gc
146+
echo "size=$(format_size $(($(git count-objects -v | grep 'size-pack: ' | sed 's/size-pack: //g' | tr -d '\n') * 1024)))" >> $GITHUB_OUTPUT
147+
shell: bash
148+
149+
- name: Generate-Badge
150+
uses: likespro/generate-badge@v1
151+
with:
152+
token: ${{ secrets.GITHUB_TOKEN }}
153+
filename: |
154+
(
155+
"git-size"
156+
"git-file-count"
157+
"git-lines-of-code"
158+
)
159+
label: ("size" "files" "lines-of-code")
160+
message: |
161+
(
162+
"${{ steps.git_info.outputs.size }}"
163+
"${{ steps.git_info.outputs.file_count }}"
164+
"${{ steps.git_info.outputs.lines_of_code }}"
165+
)
166+
namedLogo: ("git" "git" "git")
167+
color: ("f1502f" "f1502f" "f1502f")

0 commit comments

Comments
 (0)