feat: add huawei vendor SDK integration

pull/90/head
moonrailgun 2 years ago
parent 4598b593f4
commit 3c94ac2438

@ -1,3 +1,4 @@
GETUI_APPID=
GETUI_APPKEY=
GETUI_APPSECRET=
GETUI_HUAWEI_APP_ID=

@ -1,3 +1,5 @@
android/app/agconnect-services.json
# OSX
#
.DS_Store

@ -1,6 +1,7 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
apply plugin: 'com.huawei.agconnect' // huawei push
import com.android.build.OutputFile
@ -104,6 +105,20 @@ android {
manifestPlaceholders = [
GETUI_APPID: project.env.get("GETUI_APPID"),
MEIZU_APP_ID : "",
MEIZU_APP_KEY : "",
HUAWEI_APP_ID : project.env.get("GETUI_HUAWEI_APP_ID"),
XIAOMI_APP_ID : "",
XIAOMI_APP_KEY : "",
VIVO_APP_ID : "",
VIVO_APP_KEY : "",
OPPO_APP_KEY : "",
OPPO_APP_SECRET : ""
]
}
@ -136,6 +151,11 @@ android {
}
}
lintOptions {
// https://stackoverflow.com/questions/49286268/error-execution-failed-for-task-app-lintvitalrelease-any-one-can-solve-it
checkReleaseBuilds false
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
@ -170,6 +190,9 @@ dependencies {
} else {
implementation jscFlavor
}
// Push
implementation 'com.huawei.hms:push:6.9.0.300'
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

@ -13,10 +13,15 @@ buildscript {
repositories {
google()
mavenCentral()
maven {
url "https://developer.huawei.com/repo/"
}
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("com.huawei.agconnect:agcp:1.6.0.300")
}
}
@ -26,6 +31,10 @@ allprojects {
url "https://mvn.getui.com/nexus/content/repositories/releases/"
}
maven {
url "https://developer.huawei.com/repo/"
}
google()
mavenCentral()
}

@ -17,6 +17,9 @@ workflows:
- name: Set Android SDK location
script: |
echo "sdk.dir=$ANDROID_SDK_ROOT" > "./android/local.properties"
- name: Set Huawei AGCONNECT_SERVICES
script: |
echo $AGCONNECT_SERVICES | base64 --decode > "./android/app/agconnect-services.json"
- name: Build Android release
working_directory: client/mobile/android
script: |

Loading…
Cancel
Save