kopia lustrzana https://github.com/vitorpamplona/amethyst
Add Linder to build CI
rodzic
c4c8c0fbf7
commit
2d92e1d444
|
@ -27,6 +27,9 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Linter (gradle)
|
||||
run: ./gradlew ktlintCheck
|
||||
|
||||
- name: Test (gradle)
|
||||
run: ./gradlew test --no-daemon
|
||||
|
||||
|
|
|
@ -167,3 +167,7 @@ dependencies {
|
|||
debugImplementation "androidx.compose.ui:ui-tooling:$compose_ui_version"
|
||||
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_ui_version"
|
||||
}
|
||||
|
||||
ktlint {
|
||||
disabledRules.set(["no-wildcard-imports"])
|
||||
}
|
||||
|
|
|
@ -13,4 +13,11 @@ plugins {
|
|||
id 'com.android.library' version '7.4.1' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.8.10' apply false
|
||||
}
|
||||
}
|
||||
|
||||
task installGitHook(type: Copy) {
|
||||
from new File(rootProject.rootDir, 'pre-commit')
|
||||
into { new File(rootProject.rootDir, '.git/hooks') }
|
||||
fileMode 0777
|
||||
}
|
||||
tasks.getByPath(':app:preBuild').dependsOn installGitHook
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
function setup_git_hooks()
|
||||
{
|
||||
echo "Initialising git hooks..."
|
||||
ln -sf "$PWD/tools/git-hooks/pre-commit.sh" "$PWD/.git/hooks/pre-commit"
|
||||
chmod +x "$PWD/.git/hooks/pre-commit"
|
||||
echo "Done"
|
||||
}
|
||||
|
||||
setup_git_hooks
|
Ładowanie…
Reference in New Issue