Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.{kt,kts}]
# Match IntelliJ IDEA's default Kotlin formatting rather than ktlint's stricter "official" style.
ktlint_code_style = intellij_idea
# Compose @Composable functions use PascalCase and components live in multi-declaration files,
# which the default naming/filename rules would otherwise flag.
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_standard_function-naming = disabled
ktlint_standard_filename = disabled

[*.{yml,yaml,json}]
indent_size = 2
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Lint & compile
runs-on: ubuntu-latest
env:
# The com.fastcomments artifacts are public-read on Repsy, so these are optional;
# they are forwarded if the secrets happen to be configured.
REPSY_USERNAME: ${{ secrets.REPSY_USERNAME }}
REPSY_PASSWORD: ${{ secrets.REPSY_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Spotless (formatting check)
run: ./gradlew spotlessCheck

- name: Android Lint
run: ./gradlew lintDebug

- name: Compile (assemble debug)
run: ./gradlew assembleDebug
9 changes: 7 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

lint {
// Snapshot of pre-existing issues so CI only fails on newly introduced ones.
baseline = file("lint-baseline.xml")
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}
Expand Down Expand Up @@ -79,4 +84,4 @@ dependencies {
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
}
}
Loading
Loading