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

Commit a85d97cf authored by Jonathan Klee's avatar Jonathan Klee
Browse files

fix(build): make gradle sync properly

parent 55b078e9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -122,7 +122,8 @@ android {

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

+19 −5
Original line number Diff line number Diff line
import java.util.Properties

plugins {
    id(ThunderbirdPlugins.App.androidCompose)
    alias(libs.plugins.dependency.guard)
@@ -7,12 +9,23 @@ plugins {

val testCoverageEnabled = hasProperty("testCoverageEnabled")

fun getLocalOrEnvProperty(property: String): String {
    return System.getenv(property) ?: run {
        val properties = Properties()
        val propertiesFile = rootProject.file("local.properties")
        if (propertiesFile.exists()) {
            propertiesFile.inputStream().use(properties::load)
        }
        properties.getProperty(property)
    } ?: ""
}

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" }
    val genericStorePassword = getLocalOrEnvProperty("GENERIC_STORE_PASSWORD").ifBlank { "generic" }
    val genericKeyAlias = getLocalOrEnvProperty("GENERIC_KEY_ALIAS").ifBlank { "generic" }
    val genericKeyPassword = getLocalOrEnvProperty("GENERIC_KEY_PASSWORD").ifBlank { "generic" }

    defaultConfig {
        applicationId = "foundation.e.mail"
@@ -183,8 +196,9 @@ android {

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

+2 −2
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ android.defaults.buildfeatures.shaders=false
# Gradle
## Ensure important default jvmargs aren't overwritten. See https://github.com/gradle/gradle/issues/19750
## To remove warnings about "Sharing is only supported for boot loader classes", these properties have been added: -XX:+IgnoreUnrecognizedVMOptions -XX:+SuppressCDSWarning
org.gradle.jvmargs=-Dfile.encoding=UTF-8,-XX:+UseG1GC,-XX:SoftRefLRUPolicyMSPerMB=1,-XX:ReservedCodeCacheSize=512m,-XX:InitialCodeCacheSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx8g,-XX:+IgnoreUnrecognizedVMOptions,-XX:+SuppressCDSWarning
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=512m -XX:InitialCodeCacheSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx8g -XX:+IgnoreUnrecognizedVMOptions -XX:+SuppressCDSWarning
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configuration-cache=true
@@ -15,4 +15,4 @@ org.gradle.kotlin.dsl.allWarningsAsErrors=true
# Kotlin
kotlin.code.style=official
kotlin.compiler.execution.strategy=in-process
kotlin.daemon.jvmargs=-Dfile.encoding=UTF-8,-XX:+UseG1GC,-XX:SoftRefLRUPolicyMSPerMB=1,-XX:ReservedCodeCacheSize=512m,-XX:InitialCodeCacheSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx8g
kotlin.daemon.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=512m -XX:InitialCodeCacheSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx8g