47 lines
822 B
YAML
47 lines
822 B
YAML
|
image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest"
|
||
|
|
||
|
stages:
|
||
|
- lib
|
||
|
- publish
|
||
|
- sample
|
||
|
|
||
|
before_script:
|
||
|
- export GRADLE_USER_HOME=$(pwd)/.gradle
|
||
|
- chmod +x ./gradlew
|
||
|
|
||
|
cache:
|
||
|
key: ${CI_PROJECT_ID}
|
||
|
paths:
|
||
|
- .gradle/
|
||
|
|
||
|
lib:
|
||
|
stage: lib
|
||
|
script:
|
||
|
- ./gradlew :lib:assembleRelease
|
||
|
artifacts:
|
||
|
paths:
|
||
|
- lib/build/outputs/aar/
|
||
|
|
||
|
publish:
|
||
|
stage: publish
|
||
|
script:
|
||
|
- ./gradlew :lib:publish
|
||
|
rules:
|
||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_TITLE =~ /Release.*/
|
||
|
|
||
|
buildDebugSample:
|
||
|
stage: sample
|
||
|
script:
|
||
|
- ./gradlew :sample:assembleDebug
|
||
|
artifacts:
|
||
|
paths:
|
||
|
- sample/build/outputs/apk/debug/
|
||
|
|
||
|
buildReleaseSample:
|
||
|
stage: sample
|
||
|
script:
|
||
|
- ./gradlew :sample:assembleRelease
|
||
|
artifacts:
|
||
|
paths:
|
||
|
- sample/build/outputs/apk/release/
|