Skip to content

Commit 5a3726d

Browse files
Add SwitchExternalVideo module (code and comments are not organized), and fix bugs.
1 parent e41898b commit 5a3726d

3 files changed

Lines changed: 70 additions & 2 deletions

File tree

Android/APIExample/ci.env.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/python
2+
# -*- coding: UTF-8 -*-
3+
import re
4+
import os
5+
6+
def main():
7+
appId = ""
8+
if "AGORA_APP_ID" in os.environ:
9+
appId = os.environ["AGORA_APP_ID"]
10+
token = ""
11+
12+
f = open("./app/src/main/res/values/strings_config.xml", 'r+')
13+
content = f.read()
14+
contentNew = re.sub(r'YOUR APP ID', appId, content)
15+
contentNew = re.sub(r'YOUR ACCESS TOKEN', token, contentNew)
16+
f.seek(0)
17+
f.write(contentNew)
18+
f.truncate()
19+
20+
21+
if __name__ == "__main__":
22+
main()
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
parameters:
2+
displayName: ''
3+
project: ''
4+
module: ''
5+
name: ''
6+
7+
jobs:
8+
9+
- job: ${{ parameters.name }}_Build
10+
displayName: ${{ parameters.name }}
11+
pool:
12+
vmImage: 'macos-latest'
13+
variables:
14+
- group: AgoraKeys
15+
steps:
16+
- script: cd ${{ parameters.project }} && ls && python ci.env.py && echo $(agora.appId)
17+
env:
18+
AGORA_APP_ID: $(agora.appId)
19+
20+
- task: Gradle@2
21+
inputs:
22+
workingDirectory: ${{ parameters.project }}/${{ parameters.module }}
23+
gradleWrapperFile: ${{ parameters.project }}/gradlew
24+
options: '--stacktrace'
25+
gradleOptions: '-Xmx3072m'
26+
publishJUnitResults: false
27+
testResultsFiles: '**/TEST-*.xml'
28+
tasks: 'assembleDebug'
29+
30+
- task: CopyFiles@2
31+
inputs:
32+
Contents: '**/*.apk'
33+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
34+
35+
- script: cd $(Build.ArtifactStagingDirectory) && zip -r ${{ parameters.name }}.zip .
36+
37+
- task: PublishBuildArtifacts@1
38+
inputs:
39+
PathtoPublish: '$(Build.ArtifactStagingDirectory)/${{ parameters.name }}.zip'
40+
ArtifactName: ${{ parameters.name }}

azure-pipelines.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode
55

66
trigger:
7-
- master
8-
- dev/*
7+
#- master
8+
#- dev/*
9+
- dev/cjw
910

1011
pool:
1112
vmImage: 'macos-latest'
@@ -18,3 +19,8 @@ jobs:
1819
project: 'APIExample'
1920
scheme: 'APIExample'
2021

22+
- template: Android/azure-templates/build-android.yml
23+
parameters:
24+
project: 'Android/APIExample'
25+
module: 'app'
26+
name: 'APIExampleAndroid'

0 commit comments

Comments
 (0)