Skip to content

Commit 4c5346f

Browse files
committed
Merge branch '_engine' into engine
2 parents 2feeb9a + 8a206ab commit 4c5346f

File tree

144 files changed

+7804
-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.

144 files changed

+7804
-0
lines changed

_engine/.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
indent_size = 2
8+
indent_style = space
9+
trim_trailing_whitespace = true
10+
continuation_indent_size = 4
11+
12+
[*.{kt,kts}]
13+
# possible values: number (e.g. 2), "unset" (makes ktlint ignore indentation completely)
14+
indent_size = 2
15+
# true (recommended) / false
16+
insert_final_newline = true
17+
# possible values: number (e.g. 120) (package name, imports & comments are ignored), "off"
18+
# it's automatically set to 100 on `ktlint --android ...` (per Android Kotlin Style Guide)
19+
max_line_length = off
20+
trim_trailing_whitespace = true
21+
disabled_rules = no-wildcard-imports

_engine/.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
gradlew text eol=lf

_engine/.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "gradle"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"
11+
open-pull-requests-limit: 20
12+
groups:
13+
# https://github.blog/2023-08-24-a-faster-way-to-manage-version-updates-with-dependabot/
14+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups
15+
kotlin:
16+
patterns:
17+
- "org.jetbrains.kotlin:*"
18+
moshi:
19+
patterns:
20+
- "com.squareup.moshi:*"
21+
okio:
22+
patterns:
23+
- "com.squareup.okio:*"

_engine/.github/workflows/cd.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Publish
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
event-file:
9+
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches
10+
name: "Event File"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Upload
14+
uses: actions/upload-artifact@v5
15+
with:
16+
name: event-file
17+
path: ${{ github.event_path }}
18+
publish:
19+
strategy:
20+
matrix:
21+
os:
22+
- ubuntu-latest
23+
java:
24+
- '21'
25+
runs-on: ${{ matrix.os }}
26+
timeout-minutes: 20
27+
steps:
28+
- uses: actions/checkout@v5
29+
with:
30+
fetch-depth: 1
31+
- name: Set up JDK
32+
uses: actions/[email protected]
33+
with:
34+
distribution: 'zulu'
35+
java-version: ${{ matrix.java }}
36+
- name: Setup Gradle
37+
uses: gradle/actions/setup-gradle@v5
38+
with:
39+
dependency-graph: generate-and-submit
40+
dependency-graph-continue-on-failure: false
41+
# - name: Install Docker on macOS
42+
# uses: douglascamata/setup-docker-macos-action@v1-alpha
43+
- name: build publish
44+
run: ./gradlew clean build publish --info --stacktrace
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
48+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSWORD }}
49+
- name: Upload Test Results
50+
# see publish-test-results.yml for workflow that publishes test results without security issues for forks
51+
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches
52+
if: always()
53+
uses: actions/upload-artifact@v5
54+
with:
55+
name: Test Results (Java ${{ matrix.java }} on ${{ matrix.os }})
56+
path: '**/build/test-results/test/TEST-*.xml'
57+
...

