Skip to content

Commit 20cc393

Browse files
Initial commit
0 parents  commit 20cc393

22 files changed

+1923
-0
lines changed

.editorconfig

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
root = true
2+
3+
4+
# from: https://github.com/facebook/ktfmt/blob/main/docs/editorconfig/.editorconfig-kotlinlang
5+
# This .editorconfig section approximates ktfmt's formatting rules. You can include it in an
6+
# existing .editorconfig file or use it standalone by copying it to <project root>/.editorconfig
7+
# and making sure your editor is set to read settings from .editorconfig files.
8+
#
9+
# It includes editor-specific config options for IntelliJ IDEA.
10+
#
11+
# If any option is wrong, PR are welcome
12+
13+
[{*.kt,*.kts}]
14+
indent_style = space
15+
insert_final_newline = true
16+
max_line_length = 100
17+
indent_size = 4
18+
ij_continuation_indent_size = 4
19+
ij_java_names_count_to_use_import_on_demand = 9999
20+
ij_kotlin_align_in_columns_case_branch = false
21+
ij_kotlin_align_multiline_binary_operation = false
22+
ij_kotlin_align_multiline_extends_list = false
23+
ij_kotlin_align_multiline_method_parentheses = false
24+
ij_kotlin_align_multiline_parameters = true
25+
ij_kotlin_align_multiline_parameters_in_calls = false
26+
ij_kotlin_allow_trailing_comma = true
27+
ij_kotlin_allow_trailing_comma_on_call_site = true
28+
ij_kotlin_assignment_wrap = normal
29+
ij_kotlin_blank_lines_after_class_header = 0
30+
ij_kotlin_blank_lines_around_block_when_branches = 0
31+
ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1
32+
ij_kotlin_block_comment_at_first_column = true
33+
ij_kotlin_call_parameters_new_line_after_left_paren = true
34+
ij_kotlin_call_parameters_right_paren_on_new_line = false
35+
ij_kotlin_call_parameters_wrap = on_every_item
36+
ij_kotlin_catch_on_new_line = false
37+
ij_kotlin_class_annotation_wrap = split_into_lines
38+
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
39+
ij_kotlin_continuation_indent_for_chained_calls = true
40+
ij_kotlin_continuation_indent_for_expression_bodies = true
41+
ij_kotlin_continuation_indent_in_argument_lists = true
42+
ij_kotlin_continuation_indent_in_elvis = false
43+
ij_kotlin_continuation_indent_in_if_conditions = false
44+
ij_kotlin_continuation_indent_in_parameter_lists = false
45+
ij_kotlin_continuation_indent_in_supertype_lists = false
46+
ij_kotlin_else_on_new_line = false
47+
ij_kotlin_enum_constants_wrap = off
48+
ij_kotlin_extends_list_wrap = normal
49+
ij_kotlin_field_annotation_wrap = off
50+
ij_kotlin_finally_on_new_line = false
51+
ij_kotlin_if_rparen_on_new_line = false
52+
ij_kotlin_import_nested_classes = false
53+
ij_kotlin_imports_layout = *
54+
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
55+
ij_kotlin_keep_blank_lines_before_right_brace = 2
56+
ij_kotlin_keep_blank_lines_in_code = 2
57+
ij_kotlin_keep_blank_lines_in_declarations = 2
58+
ij_kotlin_keep_first_column_comment = true
59+
ij_kotlin_keep_indents_on_empty_lines = false
60+
ij_kotlin_keep_line_breaks = true
61+
ij_kotlin_lbrace_on_next_line = false
62+
ij_kotlin_line_comment_add_space = false
63+
ij_kotlin_line_comment_at_first_column = true
64+
ij_kotlin_method_annotation_wrap = split_into_lines
65+
ij_kotlin_method_call_chain_wrap = normal
66+
ij_kotlin_method_parameters_new_line_after_left_paren = true
67+
ij_kotlin_method_parameters_right_paren_on_new_line = true
68+
ij_kotlin_method_parameters_wrap = on_every_item
69+
ij_kotlin_name_count_to_use_star_import = 99
70+
ij_kotlin_name_count_to_use_star_import_for_members = 99
71+
ij_kotlin_parameter_annotation_wrap = off
72+
ij_kotlin_space_after_comma = true
73+
ij_kotlin_space_after_extend_colon = true
74+
ij_kotlin_space_after_type_colon = true
75+
ij_kotlin_space_before_catch_parentheses = true
76+
ij_kotlin_space_before_comma = false
77+
ij_kotlin_space_before_extend_colon = true
78+
ij_kotlin_space_before_for_parentheses = true
79+
ij_kotlin_space_before_if_parentheses = true
80+
ij_kotlin_space_before_lambda_arrow = true
81+
ij_kotlin_space_before_type_colon = false
82+
ij_kotlin_space_before_when_parentheses = true
83+
ij_kotlin_space_before_while_parentheses = true
84+
ij_kotlin_spaces_around_additive_operators = true
85+
ij_kotlin_spaces_around_assignment_operators = true
86+
ij_kotlin_spaces_around_equality_operators = true
87+
ij_kotlin_spaces_around_function_type_arrow = true
88+
ij_kotlin_spaces_around_logical_operators = true
89+
ij_kotlin_spaces_around_multiplicative_operators = true
90+
ij_kotlin_spaces_around_range = false
91+
ij_kotlin_spaces_around_relational_operators = true
92+
ij_kotlin_spaces_around_unary_operator = false
93+
ij_kotlin_spaces_around_when_arrow = true
94+
ij_kotlin_variable_annotation_wrap = off
95+
ij_kotlin_while_on_new_line = false
96+
ij_kotlin_wrap_elvis_expressions = 1
97+
ij_kotlin_wrap_expression_body_functions = 1
98+
ij_kotlin_wrap_first_method_in_call_chain = false
99+

