Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34132d52 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

chore: add generic build type to thunderbird app

parent ad416379
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@ val testCoverageEnabled = hasProperty("testCoverageEnabled")
android {
    namespace = "net.thunderbird.android"

    val genericStorePassword = getProperty("GENERIC_STORE_PASSWORD").ifBlank { "generic" }
    val genericKeyAlias = getProperty("GENERIC_KEY_ALIAS").ifBlank { "generic" }
    val genericKeyPassword = getProperty("GENERIC_KEY_PASSWORD").ifBlank { "generic" }

    defaultConfig {
        applicationId = "foundation.e.mail"
        testApplicationId = "foundation.e.mail.tests"
@@ -92,6 +96,13 @@ android {
            keyAlias = "platform"
            keyPassword = "platform"
        }

        create("generic") {
            storeFile = File("${rootDir}/app/keystore/generic.jks")
            storePassword = genericStorePassword
            keyAlias = genericKeyAlias
            keyPassword = genericKeyPassword
        }
    }

    buildTypes {
@@ -162,6 +173,19 @@ android {

            buildConfigField("String", "GLEAN_RELEASE_CHANNEL", "null")
        }

        create("generic") {
            initWith(getByName("release"))
            signingConfig = signingConfigs.getByName("generic")
            matchingFallbacks += listOf("release")
        }
    }

    sourceSets {
        getByName("generic") {
            java.srcDirs("src/release/java", "src/release/kotlin")
            res.srcDirs("src/release/res")
        }
    }

    flavorDimensions += listOf("app")
@@ -213,6 +237,7 @@ val fullDebugImplementation by configurations.creating
val fullDailyImplementation by configurations.creating
val fullBetaImplementation by configurations.creating
val fullReleaseImplementation by configurations.creating
val fullGenericImplementation by configurations.creating

dependencies {
    implementation(projects.appCommon)
@@ -240,6 +265,7 @@ dependencies {
    "dailyImplementation"(projects.feature.telemetry.noop)
    "betaImplementation"(projects.feature.telemetry.noop)
    releaseImplementation(projects.feature.telemetry.noop)
    "genericImplementation"(projects.feature.telemetry.noop)

    implementation(libs.androidx.work.runtime)

@@ -255,12 +281,14 @@ dependencies {
    fullDailyImplementation(projects.feature.funding.googleplay)
    fullBetaImplementation(projects.feature.funding.googleplay)
    fullReleaseImplementation(projects.feature.funding.googleplay)
    fullGenericImplementation(projects.feature.funding.googleplay)

    implementation(projects.feature.onboarding.migration.thunderbird)
    implementation(projects.feature.migration.launcher.thunderbird)

    // TODO remove once OAuth ids have been moved from TBD to TBA
    releaseImplementation(libs.appauth)
    "genericImplementation"(libs.appauth)

    // Required for DependencyInjectionTest
    testImplementation(projects.feature.account.api)
@@ -273,10 +301,12 @@ dependencyGuard {
    configuration("fossDailyRuntimeClasspath")
    configuration("fossBetaRuntimeClasspath")
    configuration("fossReleaseRuntimeClasspath")
    configuration("fossGenericRuntimeClasspath")

    configuration("fullDailyRuntimeClasspath")
    configuration("fullBetaRuntimeClasspath")
    configuration("fullReleaseRuntimeClasspath")
    configuration("fullGenericRuntimeClasspath")
}

tasks.register("printConfigurations") {