Skip to content

Commit

Permalink
handle workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MahmoudMabrok committed Oct 26, 2024
1 parent 2fd79d1 commit 36272ae
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 27 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/android ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: Android CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: code quality with deteckt
run: ./gradlew detektFormat

- name: test
run: ./gradlew test

- name: build app
run: ./gradlew build
name: Android CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: code quality with deteckt
run: ./gradlew detekt

- name: test
run: ./gradlew test

- name: build app
run: ./gradlew build
12 changes: 11 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,20 @@ dependencies {

apply plugin: "org.jlleitschuh.gradle.ktlint"

detekt {
buildUponDefaultConfig = true
allRules = false
baseline = file("detekt-baseline.xml")
}

tasks.withType(Detekt).configureEach {
jvmTarget = "1.8"
}

tasks.register('detektFormat', Detekt) {
description = "Runs autocorrect enabled detekt build."
source = files("src/main/java")
config.from(files("$rootDir/Scripts/detekt-config.yml"))
baseline = file("detekt-baseline.xml")
autoCorrect = true
reports {
html {
Expand Down

0 comments on commit 36272ae

Please sign in to comment.