Set up a basic CI pipeline

This commit is contained in:
Marc Plano-Lesay 2023-08-11 07:32:18 +10:00
parent 81259cabc9
commit 8068afa9f8
Signed by untrusted user: kernald
GPG key ID: 66A41B08CC62A6CF
3 changed files with 53 additions and 0 deletions

42
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,42 @@
image: mobiledevops/android-sdk-image:33.0.2
stages:
- check
- build
- test
cache:
- key: $CI_PROJECT_ID-$CI_COMMIT_REF_SLUG
fallback_keys:
- $CI_PROJECT_ID-$CI_DEFAULT_BRANCH
- $CI_PROJECT_ID-default
paths:
- .gradle/caches
- .gradle/wrapper
before_script:
- export GRADLE_USER_HOME=$PWD/.gradle
lintDebug:
stage: check
script:
- ./gradlew --console=plain :app:lintDebug
artifacts:
paths:
- app/build/reports/lint-results-debug.html
expose_as: "lint-report"
when: always
assembleDebug:
interruptible: true
stage: build
script:
- ./gradlew --console=plain assembleDebug
artifacts:
paths:
- app/build/outputs/
testDebug:
stage: test
script:
- ./gradlew --console=plain test

View file

@ -83,6 +83,10 @@ android {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
lint {
lintConfig = file("$rootDir/lint-config.xml")
}
}
dependencies {

7
lint-config.xml Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<lint>
<!-- https://github.com/bumptech/glide/issues/4940 -->
<issue id="NotificationPermission">
<ignore regexp="com.bumptech.glide.request.target.NotificationTarget" />
</issue>
</lint>