Merge pull request #3025 from element-hq/feature/bma/elementEnterprise
Element enterprise (EE) foundations
This commit is contained in:
commit
6c4e7ec85e
36 changed files with 602 additions and 37 deletions
|
|
@ -17,6 +17,7 @@
|
|||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import com.android.build.api.variant.FilterConfiguration.FilterType.ABI
|
||||
import extension.allEnterpriseImpl
|
||||
import extension.allFeaturesImpl
|
||||
import extension.allLibrariesImpl
|
||||
import extension.allServicesImpl
|
||||
|
|
@ -46,7 +47,11 @@ android {
|
|||
namespace = "io.element.android.x"
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "io.element.android.x"
|
||||
applicationId = if (isEnterpriseBuild) {
|
||||
"io.element.enterprise"
|
||||
} else {
|
||||
"io.element.android.x"
|
||||
}
|
||||
targetSdk = Versions.targetSdk
|
||||
versionCode = Versions.versionCode
|
||||
versionName = Versions.versionName
|
||||
|
|
@ -99,15 +104,22 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
val baseAppName = if (isEnterpriseBuild) {
|
||||
"Element Enterprise"
|
||||
} else {
|
||||
"Element X"
|
||||
}
|
||||
logger.warnInBox("Building $baseAppName")
|
||||
|
||||
buildTypes {
|
||||
getByName("debug") {
|
||||
resValue("string", "app_name", "Element X dbg")
|
||||
resValue("string", "app_name", "$baseAppName dbg")
|
||||
applicationIdSuffix = ".debug"
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
|
||||
getByName("release") {
|
||||
resValue("string", "app_name", "Element X")
|
||||
resValue("string", "app_name", baseAppName)
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
|
||||
postprocessing {
|
||||
|
|
@ -124,7 +136,7 @@ android {
|
|||
initWith(release)
|
||||
applicationIdSuffix = ".nightly"
|
||||
versionNameSuffix = "-nightly"
|
||||
resValue("string", "app_name", "Element X nightly")
|
||||
resValue("string", "app_name", "$baseAppName nightly")
|
||||
matchingFallbacks += listOf("release")
|
||||
signingConfig = signingConfigs.getByName("nightly")
|
||||
|
||||
|
|
@ -220,6 +232,9 @@ knit {
|
|||
dependencies {
|
||||
allLibrariesImpl()
|
||||
allServicesImpl()
|
||||
if (isEnterpriseBuild) {
|
||||
allEnterpriseImpl(rootDir, logger)
|
||||
}
|
||||
allFeaturesImpl(rootDir, logger)
|
||||
implementation(projects.features.migration.api)
|
||||
implementation(projects.anvilannotations)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import com.squareup.anvil.annotations.ContributesTo
|
|||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import io.element.android.appconfig.ApplicationConfig
|
||||
import io.element.android.features.enterprise.api.EnterpriseService
|
||||
import io.element.android.features.messages.impl.timeline.components.customreaction.DefaultEmojibaseProvider
|
||||
import io.element.android.features.messages.impl.timeline.components.customreaction.EmojibaseProvider
|
||||
import io.element.android.libraries.androidutils.system.getVersionCodeFromManifest
|
||||
|
|
@ -77,13 +78,18 @@ object AppModule {
|
|||
|
||||
@Provides
|
||||
@SingleIn(AppScope::class)
|
||||
fun providesBuildMeta(@ApplicationContext context: Context, buildType: BuildType) = BuildMeta(
|
||||
fun providesBuildMeta(
|
||||
@ApplicationContext context: Context,
|
||||
buildType: BuildType,
|
||||
enterpriseService: EnterpriseService,
|
||||
) = BuildMeta(
|
||||
isDebuggable = BuildConfig.DEBUG,
|
||||
buildType = buildType,
|
||||
applicationName = ApplicationConfig.APPLICATION_NAME.takeIf { it.isNotEmpty() } ?: context.getString(R.string.app_name),
|
||||
productionApplicationName = ApplicationConfig.PRODUCTION_APPLICATION_NAME,
|
||||
desktopApplicationName = ApplicationConfig.DESKTOP_APPLICATION_NAME,
|
||||
applicationId = BuildConfig.APPLICATION_ID,
|
||||
isEnterpriseBuild = enterpriseService.isEnterpriseBuild,
|
||||
// TODO EAx Config.LOW_PRIVACY_LOG_ENABLE,
|
||||
lowPrivacyLoggingEnabled = false,
|
||||
versionName = BuildConfig.VERSION_NAME,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue