Skip to content

Commit 3397ce2

Browse files
committed
Init commit
0 parents  commit 3397ce2

File tree

71 files changed

+3515
-0
lines changed

Some content is hidden

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

71 files changed

+3515
-0
lines changed

.github/workflows/main-branch.yml

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
name: Main Branch Workflow
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths-ignore:
7+
- 'README.md'
8+
- 'CODE_OF_CONDUCT.md'
9+
- 'CONTRIBUTING.md'
10+
- 'LICENSE'
11+
- '.github/**'
12+
workflow_dispatch:
13+
14+
jobs:
15+
build-jars:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: '17'
24+
distribution: 'temurin'
25+
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@v4
28+
29+
- name: Build with Gradle Wrapper
30+
run: ./gradlew build --no-daemon
31+
32+
- name: Extract project name from Gradle
33+
id: extract-name
34+
run: |
35+
PROJECT_NAME=$(./gradlew -q printProjectName --no-daemon)
36+
echo "PROJECT_NAME=${PROJECT_NAME}" >> $GITHUB_ENV
37+
38+
- name: Extract version from Gradle
39+
id: extract-version
40+
run: |
41+
VERSION=$(./gradlew -q printProjectVersion --no-daemon)
42+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
43+
44+
- name: Upload jars
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-jars
48+
path: build/libs/*.jar
49+
50+
- name: Upload JaCoCo test report
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-test-report
54+
path: build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
55+
56+
upload-codecov:
57+
runs-on: ubuntu-latest
58+
needs:
59+
- build-jars
60+
61+
steps:
62+
- uses: actions/checkout@v4
63+
- name: Extract project name from Gradle
64+
id: extract-name
65+
run: |
66+
PROJECT_NAME=$(./gradlew -q printProjectName --no-daemon)
67+
echo "PROJECT_NAME=${PROJECT_NAME}" >> $GITHUB_ENV
68+
69+
- name: Extract version from Gradle
70+
id: extract-version
71+
run: |
72+
VERSION=$(./gradlew -q printProjectVersion --no-daemon)
73+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
74+
75+
- name: Download JaCoCo test report
76+
uses: actions/download-artifact@v4
77+
with:
78+
name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-test-report
79+
path: artifacts/
80+
81+
- name: Upload coverage to Codecov
82+
uses: codecov/codecov-action@v5
83+
with:
84+
token: ${{ secrets.CODECOV_TOKEN }}
85+
files: ./build/reports/jacoco/test/jacocoTestReport.xml
86+
fail_ci_if_error: true
87+
88+
documentate:
89+
runs-on: ubuntu-latest
90+
91+
steps:
92+
- uses: actions/checkout@v4
93+
- name: Set up JDK 17
94+
uses: actions/setup-java@v4
95+
with:
96+
java-version: '17'
97+
distribution: 'temurin'
98+
99+
- name: Setup Gradle
100+
uses: gradle/actions/setup-gradle@v4
101+
102+
- name: Documentate with Gradle Wrapper
103+
run: ./gradlew documentate --no-daemon
104+
105+
106+
- name: Deploy to GitHub Pages
107+
uses: peaceiris/actions-gh-pages@v4
108+
with:
109+
github_token: ${{ secrets.GITHUB_TOKEN }}
110+
publish_dir: ./build/dokka/htmlMultiModule
111+
publish_branch: gh-pages
112+
113+
create-release:
114+
runs-on: ubuntu-latest
115+
needs:
116+
- build-jars
117+
118+
steps:
119+
- name: Checkout repository
120+
uses: actions/checkout@v4
121+
122+
- name: Extract project name from Gradle
123+
id: extract_name
124+
run: |
125+
PROJECT_NAME=$(./gradlew -q printProjectName)
126+
echo "PROJECT_NAME=${PROJECT_NAME}" >> $GITHUB_ENV
127+
128+
- name: Extract version from Gradle
129+
id: get-version
130+
run: |
131+
VERSION=$(./gradlew -q printProjectVersion)
132+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
133+
134+
- name: Download jars
135+
uses: actions/download-artifact@v4
136+
with:
137+
name: ${{ env.PROJECT_NAME }}-${{ env.VERSION }}-jars
138+
path: artifacts/
139+
140+
- name: Release
141+
uses: softprops/action-gh-release@v2
142+
if: "!contains(env.VERSION, '-')"
143+
with:
144+
tag_name: ${{ env.VERSION }}
145+
body_path: ./CHANGELOG.md
146+
files: |
147+
artifacts/*
148+
149+
publish:
150+
runs-on: ubuntu-latest
151+
needs:
152+
- create-release
153+
154+
permissions:
155+
contents: read
156+
packages: write
157+
158+
steps:
159+
- name: Checkout source
160+
uses: actions/checkout@v4
161+
162+
- name: Set up JDK 17
163+
uses: actions/setup-java@v4
164+
with:
165+
distribution: 'temurin'
166+
java-version: '17'
167+
168+
- name: Configure Gradle
169+
uses: gradle/gradle-build-action@v3
170+
171+
- name: Publish to GitHub Packages
172+
run: ./gradlew publish --no-daemon
173+
env:
174+
PGP_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }}
175+
PGP_PRIVATE_KEY_PASSWORD: ${{ secrets.PGP_PRIVATE_KEY_PASSWORD }}
176+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
177+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
178+
GITHUB_REPO: ${{ github.repository }}
179+
GITHUB_USERNAME: ${{ github.actor }}
180+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
181+
182+
dependency-submission:
183+
runs-on: ubuntu-latest
184+
permissions:
185+
contents: write
186+
187+
steps:
188+
- uses: actions/checkout@v4
189+
- name: Set up JDK 17
190+
uses: actions/setup-java@v4
191+
with:
192+
java-version: '17'
193+
distribution: 'temurin'
194+
195+
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
196+
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
197+
- name: Generate and submit dependency graph
198+
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
199+
200+
generate-git-badges:
201+
name: Generate Git Badges
202+
runs-on: ubuntu-latest
203+
permissions:
204+
contents: write
205+
206+
steps:
207+
- name: Checkout repository
208+
uses: actions/checkout@v4
209+
210+
- name: Output git info
211+
id: git_info
212+
run: |
213+
function format_size { echo $(numfmt --to iec --suffix B $1); }
214+
function format_number { LC_ALL=en_US.UTF-8 printf "%'d\n" $1; }
215+
echo "file_count=$(format_number $(git ls-files | wc -l))" >> $GITHUB_OUTPUT
216+
echo "lines_of_code=$(find . -type f -name "*.kt" -exec wc -l {} + | awk '{s+=$1} END {print s}')" >> $GITHUB_OUTPUT
217+
git gc
218+
echo "size=$(format_size $(($(git count-objects -v | grep 'size-pack: ' | sed 's/size-pack: //g' | tr -d '\n') * 1024)))" >> $GITHUB_OUTPUT
219+
shell: bash
220+
221+
- name: Generate-Badge
222+
uses: likespro/generate-badge@v1
223+
with:
224+
token: ${{ secrets.GITHUB_TOKEN }}
225+
filename: |
226+
(
227+
"git-size"
228+
"git-file-count"
229+
"git-lines-of-code"
230+
)
231+
label: ("size" "files" "lines-of-code")
232+
message: |
233+
(
234+
"${{ steps.git_info.outputs.size }}"
235+
"${{ steps.git_info.outputs.file_count }}"
236+
"${{ steps.git_info.outputs.lines_of_code }}"
237+
)
238+
namedLogo: ("git" "git" "git")
239+
color: ("f1502f" "f1502f" "f1502f")

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
.kotlin/
7+
8+
### IntelliJ IDEA ###
9+
.idea/modules.xml
10+
.idea/jarRepositories.xml
11+
.idea/compiler.xml
12+
.idea/libraries/
13+
*.iws
14+
*.iml
15+
*.ipr
16+
out/
17+
!**/src/main/**/out/
18+
!**/src/test/**/out/
19+
20+
### Eclipse ###
21+
.apt_generated
22+
.classpath
23+
.factorypath
24+
.project
25+
.settings
26+
.springBeans
27+
.sts4-cache
28+
bin/
29+
!**/src/main/**/bin/
30+
!**/src/test/**/bin/
31+
32+
### NetBeans ###
33+
/nbproject/private/
34+
/nbbuild/
35+
/dist/
36+
/nbdist/
37+
/.nb-gradle/
38+
39+
### VS Code ###
40+
.vscode/
41+
42+
### Mac OS ###
43+
.DS_Store

.idea/.gitignore

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Whitespace-only changes.

0 commit comments

Comments
 (0)