_engine/.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: CI
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches-ignore:
7+
- main
8+
jobs:
9+
event-file:
10+
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches
11+
name: "Event File"
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Upload
15+
uses: actions/upload-artifact@v5
16+
with:
17+
name: event-file
18+
path: ${{ github.event_path }}
19+
ci-build:
20+
strategy:
21+
matrix:
22+
os:
23+
- ubuntu-latest
24+
- windows-latest
25+
- macos-15-intel
26+
java:
27+
- '21'
28+
runs-on: ${{ matrix.os }}
29+
timeout-minutes: 20
30+
steps:
31+
- uses: actions/checkout@v5
32+
with:
33+
fetch-depth: 1
34+
- name: Set up JDK
35+
uses: actions/[email protected]
36+
with:
37+
distribution: 'zulu'
38+
java-version: ${{ matrix.java }}
39+
- name: Setup Gradle
40+
uses: gradle/actions/setup-gradle@v5
41+
- name: Install Docker on macOS
42+
if: matrix.os == 'macos-15-intel'
43+
uses: douglascamata/[email protected]
44+
- name: clean build
45+
run: ./gradlew clean build --info --stacktrace
46+
- name: Upload Test Results
47+
# see publish-test-results.yml for workflow that publishes test results without security issues for forks
48+
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches
49+
if: always()
50+
uses: actions/upload-artifact@v5
51+
with:
52+
name: Test Results (Java ${{ matrix.java }} on ${{ matrix.os }})
53+
path: '**/build/test-results/test/TEST-*.xml'
54+
...
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '16 16 * * 0'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ 'java' ]
32+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33+
# Learn more:
34+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v5
39+
- name: Set up JDK
40+
uses: actions/[email protected]
41+
with:
42+
distribution: 'zulu'
43+
java-version: '21'
44+
45+
# Initializes the CodeQL tools for scanning.
46+
- name: Initialize CodeQL
47+
uses: github/codeql-action/init@v4
48+
with:
49+
languages: ${{ matrix.language }}
50+
# If you wish to specify custom queries, you can do so here or in a config file.
51+
# By default, queries listed here will override any specified in a config file.
52+
# Prefix the list here with "+" to use these queries and those in the config file.
53+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
54+
55+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
56+
# If this step fails, then you should remove it and run the build manually (see below)
57+
- name: Autobuild
58+
uses: github/codeql-action/autobuild@v4
59+
60+
# ℹ️ Command-line programs to run using the OS shell.
61+
# 📚 https://git.io/JvXDl
62+
63+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
64+
# and modify them (or add more) to build your code if your project
65+
# uses a compiled language
66+
67+
#- run: |
68+
# make bootstrap
69+
# make release
70+
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v4
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish Test results
2+
3+
# WARNING:
4+
# workflow_run provides read-write repo token and access to secrets.
5+
# Do *not* merge changes to this file without the proper review.
6+
# We should only be running trusted code here.
7+
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
8+
# Docs: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
9+
on:
10+
workflow_run:
11+
workflows:
12+
- CI
13+
- Publish
14+
- Release
15+
types:
16+
- completed
17+
permissions: {}
18+
19+
jobs:
20+
# Job based on
21+
# - https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
22+
# - https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches
23+
publish-test-results:
24+
runs-on: ubuntu-latest
25+
if: github.event.workflow_run.conclusion != 'skipped'
26+
27+
permissions:
28+
checks: write
29+
# needed unless run with comment_mode: off
30+
pull-requests: write
31+
# only needed for private repository
32+
#contents: read
33+
# only needed for private repository
34+
#issues: read
35+
# required by download step to access artifacts API
36+
actions: read
37+
38+
steps:
39+
- name: Download and Extract Artifacts
40+
uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5
41+
with:
42+
run_id: ${{ github.event.workflow_run.id }}
43+
path: artifacts
44+
- name: Publish Test Results
45+
uses: EnricoMi/publish-unit-test-result-action@v2
46+
with:
47+
commit: ${{ github.event.workflow_run.head_sha }}
48+
event_file: artifacts/event-file/event.json
49+
event_name: ${{ github.event.workflow_run.event }}
50+
files: "artifacts/**/build/test-results/test/TEST-*.xml"
51+
...
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
name: Release
3+
on:
4+
release:
5+
types:
6+
- released
7+
# - published
8+
9+
jobs:
10+
event-file:
11+
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches
12+
name: "Event File"
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Upload
16+
uses: actions/upload-artifact@v5
17+
with:
18+
name: event-file
19+
path: ${{ github.event_path }}
20+
release:
21+
strategy:
22+
matrix:
23+
os:
24+
- ubuntu-latest
25+
java:
26+
- '21'
27+
runs-on: ${{ matrix.os }}
28+
timeout-minutes: 20
29+
steps:
30+
- uses: actions/checkout@v5
31+
with:
32+
fetch-depth: 1
33+
- name: Set up JDK
34+
uses: actions/[email protected]
35+
with:
36+
distribution: 'zulu'
37+
java-version: ${{ matrix.java }}
38+
- name: Setup Gradle
39+
uses: gradle/actions/setup-gradle@v5
40+
# - name: Install Docker on macOS
41+
# uses: douglascamata/setup-docker-macos-action@v1-alpha
42+
- name: Set artifact version
43+
run: |
44+
echo "RELEASE_VERSION=$(echo '${{ github.event.release.tag_name }}' | sed -e s/^v//)" >> $GITHUB_ENV
45+
- name: build publish
46+
run: ./gradlew clean build publish closeAndReleaseStagingRepositories --info --stacktrace -Pversion="${{ env.RELEASE_VERSION }}"
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
50+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSWORD }}
51+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
52+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
53+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
54+
- name: Upload Test Results
55+
# see publish-test-results.yml for workflow that publishes test results without security issues for forks
56+
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches
57+
if: always()
58+
uses: actions/upload-artifact@v5
59+
with:
60+
name: Test Results (Java ${{ matrix.java }} on ${{ matrix.os }})
61+
path: '**/build/test-results/test/TEST-*.xml'
62+
...
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Update Gradle Wrapper
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# "weekly" https://crontab.guru/every-week
7+
- cron: "0 0 * * 0"
8+
9+
jobs:
10+
update-gradle-wrapper:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
- name: Update Gradle Wrapper
15+
uses: gradle-update/update-gradle-wrapper-action@v2
16+
with:
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
- uses: gradle/wrapper-validation-action@v3

_engine/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.gradle
2+
.idea
3+
*.iml
4+
build/
5+
out/
6+
/classes
7+
.DS_Store

0 commit comments

Comments
 (0)