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
16 changes: 0 additions & 16 deletions .github/hooks/install-pre-commit.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .github/hooks/pre-commit

This file was deleted.

19 changes: 1 addition & 18 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,4 @@ jobs:
java-version: '17'

- name: Run apiCheck
run: ./gradlew apiCheck

detekt:
runs-on: macos-latest
needs: [assembleAndroidDebug, assembleAndroidRelease]

steps:
- name: Checkout code
uses: actions/checkout@v6

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

- name: Run detekt
run: ./gradlew detektAll
run: ./gradlew apiCheck
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ captures/
.idea/appInsightsSettings.xml
.idea/ktlint-plugin.xml
.idea/markdown.xml
.idea/codeStyles/

.kotlin

Expand Down
27 changes: 0 additions & 27 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,6 @@

Instructions on how to develop in this project.

### Detekt

Install pre-commit hook for auto formatting:

Run the following command from the project root.
```
.github/hooks/install-pre-commit.sh
```

Run Detekt on all library modules:

```
./gradlew detektAll
```

Run Detekt on all library modules with auto-formatting enabled

```
./gradlew detektAll -PdetektAutoFix=true
```

Generate Detekt baseline

```
./gradlew detektGenerateBaseline
```

### Api validation

Create or overwrite the api validation file
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,6 @@ JsonTree can be searched for keys and values by using the `searchState` paramete
- Android compileSdk 36
- JDK 17

## Tech Stack

- Compose Multiplatform UI
- Kotlinx Serialization
- Detekt (Linting)
- API validation
- GitHub Actions
- Gradle version catalog

## Contributing

This repository is open for contributions. However, PRs might get rejected if they don't fit the current structure or goals of the project. If you want to contribute, it might be a good idea to open a issue to describe your idea before spending a lot of time implementing it.
Expand Down
53 changes: 0 additions & 53 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import io.gitlab.arturbosch.detekt.Detekt

buildscript {
repositories {
mavenCentral()
Expand All @@ -14,60 +12,9 @@ plugins {
alias(libs.plugins.compose.compiler).apply(false)
alias(libs.plugins.publish).apply(false)
alias(libs.plugins.api.validator)
alias(libs.plugins.detekt)
alias(libs.plugins.androidKotlinMultiplatformLibrary) apply false
}

apiValidation {
ignoredProjects.addAll(listOf("shared", "desktopApp", "webApp"))
}

val projectSource = file(projectDir)
val configFiles = files("$rootDir/detekt/config.yml")
val baselineFile = File("$rootDir/detekt/baseline.xml")
val kotlinFiles = "**/*.kt"
val sharedModuleFiles = "**/shared/**"
val desktopAppModuleFiles = "**/desktopApp/**"
val webAppModuleFiles = "**/webApp/**"
val resourceFiles = "**/resources/**"
val buildFiles = "**/build/**"
val testFiles = "**/commonTest/**"

tasks.register<Detekt>("detektAll") {
val autoFix = project.hasProperty("detektAutoFix")

description = "Custom DETEKT task for all modules"
parallel = true
ignoreFailures = false
autoCorrect = autoFix
buildUponDefaultConfig = true
setSource(projectSource)
config.setFrom(configFiles)
baseline = baselineFile
reports {
html.required = true
xml.required = false
txt.required = false
}
}

tasks.register<io.gitlab.arturbosch.detekt.DetektCreateBaselineTask>("detektGenerateBaseline") {
description = "Custom DETEKT task to build baseline for all modules"
parallel = true
ignoreFailures = false
buildUponDefaultConfig = true
setSource(projectSource)
baseline.set(baselineFile)
config.setFrom(configFiles)
include(kotlinFiles)
exclude(sharedModuleFiles, desktopAppModuleFiles, webAppModuleFiles, resourceFiles, buildFiles, testFiles)
}

tasks.withType<Detekt>().configureEach {
include(kotlinFiles)
exclude(sharedModuleFiles, desktopAppModuleFiles, webAppModuleFiles, resourceFiles, buildFiles, testFiles)
}

dependencies {
detektPlugins(libs.detekt.formatting)
}
6 changes: 0 additions & 6 deletions detekt/baseline.xml

This file was deleted.

34 changes: 0 additions & 34 deletions detekt/config.yml

This file was deleted.

6 changes: 1 addition & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ androidx-activity-compose = "1.13.0"
androidx-compose-ui-test = "1.11.0"
kotlinx-serialization-json = "1.11.0"
kotlinx-coroutines = "1.10.2"
detekt = "1.23.8"
kotlindiff = "1.3.0"

[libraries]
Expand All @@ -37,8 +36,6 @@ androidx-compose-ui-test-android = { module = "androidx.compose.ui:ui-test-junit
androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-compose-ui-test" }
kotlindiff = { module = "io.github.petertrr:kotlin-multiplatform-diff", version.ref = "kotlindiff" }

detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
Expand All @@ -47,5 +44,4 @@ androidKotlinMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.lib
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
publish = { id = "com.vanniktech.maven.publish", version.ref = "publish" }
api-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "api-validator" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
api-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "api-validator" }