Enable stable config cache
This commit is contained in:
parent
5187b7cb04
commit
20b8ad58aa
|
@ -7,18 +7,9 @@ plugins {
|
|||
|
||||
apply from: "../instance-build.gradle"
|
||||
|
||||
def getGitSha = {
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
try {
|
||||
exec {
|
||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||
standardOutput = stdout
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return "unknown"
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
final def gitSha = providers.exec {
|
||||
commandLine('git', 'rev-parse', '--short=7', 'HEAD')
|
||||
}.standardOutput.asText.get().trim()
|
||||
|
||||
android {
|
||||
compileSdk 33
|
||||
|
@ -53,7 +44,7 @@ android {
|
|||
green {
|
||||
resValue "string", "app_name", APP_NAME + " Test"
|
||||
applicationIdSuffix ".test"
|
||||
versionNameSuffix "-" + getGitSha()
|
||||
versionNameSuffix "-" + gitSha
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,5 +15,8 @@ org.gradle.jvmargs=-Xmx4096m
|
|||
# use parallel execution
|
||||
org.gradle.parallel=true
|
||||
|
||||
# https://docs.gradle.org/7.6/userguide/configuration_cache.html
|
||||
org.gradle.unsafe.configuration-cache=true
|
||||
|
||||
android.enableR8.fullMode=true
|
||||
android.useAndroidX=true
|
||||
|
|
|
@ -14,4 +14,6 @@ dependencyResolutionManagement {
|
|||
}
|
||||
}
|
||||
|
||||
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
|
||||
|
||||
include ':app'
|
||||
|
|
Loading…
Reference in New Issue