Remove Huawei Mobile Services
This commit is contained in:
parent
ad7cdbb2b7
commit
aeb62c0304
11 changed files with 0 additions and 229 deletions
36
.github/workflows/deploy-store.yml
vendored
36
.github/workflows/deploy-store.yml
vendored
|
@ -41,39 +41,3 @@ jobs:
|
|||
DASHBOARD_TILE_AD_ID: ${{ secrets.DASHBOARD_TILE_AD_ID }}
|
||||
SET_BUILD_TIMESTAMP: ${{ secrets.SET_BUILD_TIMESTAMP }}
|
||||
run: ./gradlew publishPlayReleaseApps --stacktrace;
|
||||
|
||||
deploy-app-gallery:
|
||||
name: AppGallery
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
environment: app-gallery
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: 17
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
|
||||
- name: Decrypt keys
|
||||
env:
|
||||
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
||||
SERVICES_ENCRYPT_KEY: ${{ secrets.SERVICES_ENCRYPT_KEY }}
|
||||
run: |
|
||||
gpg --yes --batch --passphrase=$SERVICES_ENCRYPT_KEY ./app/src/release/agconnect-services.json.gpg
|
||||
gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/upload-key.jks.gpg
|
||||
- name: Prepare credentials
|
||||
env:
|
||||
AGC_CREDENTIALS: ${{ secrets.AGC_CREDENTIALS }}
|
||||
run: echo $AGC_CREDENTIALS > ./app/src/release/agconnect-credentials.json
|
||||
- name: Build and publish HMS version
|
||||
env:
|
||||
PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }}
|
||||
PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }}
|
||||
PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }}
|
||||
SET_BUILD_TIMESTAMP: ${{ secrets.SET_BUILD_TIMESTAMP }}
|
||||
run: ./gradlew bundleHmsRelease --stacktrace && ./gradlew publishHuaweiAppGalleryHmsRelease --stacktrace
|
||||
|
|
26
.github/workflows/test.yml
vendored
26
.github/workflows/test.yml
vendored
|
@ -62,29 +62,3 @@ jobs:
|
|||
- uses: codecov/codecov-action@v3
|
||||
with:
|
||||
flags: unit
|
||||
|
||||
tests-hms:
|
||||
name: HMS
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: fkirc/skip-duplicate-actions@master
|
||||
- uses: actions/checkout@v3
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: 17
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
|
||||
- name: Unit tests
|
||||
run: |
|
||||
./gradlew testHmsDebugUnitTest --stacktrace
|
||||
./gradlew jacocoTestReport --stacktrace
|
||||
- uses: codecov/codecov-action@v3
|
||||
with:
|
||||
flags: unit
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import com.github.triplet.gradle.androidpublisher.ReleaseStatus
|
||||
import ru.cian.huawei.publish.ReleaseNote
|
||||
|
||||
apply plugin: "com.android.application"
|
||||
apply plugin: "kotlin-android"
|
||||
|
@ -9,9 +8,7 @@ apply plugin: "com.google.devtools.ksp"
|
|||
apply plugin: "dagger.hilt.android.plugin"
|
||||
apply plugin: "com.google.gms.google-services"
|
||||
apply plugin: "com.github.triplet.play"
|
||||
apply plugin: "ru.cian.huawei-publish"
|
||||
apply plugin: "com.mikepenz.aboutlibraries.plugin"
|
||||
apply plugin: "com.huawei.agconnect"
|
||||
apply plugin: "kotlin-kapt"
|
||||
apply from: "jacoco.gradle"
|
||||
apply from: "sonarqube.gradle"
|
||||
|
@ -74,11 +71,6 @@ android {
|
|||
flavorDimensions += "platform"
|
||||
|
||||
productFlavors {
|
||||
hms {
|
||||
dimension "platform"
|
||||
manifestPlaceholders = [install_channel: "AppGallery"]
|
||||
}
|
||||
|
||||
play {
|
||||
dimension "platform"
|
||||
manifestPlaceholders = [
|
||||
|
@ -154,22 +146,6 @@ play {
|
|||
enabled.set(false)
|
||||
}
|
||||
|
||||
huaweiPublish {
|
||||
instances {
|
||||
hmsRelease {
|
||||
credentialsPath = "$rootDir/app/src/release/agconnect-credentials.json"
|
||||
buildFormat = "aab"
|
||||
deployType = "publish"
|
||||
releaseNotes = [
|
||||
new ReleaseNote(
|
||||
"pl-PL",
|
||||
"$projectDir/src/main/play/release-notes/pl-PL/default.txt"
|
||||
)
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
work_manager = "2.9.0"
|
||||
android_hilt = "1.2.0"
|
||||
|
@ -242,9 +218,6 @@ dependencies {
|
|||
playImplementation "com.google.android.play:app-update-ktx:2.1.0"
|
||||
playImplementation "com.google.android.play:review-ktx:2.0.1"
|
||||
|
||||
hmsImplementation "com.huawei.hms:hianalytics:6.12.0.301"
|
||||
hmsImplementation "com.huawei.agconnect:agconnect-crash:1.9.1.303"
|
||||
|
||||
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:$chucker"
|
||||
|
||||
debugImplementation "com.github.chuckerteam.chucker:library:$chucker"
|
||||
|
|
12
app/proguard-rules.pro
vendored
12
app/proguard-rules.pro
vendored
|
@ -26,17 +26,5 @@
|
|||
#Config for Material Components
|
||||
-keep class com.google.android.material.tabs.** { *; }
|
||||
|
||||
|
||||
#Config for HMS SDK
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes Exceptions
|
||||
-keepattributes InnerClasses
|
||||
-keepattributes Signature
|
||||
-keep class com.huawei.agconnect.**{*;}
|
||||
-keep class com.huawei.hianalytics.**{*;}
|
||||
-keep class com.huawei.updatesdk.**{*;}
|
||||
-keep class com.huawei.hms.**{*;}
|
||||
|
||||
|
||||
#Config for Wulkanowy SDK
|
||||
-keep,allowobfuscation,allowshrinking class retrofit2.Response
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
package io.github.wulkanowy.utils
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import com.huawei.agconnect.crash.AGConnectCrash
|
||||
import com.huawei.hms.analytics.HiAnalytics
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import io.github.wulkanowy.data.repositories.PreferencesRepository
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
class AnalyticsHelper @Inject constructor(
|
||||
@ApplicationContext private val context: Context,
|
||||
preferencesRepository: PreferencesRepository,
|
||||
appInfo: AppInfo,
|
||||
) {
|
||||
|
||||
private val analytics by lazy { HiAnalytics.getInstance(context) }
|
||||
|
||||
private val connectCrash by lazy { AGConnectCrash.getInstance() }
|
||||
|
||||
init {
|
||||
if (!appInfo.isDebug) {
|
||||
connectCrash.setUserId(preferencesRepository.installationId)
|
||||
}
|
||||
}
|
||||
|
||||
fun logEvent(name: String, vararg params: Pair<String, Any?>) {
|
||||
Bundle().apply {
|
||||
params.forEach { (key, value) ->
|
||||
if (value == null) return@forEach
|
||||
when (value) {
|
||||
is String -> putString(key, value)
|
||||
is Int -> putInt(key, value)
|
||||
is Boolean -> putBoolean(key, value)
|
||||
}
|
||||
}
|
||||
analytics.onEvent(name, this)
|
||||
}
|
||||
}
|
||||
|
||||
fun setCurrentScreen(activity: Activity, name: String?) {
|
||||
analytics.pageStart(name, activity::class.simpleName)
|
||||
}
|
||||
|
||||
fun popCurrentScreen(name: String?) {
|
||||
analytics.pageEnd(name)
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
package io.github.wulkanowy.utils
|
||||
|
||||
import android.util.Log
|
||||
import com.huawei.agconnect.crash.AGConnectCrash
|
||||
import fr.bipi.treessence.base.FormatterPriorityTree
|
||||
import fr.bipi.treessence.common.StackTraceRecorder
|
||||
|
||||
class CrashLogTree : FormatterPriorityTree(Log.VERBOSE) {
|
||||
|
||||
private val connectCrash by lazy { AGConnectCrash.getInstance() }
|
||||
|
||||
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
|
||||
if (skipLog(priority, tag, message, t)) return
|
||||
|
||||
connectCrash.log(format(priority, tag, message))
|
||||
}
|
||||
}
|
||||
|
||||
class CrashLogExceptionTree : FormatterPriorityTree(Log.ERROR, ExceptionFilter) {
|
||||
|
||||
private val connectCrash by lazy { AGConnectCrash.getInstance() }
|
||||
|
||||
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
|
||||
if (skipLog(priority, tag, message, t)) return
|
||||
|
||||
if (t != null) {
|
||||
connectCrash.recordException(t)
|
||||
} else {
|
||||
connectCrash.recordException(StackTraceRecorder(format(priority, tag, message)))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
package io.github.wulkanowy.utils
|
||||
|
||||
import android.content.Context
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
@Suppress("UNUSED_PARAMETER", "unused")
|
||||
class InAppReviewHelper @Inject constructor(
|
||||
@ApplicationContext private val context: Context
|
||||
) {
|
||||
|
||||
fun showInAppReview(activity: MainActivity) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package io.github.wulkanowy.utils
|
||||
|
||||
import android.view.View
|
||||
import javax.inject.Inject
|
||||
|
||||
class InAppUpdateHelper @Inject constructor() {
|
||||
|
||||
lateinit var messageContainer: View
|
||||
|
||||
fun checkAndInstallUpdates() {}
|
||||
|
||||
fun onResume() {}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package io.github.wulkanowy.utils
|
||||
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
class RemoteConfigHelper @Inject constructor() : BaseRemoteConfigHelper()
|
|
@ -8,7 +8,6 @@ buildscript {
|
|||
mavenCentral()
|
||||
google()
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
maven { url "https://developer.huawei.com/repo/" }
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
@ -17,9 +16,7 @@ buildscript {
|
|||
classpath 'com.android.tools.build:gradle:8.5.1'
|
||||
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
|
||||
classpath 'com.google.gms:google-services:4.4.2'
|
||||
classpath 'com.huawei.agconnect:agcp:1.9.1.303'
|
||||
classpath "com.github.triplet.gradle:play-publisher:3.8.4"
|
||||
classpath "ru.cian:huawei-publish-gradle-plugin:1.4.2"
|
||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:5.0.0.4638"
|
||||
classpath "gradle.plugin.com.star-zero.gradle:githook:1.2.0"
|
||||
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$about_libraries"
|
||||
|
@ -33,6 +30,5 @@ allprojects {
|
|||
google()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
|
||||
maven { url "https://developer.huawei.com/repo/" }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,6 @@ kotlin.code.style=official
|
|||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.nonTransitiveRClass=false
|
||||
#
|
||||
# https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-common-faq-0000001063210244#section17273113244910
|
||||
apmsInstrumentationEnabled=false
|
||||
|
||||
# https://community.sonarsource.com/t/sonarscanner-for-gradle-you-can-now-decide-when-to-compile/102069/2
|
||||
systemProp.sonar.gradle.skipCompile=true
|
||||
|
|
Loading…
Reference in a new issue