mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-16 13:01:26 +00:00
Add Huawei flavor
This commit is contained in:
parent
58cda9ba4a
commit
01e9d15872
@ -136,6 +136,13 @@ android {
|
|||||||
buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl"
|
buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
huawei {
|
||||||
|
dimension "distribution"
|
||||||
|
ext.websiteUpdateUrl = "null"
|
||||||
|
buildConfigField "boolean", "PLAY_STORE_DISABLED", "true"
|
||||||
|
buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl"
|
||||||
|
}
|
||||||
|
|
||||||
website {
|
website {
|
||||||
dimension "distribution"
|
dimension "distribution"
|
||||||
ext.websiteUpdateUrl = "https://github.com/oxen-io/session-android/releases"
|
ext.websiteUpdateUrl = "https://github.com/oxen-io/session-android/releases"
|
||||||
@ -203,6 +210,7 @@ dependencies {
|
|||||||
exclude group: 'com.google.firebase', module: 'firebase-analytics'
|
exclude group: 'com.google.firebase', module: 'firebase-analytics'
|
||||||
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
|
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
|
||||||
}
|
}
|
||||||
|
huaweiImplementation 'com.huawei.hms:push:6.7.0.300'
|
||||||
implementation 'com.google.android.exoplayer:exoplayer-core:2.9.1'
|
implementation 'com.google.android.exoplayer:exoplayer-core:2.9.1'
|
||||||
implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.1'
|
implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.1'
|
||||||
implementation 'org.conscrypt:conscrypt-android:2.0.0'
|
implementation 'org.conscrypt:conscrypt-android:2.0.0'
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
package org.thoughtcrime.securesms.notifications
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
|
||||||
|
class HuaweiPushManager(val context: Context): PushManager {
|
||||||
|
override fun refresh(force: Boolean) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package org.thoughtcrime.securesms.notifications
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import dagger.Binds
|
||||||
|
import dagger.Module
|
||||||
|
import dagger.Provides
|
||||||
|
import dagger.hilt.InstallIn
|
||||||
|
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||||
|
import dagger.hilt.components.SingletonComponent
|
||||||
|
import javax.inject.Singleton
|
||||||
|
|
||||||
|
@Module
|
||||||
|
@InstallIn(SingletonComponent::class)
|
||||||
|
object HuaweiPushModule {
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
fun provideFirebasePushManager(
|
||||||
|
@ApplicationContext context: Context,
|
||||||
|
) = HuaweiPushManager(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Module
|
||||||
|
@InstallIn(SingletonComponent::class)
|
||||||
|
abstract class FirebaseBindingModule {
|
||||||
|
@Binds
|
||||||
|
abstract fun bindPushManager(firebasePushManager: HuaweiPushManager): PushManager
|
||||||
|
}
|
@ -2,6 +2,7 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {url 'https://developer.huawei.com/repo/'}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "com.android.tools.build:gradle:$gradlePluginVersion"
|
classpath "com.android.tools.build:gradle:$gradlePluginVersion"
|
||||||
@ -12,6 +13,7 @@ buildscript {
|
|||||||
classpath files('libs/gradle-witness.jar')
|
classpath files('libs/gradle-witness.jar')
|
||||||
classpath "com.squareup:javapoet:1.13.0"
|
classpath "com.squareup:javapoet:1.13.0"
|
||||||
classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerVersion"
|
classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerVersion"
|
||||||
|
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,6 +57,7 @@ allprojects {
|
|||||||
}
|
}
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
|
maven { url 'https://developer.huawei.com/repo/' }
|
||||||
}
|
}
|
||||||
|
|
||||||
project.ext {
|
project.ext {
|
||||||
|
@ -2,6 +2,7 @@ plugins {
|
|||||||
id 'com.android.library'
|
id 'com.android.library'
|
||||||
id 'kotlin-android'
|
id 'kotlin-android'
|
||||||
id 'kotlinx-serialization'
|
id 'kotlinx-serialization'
|
||||||
|
id 'com.huawei.agconnect'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user