-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
162 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length = 140 | ||
|
||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{java,kt,kts,scala,rs,xml,kt.spec,kts.spec}] | ||
indent_size = 4 | ||
|
||
[*.{kt,kts}] | ||
ktlint_code_style = ktlint_official | ||
ktlint_ignore_back_ticked_identifier = true | ||
ij_kotlin_allow_trailing_comma_on_call_site = false | ||
ij_kotlin_allow_trailing_comma = false | ||
|
||
ktlint_standard = enabled | ||
|
||
# Don't allow any wildcard imports | ||
ij_kotlin_packages_to_use_import_on_demand = unset | ||
|
||
# Prevent wildcard imports | ||
ij_kotlin_name_count_to_use_star_import = 99 | ||
ij_kotlin_name_count_to_use_star_import_for_members = 99 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
max_line_length = unset | ||
|
||
[gradle/verification-metadata.xml] | ||
indent_size = 3 | ||
|
||
[*.yml] | ||
ij_yaml_spaces_within_brackets = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Used when a commit is pushed to the repository | ||
# This makes use of caching for faster builds and uploads the resulting artifacts | ||
name: build-commit | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Extract current branch name | ||
shell: bash | ||
# bash pattern expansion to grab branch name without slashes | ||
run: ref="${GITHUB_REF#refs/heads/}" && echo "branch=${ref////-}" >> $GITHUB_OUTPUT | ||
id: ref | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
- name: Initialize caches | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/loom-cache | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-build-commit-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-commit- | ||
- name: Build artifacts | ||
run: ./gradlew build | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: konfig-artifacts-${{ steps.ref.outputs.branch }} | ||
path: build/libs/*.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: ktlint-commit | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
ktlint: | ||
name: Check Code Quality | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: ktlint | ||
uses: ScaCap/action-ktlint@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-check | ||
filter_mode: nofilter | ||
level: info | ||
fail_on_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: ktlint-pull-request | ||
|
||
on: [ pull_request ] | ||
|
||
jobs: | ||
ktlint: | ||
name: Check Code Quality | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: ktlint | ||
uses: ScaCap/action-ktlint@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-pr-review | ||
level: info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
src/main/kotlin/dev/nyon/konfig/internal/InternalKonfigApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package dev.nyon.konfig.internal | ||
|
||
@Retention(value = AnnotationRetention.BINARY) | ||
@Target(AnnotationTarget.TYPEALIAS, AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION) | ||
@RequiresOptIn( | ||
message = | ||
"This is an internal Konfig API that " + | ||
"should not be used from the outside. No compatibility guarantees are provided. " + | ||
"It is recommended to report your use-case of internal API to the konfig developer.", | ||
level = RequiresOptIn.Level.ERROR | ||
) | ||
@Suppress("SpellCheckingInspection") | ||
annotation class InternalKonfigApi |