.gitattributes

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# Reference documentation for gitattributes: https://git-scm.com/docs/gitattributes
2+
3+
#
4+
# Exclude files from exporting
5+
#
6+
.gitattributes export-ignore
7+
.gitignore export-ignore
8+
9+
#
10+
# Enable syntax highlighting
11+
#
12+
*.gitattributes linguist-language=gitattributes
13+
14+
15+
# default is unix line endings for all files
16+
17+
* text eol=lf
18+
19+
# Text files where line endings should be preserved
20+
*.patch -text
21+
22+
#
23+
# The above will handle all files NOT found below
24+
# https://help.github.com/articles/dealing-with-line-endings/
25+
# https://github.com/Danimoth/gitattributes
26+
27+
# These are explicitly windows files and should use crlf
28+
*.bat text eol=crlf
29+
*.cmd text eol=crlf
30+
*.ps1 text eol=crlf
31+
32+
# These files are text and should be normalized (Convert crlf => lf)
33+
*.bash text eol=lf
34+
*.sh text eol=lf
35+
36+
### CSS
37+
*.css text diff=css
38+
39+
### HTML
40+
*.htm text diff=html
41+
*.html text diff=html
42+
43+
### Java
44+
*.java text diff=java
45+
*.gradle text diff=java
46+
*.gradle.kts text diff=java
47+
48+
### Kotlin
49+
*.kt text diff=kotlin
50+
*.kts text diff=kotlin
51+
52+
### C
53+
*.c text diff=c
54+
*.h text diff=c
55+
56+
### C++
57+
*.cc text diff=cpp
58+
*.cxx text diff=cpp
59+
*.cpp text diff=cpp
60+
*.c++ text diff=cpp
61+
*.hpp text diff=cpp
62+
*.h++ text diff=cpp
63+
*.hh text diff=cpp
64+
65+
### Golang
66+
*.go text diff=golang
67+
68+
### Markdown
69+
*.md text diff=markdown
70+
71+
### Perl
72+
*.pl text diff=perl
73+
*.pm text diff=perl
74+
75+
### Python
76+
*.py text diff=python
77+
*.pxd text diff=python
78+
*.py text diff=python
79+
*.py3 text diff=python
80+
*.pyw text diff=python
81+
*.pyx text diff=python
82+
*.pyz text diff=python
83+
*.pyi text diff=python
84+
85+
### PHP
86+
*.php text diff=php
87+
88+
### Ruby
89+
*.rb text diff=ruby
90+
91+
### C#
92+
*.cs text diff=csharp
93+
94+
### Rust
95+
*.rs text diff=rust
96+
97+
### Swift
98+
*.swift text diff=swift
99+
100+
101+
# These files are binary and should be left untouched
102+
# (binary is a macro for -text -diff)
103+
*.a binary
104+
*.lib binary
105+
*.icns binary
106+
*.png binary
107+
*.jpg binary
108+
*.jpeg binary
109+
*.gif binary
110+
*.ico binary
111+
*.mov binary
112+
*.mp4 binary
113+
*.mp3 binary
114+
*.flv binary
115+
*.fla binary
116+
*.swf binary
117+
*.gz binary
118+
*.zip binary
119+
*.jar binary
120+
*.tar binary
121+
*.tar.gz binary
122+
*.7z binary
123+
*.ttf binary
124+
*.pyc binary
125+
*.gpg binary
126+
*.class binary
127+
*.war binary
128+
*.ttf binary
129+
*.eot binary
130+
*.otf binary
131+
*.woff binary
132+
*.woff2 binary
133+
134+
# Compiled Object files
135+
*.slo binary
136+
*.lo binary
137+
*.o binary
138+
*.obj binary
139+
140+
# Precompiled Headers
141+
*.gch binary
142+
*.pch binary
143+
144+
# Compiled Dynamic libraries
145+
*.so binary
146+
*.dylib binary
147+
*.dll binary
148+
149+
# Compiled Static libraries
150+
*.lai binary
151+
*.la binary
152+
*.a binary
153+
*.lib binary
154+
155+
# Executables
156+
*.exe binary
157+
*.out binary
158+
*.app binary
159+
160+
# Python
161+
*.db binary
162+
*.p binary
163+
*.pkl binary
164+
*.pickle binary
165+
*.pyc binary
166+
*.pyd binary
167+
*.pyo binary

