1
0
mirror of https://github.com/vector-im/riotX-android synced 2025-10-06 00:02:48 +02:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Adam Brown
f739ca1cc8 updating changelog copy 2022-03-30 14:13:43 +01:00
Adam Brown
56c11b1e5e adding changelog entry 2022-03-30 13:47:23 +01:00
Adam Brown
dbfebaf908 using static git information for debug build config
- avoids commits causing module invalidation, increasing the build time
2022-03-30 13:19:58 +01:00
3 changed files with 23 additions and 12 deletions

1
changelog.d/5668.misc Normal file
View File

@@ -0,0 +1 @@
Improving build speed after committing or changing branches by removing git sha information from debug builds

View File

@@ -33,10 +33,6 @@ android {
buildConfigField "String", "SDK_VERSION", "\"1.4.10\"" buildConfigField "String", "SDK_VERSION", "\"1.4.10\""
buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\""
buildConfigField "String", "GIT_SDK_REVISION_DATE", "\"${gitRevisionDate()}\""
defaultConfig { defaultConfig {
consumerProguardFiles 'proguard-rules.pro' consumerProguardFiles 'proguard-rules.pro'
} }
@@ -53,11 +49,19 @@ android {
buildConfigField "boolean", "LOG_PRIVATE_DATA", project.property("vector.debugPrivateData") buildConfigField "boolean", "LOG_PRIVATE_DATA", project.property("vector.debugPrivateData")
// Set to BODY instead of NONE to enable logging // Set to BODY instead of NONE to enable logging
buildConfigField "okhttp3.logging.HttpLoggingInterceptor.Level", "OKHTTP_LOGGING_LEVEL", "okhttp3.logging.HttpLoggingInterceptor.Level." + project.property("vector.httpLogLevel") buildConfigField "okhttp3.logging.HttpLoggingInterceptor.Level", "OKHTTP_LOGGING_LEVEL", "okhttp3.logging.HttpLoggingInterceptor.Level." + project.property("vector.httpLogLevel")
buildConfigField "String", "GIT_SDK_REVISION", "\"dev\""
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"dev\""
buildConfigField "String", "GIT_SDK_REVISION_DATE", "\"dev\""
} }
release { release {
buildConfigField "boolean", "LOG_PRIVATE_DATA", "false" buildConfigField "boolean", "LOG_PRIVATE_DATA", "false"
buildConfigField "okhttp3.logging.HttpLoggingInterceptor.Level", "OKHTTP_LOGGING_LEVEL", "okhttp3.logging.HttpLoggingInterceptor.Level.BASIC" buildConfigField "okhttp3.logging.HttpLoggingInterceptor.Level", "OKHTTP_LOGGING_LEVEL", "okhttp3.logging.HttpLoggingInterceptor.Level.BASIC"
buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\""
buildConfigField "String", "GIT_SDK_REVISION_DATE", "\"${gitRevisionDate()}\""
} }
} }

View File

@@ -131,14 +131,6 @@ android {
// Required for sonar analysis // Required for sonar analysis
versionName "${versionMajor}.${versionMinor}.${versionPatch}-sonar" versionName "${versionMajor}.${versionMinor}.${versionPatch}-sonar"
// Generate a random app task affinity
manifestPlaceholders = [appTaskAffinitySuffix:"H_${gitRevision()}"]
buildConfigField "String", "GIT_REVISION", "\"${gitRevision()}\""
buildConfigField "String", "GIT_REVISION_DATE", "\"${gitRevisionDate()}\""
buildConfigField "String", "GIT_BRANCH_NAME", "\"${gitBranchName()}\""
buildConfigField "String", "BUILD_NUMBER", "\"${buildNumber}\""
buildConfigField "im.vector.app.features.VectorFeatures.OnboardingVariant", "ONBOARDING_VARIANT", "im.vector.app.features.VectorFeatures.OnboardingVariant.FTUE_AUTH" buildConfigField "im.vector.app.features.VectorFeatures.OnboardingVariant", "ONBOARDING_VARIANT", "im.vector.app.features.VectorFeatures.OnboardingVariant.FTUE_AUTH"
buildConfigField "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy", "outboundSessionKeySharingStrategy", "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy.WhenTyping" buildConfigField "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy", "outboundSessionKeySharingStrategy", "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy.WhenTyping"
@@ -232,6 +224,13 @@ android {
buildConfigField "boolean", "ENABLE_STRICT_MODE_LOGS", "false" buildConfigField "boolean", "ENABLE_STRICT_MODE_LOGS", "false"
buildConfigField "Boolean", "ENABLE_LIVE_LOCATION_SHARING", "true" buildConfigField "Boolean", "ENABLE_LIVE_LOCATION_SHARING", "true"
// using static values to avoid cache misses on new commits
manifestPlaceholders = [appTaskAffinitySuffix: "H_aaaaaa"]
buildConfigField "String", "GIT_REVISION", "\"dev\""
buildConfigField "String", "GIT_REVISION_DATE", "\"dev\""
buildConfigField "String", "GIT_BRANCH_NAME", "\"dev\""
buildConfigField "String", "BUILD_NUMBER", "\"dev\""
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
} }
@@ -242,6 +241,13 @@ android {
buildConfigField "boolean", "ENABLE_STRICT_MODE_LOGS", "false" buildConfigField "boolean", "ENABLE_STRICT_MODE_LOGS", "false"
buildConfigField "Boolean", "ENABLE_LIVE_LOCATION_SHARING", "false" buildConfigField "Boolean", "ENABLE_LIVE_LOCATION_SHARING", "false"
manifestPlaceholders = [appTaskAffinitySuffix:"H_${gitRevision()}"]
buildConfigField "String", "GIT_REVISION", "\"${gitRevision()}\""
buildConfigField "String", "GIT_REVISION_DATE", "\"${gitRevisionDate()}\""
buildConfigField "String", "GIT_BRANCH_NAME", "\"${gitBranchName()}\""
buildConfigField "String", "BUILD_NUMBER", "\"${buildNumber}\""
postprocessing { postprocessing {
removeUnusedCode true removeUnusedCode true
removeUnusedResources true removeUnusedResources true