-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
55 lines (52 loc) · 1.58 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Android
# Build your Android project with Gradle.
# Add steps that test, sign, and distribute the APK, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/android
trigger:
- master
pool:
vmImage: 'macos-latest'
steps:
- task: DownloadSecureFile@1
name: credentials
inputs:
secureFile: 'credentials.properties'
- script: |
cp $(credentials.secureFilePath) $(Build.SourcesDirectory)/app
displayName: 'Copy credentials.properties'
- task: Gradle@2
inputs:
gradleWrapperFile: 'gradlew'
tasks: 'assembleDebug'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
javaHomeOption: 'JDKVersion'
gradleOptions: '-Xmx3072m'
sonarQubeRunAnalysis: false
checkStyleRunAnalysis: true
findBugsRunAnalysis: true
pmdRunAnalysis: true
displayName: 'Debug Build'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/app/build/outputs/apk/debug/app-debug.apk'
ArtifactName: 'Debug'
publishLocation: 'Container'
- task: Gradle@2
inputs:
gradleWrapperFile: 'gradlew'
tasks: 'assembleRelease'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
javaHomeOption: 'JDKVersion'
gradleOptions: '-Xmx3072m'
sonarQubeRunAnalysis: false
checkStyleRunAnalysis: true
findBugsRunAnalysis: true
pmdRunAnalysis: true
displayName: 'Release Build'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/app/build/outputs/apk/release/app-release.apk'
ArtifactName: 'Release'
publishLocation: 'Container'