Compare commits

...

9 Commits

Author SHA1 Message Date
Pun Butrach
e4d896f7f0 build: Remove style ratchet from build script again again 2025-09-03 17:16:25 +07:00
Pun Butrach
c26adf5dca chore: Ratcheteer!
This reverts commit b1e5f25341.
2025-07-15 23:10:24 +07:00
Pun Butrach
0aad586933 fix: cursed space 2025-07-15 23:08:12 +07:00
Pun Butrach
7d495e3cd2 Merge branch 'compose-dev' into build/spotless 2025-07-15 23:04:30 +07:00
Pun Butrach
b1e5f25341 build: Remove ratchet!! (sigh) 2025-07-06 02:19:42 +07:00
Pun Butrach
e85efceb39 build: Use ktlint (Android Studio configuration) 2025-07-06 02:13:33 +07:00
Pun Butrach
bfe207e682 build: Try to format when needed, not all the time (for now) 2025-07-06 01:52:37 +07:00
Pun Butrach
a150fdb147 ci: Merge Spotless CI with Build PR 2025-07-06 01:46:08 +07:00
Pun Butrach
23d39c0e93 build: Spotless check 2025-07-06 01:45:07 +07:00
4 changed files with 38 additions and 0 deletions

23
.editorconfig Normal file
View File

@@ -0,0 +1,23 @@
[*.{kt,kts}]
end_of_line = lf
ij_kotlin_allow_trailing_comma = false
ij_kotlin_allow_trailing_comma_on_call_site = false
ij_kotlin_imports_layout = *
ij_kotlin_indent_before_arrow_on_new_line = false
ij_kotlin_line_break_after_multiline_when_entry = true
ij_kotlin_packages_to_use_import_on_demand = java.util.*,kotlinx.android.synthetic.**
indent_size = 4
indent_style = space
insert_final_newline = true
ktlint_annotation_handle_annotations_with_parameters_same_as_annotations_without_parameters = [unset]
ktlint_argument_list_wrapping_ignore_when_parameter_count_greater_or_equal_than = 8
ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than = 4
ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
ktlint_code_style = android_studio
ktlint_enum_entry_name_casing = upper_or_camel_cases
ktlint_function_naming_ignore_when_annotated_with = [unset]
ktlint_function_signature_body_expression_wrapping = default
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = unset
ktlint_ignore_back_ticked_identifier = false
ktlint_property_naming_constant_naming = screaming_snake_case
max_line_length = 100

View File

@@ -19,6 +19,11 @@ jobs:
- name: Cache Gradle
uses: burrunan/gradle-cache-action@v1
- name: Spotless Check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew spotlessCheck --no-daemon
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -7,4 +7,12 @@ plugins {
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.about.libraries) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.spotless)
}
spotless {
kotlin {
target("app/src/*/java/**/*.kt", "api/src/*/kotlin/**/*.kt")
ktlint().setEditorConfigPath("$projectDir/.editorconfig")
}
}

View File

@@ -36,6 +36,7 @@ compose-icons = "1.2.4"
kotlin-process = "1.5.1"
hidden-api-stub = "4.3.3"
binary-compatibility-validator = "0.17.0"
spotless-gradle-plugin = "7.0.4"
[libraries]
# AndroidX Core
@@ -139,3 +140,4 @@ compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "
devtools = { id = "com.google.devtools.ksp", version.ref = "dev-tools-gradle-plugin" }
about-libraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "about-libraries-gradle-plugin" }
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless-gradle-plugin" }