Skip to content

Commit

Permalink
[TicketNo:] HMS-MLKit#10 Create sample agc file, add wrapper file, ch…
Browse files Browse the repository at this point in the history
…ange CI setting.

[Description:] Add sample-agconnect-services.json for ID-Photo-DIY and Smile-Camera. Create wrapper to auto build project.
[Binary Source:] NA
  • Loading branch information
gwwhuawei committed Mar 25, 2020
1 parent 7fce5e8 commit b98d2ba
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
with:
java-version: 1.8
- name: Build with Gradle
run: ./gradlew build
run: ./buildCI.sh
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ build/

.project
.settings
.classpath

/gradle
.classpath
27 changes: 27 additions & 0 deletions ID-Photo-DIY/app/sample-agconnect-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"agcgw":{
"backurl":"hw-ml-cloud.cn",
"url":"connect.hicloud.com"
},
"client":{
"cp_id":"260086023420031456",
"product_id":"9105385868808379027",
"client_id":"268600551012363200",
"client_secret":"4819981CE7939A526B71AC3092D35C5CB77DF8341C6986559AA9211",
"app_id":"1015883",
"package_name":"com.mlkit.sample.idphoto",
"api_key":"CV46Xu0Y3+YFDS832xvOY69LHiAtZ2SviYUSZyELicm2NrxUesZE1TO"
},
"service":{
"analytics":{
"collector_url":"data.dtml.hicloud.com",
"resource_id":"p1",
"channel_id":""
},
"ml":{
"mlservice_url":"ml-kit.cloud.com"
}
},
"region":"CN",
"configuration_version":"1.0"
}
27 changes: 27 additions & 0 deletions Smile-Camera/app/sample-agconnect-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"agcgw":{
"backurl":"hw-ml-cloud.cn",
"url":"connect.hicloud.com"
},
"client":{
"cp_id":"260086023420031456",
"product_id":"9105385868808379027",
"client_id":"268600551012363200",
"client_secret":"4819981CE7939A526B71AC3092D35C5CB77DF8341C6986559AA9211",
"app_id":"1015883",
"package_name":"com.mlkit.sample.smilecamera",
"api_key":"CV46Xu0Y3+YFDS832xvOY69LHiAtZ2SviYUSZyELicm2NrxUesZE1TO"
},
"service":{
"analytics":{
"collector_url":"data.dtml.hicloud.com",
"resource_id":"p1",
"channel_id":""
},
"ml":{
"mlservice_url":"ml-kit.cloud.com"
}
},
"region":"CN",
"configuration_version":"1.0"
}
14 changes: 14 additions & 0 deletions buildCI.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

echo "Begine build."
# Exit if error
set -e

# Move agconnect-services.json in apps.
cp MLKit-Sample/app/sample-agconnect-services.json MLKit-Sample/app/agconnect-services.json
cp MLKit-Sample/app/sample-agconnect-services.json ID-Photo-DIY/app/agconnect-services.json
cp MLKit-Sample/app/sample-agconnect-services.json Smile-Camera/app/agconnect-services.json
echo "Copy agc file end."

# Build
./gradlew clean build
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Mon Mar 23 15:36:35 CST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 comments on commit b98d2ba

Please sign in to comment.