diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06eb5679d..4da04c052 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,11 +46,8 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} restore-keys: ${{ runner.os }}-gradle - - name: Check if kotlin files are formatted correctly - run: ./gradlew runKtlint - - name: Build debug APK and run jvm tests - run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace + run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace -DskipFormatKtlint - name: Upload APK uses: actions/upload-artifact@v2 diff --git a/app/build.gradle b/app/build.gradle index 8c65f3a51..f88167b2e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -165,7 +165,10 @@ task formatKtlint(type: JavaExec) { } afterEvaluate { - preDebugBuild.dependsOn formatKtlint, runCheckstyle, runKtlint + if (!System.properties.containsKey('skipFormatKtlint')) { + preDebugBuild.dependsOn formatKtlint + } + preDebugBuild.dependsOn runCheckstyle, runKtlint } sonarqube {