Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1601ca7 authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

chore: Add lint and detekt with baselines on upstream ntfy project

parent 3011b7fa
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ quality:
  stage: quality
  script:
    - ./gradlew spotlessCheck
    - ./gradlew lintFdroidRelease
    - ./gradlew detekt
    - ./gradlew :notificationsreceiver:testDebugUnitTest :notificationsreceiver-domain:test
    - ./gradlew :app:assembleFdroidRelease
  rules:
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ file make it executable, and add the gradle tasks set in quality job in .gitlab.
̀```shell
#!/bin/sh

./gradlew spotlessCheck && ./gradlew :notificationsreceiver:testDebugUnitTest :notificationsreceiver-domain:test
./gradlew spotlessCheck && ./gradlew lintFdroidRelease && ./gradlew detekt && ./gradlew :notificationsreceiver:testDebugUnitTest :notificationsreceiver-domain:test

̀```
## Software architecture and good practices for /e/OS related upgrades
+23 −0
Original line number Diff line number Diff line
plugins {
    id 'com.google.devtools.ksp'
    alias(libs.plugins.hilt.android)
    alias(libs.plugins.detekt)
}

repositories {
@@ -40,6 +41,10 @@ android {

        def sentryDSN = System.getenv("SENTRY_DSN") ?: "placeholdertoto"
        buildConfigField("String", "SENTRY_DSN", "\"$sentryDSN\"")

        lint {
            baseline = file("lint-baseline.xml")
        }
    }

    signingConfigs {
@@ -181,3 +186,21 @@ dependencies {
    implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.29"
    implementation "com.caverock:androidsvg:1.4"
}


detekt {
    toolVersion = libs.versions.detekt.get()
    config.setFrom(file("../detekt.yml"))
    buildUponDefaultConfig = true
    autoCorrect = true
    baseline = file("detekt-baseline.xml")
}

tasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach {
    jvmTarget = "17"
  //  exclude("**/io/heckel/ntfy/**")
}
tasks.withType(io.gitlab.arturbosch.detekt.DetektCreateBaselineTask).configureEach {
    jvmTarget = "17"
    //exclude("**/io/heckel/ntfy/**")
}
+461 −0

File added.

Preview size limit exceeded, changes collapsed.

app/lint-baseline.xml

0 → 100644
+19501 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading