kopia lustrzana https://github.com/ryukoposting/Signal-Android
Add a nightly build type.
rodzic
7715917436
commit
1f28a30ace
|
@ -262,6 +262,15 @@ android {
|
||||||
buildConfigField "String", "BUILD_DISTRIBUTION_TYPE", "\"internal\""
|
buildConfigField "String", "BUILD_DISTRIBUTION_TYPE", "\"internal\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nightly {
|
||||||
|
dimension 'distribution'
|
||||||
|
versionNameSuffix "-nightly-${getDateSuffix()}"
|
||||||
|
ext.websiteUpdateUrl = "null"
|
||||||
|
buildConfigField "boolean", "PLAY_STORE_DISABLED", "false"
|
||||||
|
buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl"
|
||||||
|
buildConfigField "String", "BUILD_DISTRIBUTION_TYPE", "\"internal\""
|
||||||
|
}
|
||||||
|
|
||||||
study {
|
study {
|
||||||
dimension 'distribution'
|
dimension 'distribution'
|
||||||
|
|
||||||
|
@ -308,13 +317,17 @@ android {
|
||||||
|
|
||||||
android.applicationVariants.all { variant ->
|
android.applicationVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
output.outputFileName = output.outputFileName.replace(".apk", "-${variant.versionName}.apk")
|
if (output.baseName.contains('nightly')) {
|
||||||
def abiName = output.getFilter("ABI") ?: 'universal'
|
output.versionCodeOverride = canonicalVersionCode * postFixSize + 5
|
||||||
def postFix = abiPostFix.get(abiName, 0)
|
} else {
|
||||||
|
output.outputFileName = output.outputFileName.replace(".apk", "-${variant.versionName}.apk")
|
||||||
|
def abiName = output.getFilter("ABI") ?: 'universal'
|
||||||
|
def postFix = abiPostFix.get(abiName, 0)
|
||||||
|
|
||||||
if (postFix >= postFixSize) throw new AssertionError("postFix is too large")
|
if (postFix >= postFixSize) throw new AssertionError("postFix is too large")
|
||||||
|
|
||||||
output.versionCodeOverride = canonicalVersionCode * postFixSize + postFix
|
output.versionCodeOverride = canonicalVersionCode * postFixSize + postFix
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,6 +340,12 @@ android {
|
||||||
variant.setIgnore(true)
|
variant.setIgnore(true)
|
||||||
} else if (distribution != 'study' && buildType == 'mock') {
|
} else if (distribution != 'study' && buildType == 'mock') {
|
||||||
variant.setIgnore(true)
|
variant.setIgnore(true)
|
||||||
|
} else if (distribution == 'internal' && buildType != 'flipper' && buildType != 'perf' && buildType != 'release') {
|
||||||
|
variant.setIgnore(true)
|
||||||
|
} else if (distribution == 'nightly' && environment != 'prod') {
|
||||||
|
variant.setIgnore(true)
|
||||||
|
} else if (distribution == 'nightly' && buildType != 'flipper' && buildType != 'perf' && buildType != 'release') {
|
||||||
|
variant.setIgnore(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -600,3 +619,9 @@ def loadKeystoreProperties(filename) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def getDateSuffix() {
|
||||||
|
def date = new Date()
|
||||||
|
def formattedDate = date.format('yyyy-MM-dd-HH:mm')
|
||||||
|
return formattedDate
|
||||||
|
}
|
||||||
|
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 156 KiB |
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/nightly_background"/>
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
Ładowanie…
Reference in New Issue