.github/dependabot.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
commit-message:
6+
prefix: "chore"
7+
groups:
8+
workflow-actions:
9+
patterns:
10+
- "*"
11+
schedule:
12+
interval: "weekly"
13+
time: "06:00"
14+
timezone: "Canada/Pacific"
15+
reviewers:
16+
- "cloudshiftchris"
17+
18+
- package-ecosystem: "gradle"
19+
directory: "/"
20+
commit-message:
21+
prefix: "chore"
22+
ignore:
23+
- dependency-name: "*"
24+
update-types:
25+
- "version-update:semver-major"
26+
- dependency-name: "org.jetbrains.kotlin*"
27+
update-types:
28+
- "version-update:semver-minor"
29+
groups:
30+
gradle-updates:
31+
update-types:
32+
- "patch"
33+
- "minor"
34+
schedule:
35+
interval: "weekly"
36+
time: "06:00"
37+
timezone: "Canada/Pacific"
38+
reviewers:
39+
- "cloudshiftchris"

.github/workflows/build.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PR build
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
name: build
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Set up Java
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: 21
20+
distribution: 'temurin'
21+
22+
# https://github.com/gradle/actions/tree/main/setup-gradle
23+
- name: 'Set up Gradle'
24+
uses: 'gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244' # v4
25+
26+
# https://github.com/gradle/actions/tree/main/dependency-submission
27+
- name: "Generate and submit dependency graph"
28+
uses: "gradle/actions/dependency-submission@06832c7b30a0129d7fb559bcc6e43d26f6374244" # v4
29+
env:
30+
DEPENDENCY_GRAPH_EXCLUDE_PROJECTS: "^:(build-logic|buildSrc|.*[Tt]test.*)"
31+
DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS: ".*[Tt]est.*Classpath"
32+
33+
- name: Build
34+
run: ./gradlew build
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Dependabot auto-approve
2+
on: pull_request
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions
9+
jobs:
10+
dependabot:
11+
runs-on: ubuntu-latest
12+
if: github.actor == 'dependabot[bot]'
13+
steps:
14+
# https://github.com/dependabot/fetch-metadata
15+
- name: Dependabot metadata
16+
id: dependabot-metadata
17+
uses: "dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7" # v2.3.0
18+
19+
- name: Automatically approve & merge Dependabot patch PRs
20+
if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch'}}
21+
run: |
22+
gh pr review --approve "$PR_URL"
23+
gh pr merge --auto --squash "$PR_URL"
24+
env:
25+
PR_URL: ${{github.event.pull_request.html_url}}
26+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)