2022-12-08 12:57:35 -04:00
|
|
|
import com.android.build.api.dsl.ManagedVirtualDevice
|
|
|
|
|
2014-07-23 15:40:45 -07:00
|
|
|
apply plugin: 'com.android.application'
|
2021-04-13 17:12:54 -04:00
|
|
|
apply plugin: 'kotlin-android'
|
2019-11-04 09:03:18 -05:00
|
|
|
apply plugin: 'com.google.protobuf'
|
2019-10-16 18:37:08 -04:00
|
|
|
apply plugin: 'androidx.navigation.safeargs'
|
2021-04-13 17:12:54 -04:00
|
|
|
apply plugin: 'org.jlleitschuh.gradle.ktlint'
|
2019-11-07 08:58:27 -05:00
|
|
|
apply from: 'translations.gradle'
|
2021-06-24 13:52:54 -03:00
|
|
|
apply plugin: 'org.jetbrains.kotlin.android'
|
|
|
|
apply plugin: 'app.cash.exhaustive'
|
2021-09-28 16:55:07 -03:00
|
|
|
apply plugin: 'kotlin-parcelize'
|
2022-03-02 14:32:24 -05:00
|
|
|
apply from: 'static-ips.gradle'
|
2013-10-10 13:52:24 -07:00
|
|
|
|
|
|
|
repositories {
|
2021-08-18 10:16:54 -04:00
|
|
|
maven {
|
2022-12-15 12:53:46 -05:00
|
|
|
url "https://raw.githubusercontent.com/signalapp/maven/master/sqlcipher/release/"
|
2021-08-18 10:16:54 -04:00
|
|
|
content {
|
|
|
|
includeGroupByRegex "org\\.signal.*"
|
|
|
|
}
|
|
|
|
}
|
2021-09-12 13:01:18 -04:00
|
|
|
|
2018-10-24 16:57:19 -07:00
|
|
|
google()
|
2019-11-04 09:03:18 -05:00
|
|
|
mavenCentral()
|
2015-03-02 08:25:19 -08:00
|
|
|
mavenLocal()
|
2021-04-06 13:03:33 -03:00
|
|
|
maven {
|
|
|
|
url "https://dl.cloudsmith.io/qxAgwaeEE1vN8aLU/mobilecoin/mobilecoin/maven/"
|
|
|
|
}
|
2021-08-06 07:09:43 -07:00
|
|
|
jcenter {
|
|
|
|
content {
|
|
|
|
includeVersion "mobi.upod", "time-duration-picker", "1.1.3"
|
|
|
|
}
|
|
|
|
}
|
2013-10-10 13:52:24 -07:00
|
|
|
}
|
|
|
|
|
2019-11-04 09:03:18 -05:00
|
|
|
protobuf {
|
|
|
|
protoc {
|
2021-12-30 00:15:16 -05:00
|
|
|
artifact = 'com.google.protobuf:protoc:3.18.0'
|
2019-11-04 09:03:18 -05:00
|
|
|
}
|
|
|
|
generateProtoTasks {
|
|
|
|
all().each { task ->
|
|
|
|
task.builtins {
|
|
|
|
java {
|
|
|
|
option "lite"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-12 12:04:07 -05:00
|
|
|
ktlint {
|
|
|
|
// Use a newer version to resolve https://github.com/JLLeitschuh/ktlint-gradle/issues/507
|
|
|
|
version = "0.43.2"
|
|
|
|
}
|
|
|
|
|
2023-01-24 14:01:08 -05:00
|
|
|
def canonicalVersionCode = 1199
|
|
|
|
def canonicalVersionName = "6.9.2"
|
2019-05-28 19:57:06 -03:00
|
|
|
|
2021-01-09 14:47:31 -05:00
|
|
|
def postFixSize = 100
|
2019-09-30 11:04:12 -04:00
|
|
|
def abiPostFix = ['universal' : 0,
|
|
|
|
'armeabi-v7a' : 1,
|
2019-05-28 19:57:06 -03:00
|
|
|
'arm64-v8a' : 2,
|
|
|
|
'x86' : 3,
|
2019-09-30 11:04:12 -04:00
|
|
|
'x86_64' : 4]
|
2019-05-01 09:00:26 -07:00
|
|
|
|
2020-11-02 17:31:32 -04:00
|
|
|
def keystores = [ 'debug' : loadKeystoreProperties('keystore.debug.properties') ]
|
2020-11-02 08:18:50 -05:00
|
|
|
|
2021-08-19 12:57:23 -04:00
|
|
|
def selectableVariants = [
|
2022-02-14 14:18:03 -05:00
|
|
|
'nightlyProdSpinner',
|
2021-08-19 12:57:23 -04:00
|
|
|
'nightlyProdPerf',
|
|
|
|
'nightlyProdRelease',
|
|
|
|
'playProdDebug',
|
2022-02-14 14:18:03 -05:00
|
|
|
'playProdSpinner',
|
2021-08-19 12:57:23 -04:00
|
|
|
'playProdPerf',
|
2022-07-15 12:49:12 -03:00
|
|
|
'playProdInstrumentation',
|
2021-08-19 12:57:23 -04:00
|
|
|
'playProdRelease',
|
|
|
|
'playStagingDebug',
|
2022-02-14 14:18:03 -05:00
|
|
|
'playStagingSpinner',
|
2021-08-19 12:57:23 -04:00
|
|
|
'playStagingPerf',
|
2022-07-15 12:49:12 -03:00
|
|
|
'playStagingInstrumentation',
|
2021-08-19 12:57:23 -04:00
|
|
|
'playStagingRelease',
|
2022-02-14 14:18:03 -05:00
|
|
|
'websiteProdSpinner',
|
2021-08-19 12:57:23 -04:00
|
|
|
'websiteProdRelease',
|
|
|
|
]
|
|
|
|
|
2013-10-10 13:52:24 -07:00
|
|
|
android {
|
2020-12-03 13:19:03 -05:00
|
|
|
buildToolsVersion BUILD_TOOL_VERSION
|
|
|
|
compileSdkVersion COMPILE_SDK
|
|
|
|
|
2020-11-02 17:31:32 -04:00
|
|
|
flavorDimensions 'distribution', 'environment'
|
2016-12-11 13:37:22 -08:00
|
|
|
useLibrary 'org.apache.http.legacy'
|
2022-07-15 12:49:12 -03:00
|
|
|
testBuildType 'instrumentation'
|
2013-10-10 13:52:24 -07:00
|
|
|
|
2021-04-28 15:22:13 -04:00
|
|
|
kotlinOptions {
|
2021-06-24 13:52:54 -03:00
|
|
|
jvmTarget = "1.8"
|
2021-04-28 15:22:13 -04:00
|
|
|
freeCompilerArgs = ["-Xallow-result-return-type"]
|
|
|
|
}
|
|
|
|
|
2020-09-18 16:52:11 -03:00
|
|
|
signingConfigs {
|
2020-11-02 17:31:32 -04:00
|
|
|
if (keystores.debug != null) {
|
2020-11-02 08:18:50 -05:00
|
|
|
debug {
|
2020-11-02 17:31:32 -04:00
|
|
|
storeFile file("${project.rootDir}/${keystores.debug.storeFile}")
|
|
|
|
storePassword keystores.debug.storePassword
|
|
|
|
keyAlias keystores.debug.keyAlias
|
|
|
|
keyPassword keystores.debug.keyPassword
|
2020-11-02 08:18:50 -05:00
|
|
|
}
|
2020-09-18 16:52:11 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-17 15:55:54 -05:00
|
|
|
testOptions {
|
|
|
|
execution 'ANDROIDX_TEST_ORCHESTRATOR'
|
|
|
|
|
|
|
|
unitTests {
|
|
|
|
includeAndroidResources = true
|
|
|
|
}
|
2022-12-07 19:47:05 -05:00
|
|
|
|
|
|
|
managedDevices {
|
|
|
|
devices {
|
2022-12-08 12:57:35 -04:00
|
|
|
pixel3api30 (ManagedVirtualDevice) {
|
2022-12-07 19:47:05 -05:00
|
|
|
device = "Pixel 3"
|
|
|
|
apiLevel = 30
|
|
|
|
systemImageSource = "google-atd"
|
|
|
|
require64Bit = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-02-17 15:55:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
checkReleaseBuilds false
|
|
|
|
abortOnError true
|
|
|
|
baseline file("lint-baseline.xml")
|
|
|
|
disable "LintError"
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
test {
|
|
|
|
java.srcDirs += "$projectDir/src/testShared"
|
|
|
|
}
|
|
|
|
|
|
|
|
androidTest {
|
|
|
|
java.srcDirs += "$projectDir/src/testShared"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
coreLibraryDesugaringEnabled true
|
|
|
|
sourceCompatibility JAVA_VERSION
|
|
|
|
targetCompatibility JAVA_VERSION
|
|
|
|
}
|
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
exclude 'LICENSE.txt'
|
|
|
|
exclude 'LICENSE'
|
|
|
|
exclude 'NOTICE'
|
|
|
|
exclude 'asm-license.txt'
|
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/NOTICE'
|
|
|
|
exclude 'META-INF/proguard/androidx-annotations.pro'
|
2022-06-09 12:00:24 -04:00
|
|
|
exclude 'libsignal_jni.dylib'
|
|
|
|
exclude 'signal_jni.dll'
|
2022-02-17 15:55:54 -05:00
|
|
|
}
|
|
|
|
|
2022-08-09 13:29:04 -03:00
|
|
|
buildFeatures {
|
|
|
|
viewBinding true
|
|
|
|
}
|
2022-02-17 15:55:54 -05:00
|
|
|
|
2013-10-10 13:52:24 -07:00
|
|
|
defaultConfig {
|
2019-05-28 19:57:06 -03:00
|
|
|
versionCode canonicalVersionCode * postFixSize
|
|
|
|
versionName canonicalVersionName
|
2017-02-26 14:36:43 -08:00
|
|
|
|
2020-12-03 13:19:03 -05:00
|
|
|
minSdkVersion MINIMUM_SDK
|
|
|
|
targetSdkVersion TARGET_SDK
|
|
|
|
|
2017-01-08 09:43:43 -08:00
|
|
|
multiDexEnabled true
|
2015-01-11 20:27:34 -08:00
|
|
|
|
2016-11-21 18:58:10 -08:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2022-12-08 12:57:35 -04:00
|
|
|
project.ext.set("archivesBaseName", "Signal")
|
2016-11-21 18:58:10 -08:00
|
|
|
|
2022-08-04 13:21:11 -04:00
|
|
|
manifestPlaceholders = [mapsKey:"AIzaSyCSx9xea86GwDKGznCAULE9Y5a8b-TfN9U"]
|
|
|
|
|
2016-02-17 11:27:35 -08:00
|
|
|
buildConfigField "long", "BUILD_TIMESTAMP", getLastCommitTimestamp() + "L"
|
2021-02-05 15:18:11 -05:00
|
|
|
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
|
2021-12-07 14:10:18 -06:00
|
|
|
buildConfigField "String", "SIGNAL_URL", "\"https://chat.signal.org\""
|
2019-09-26 10:12:51 -04:00
|
|
|
buildConfigField "String", "STORAGE_URL", "\"https://storage.signal.org\""
|
2017-08-08 16:37:15 -07:00
|
|
|
buildConfigField "String", "SIGNAL_CDN_URL", "\"https://cdn.signal.org\""
|
2020-04-05 17:32:06 -07:00
|
|
|
buildConfigField "String", "SIGNAL_CDN2_URL", "\"https://cdn2.signal.org\""
|
2018-07-18 08:27:05 -07:00
|
|
|
buildConfigField "String", "SIGNAL_CONTACT_DISCOVERY_URL", "\"https://api.directory.signal.org\""
|
2022-08-10 11:06:21 -04:00
|
|
|
buildConfigField "String", "SIGNAL_CDSI_URL", "\"https://cdsi.signal.org\""
|
2018-06-11 09:37:01 -07:00
|
|
|
buildConfigField "String", "SIGNAL_SERVICE_STATUS_URL", "\"uptime.signal.org\""
|
2019-12-03 12:31:23 -05:00
|
|
|
buildConfigField "String", "SIGNAL_KEY_BACKUP_URL", "\"https://api.backup.signal.org\""
|
2020-11-20 15:42:46 -05:00
|
|
|
buildConfigField "String", "SIGNAL_SFU_URL", "\"https://sfu.voip.signal.org\""
|
2022-11-18 13:50:03 -05:00
|
|
|
buildConfigField "String", "SIGNAL_STAGING_SFU_URL", "\"https://sfu.staging.voip.signal.org\""
|
2022-10-25 10:18:15 -04:00
|
|
|
buildConfigField "String[]", "SIGNAL_SFU_INTERNAL_NAMES", "new String[]{\"Test\", \"Staging\", \"Development\"}"
|
|
|
|
buildConfigField "String[]", "SIGNAL_SFU_INTERNAL_URLS", "new String[]{\"https://sfu.test.voip.signal.org\", \"https://sfu.staging.voip.signal.org\", \"https://sfu.staging.test.voip.signal.org\"}"
|
2019-01-15 00:41:05 -08:00
|
|
|
buildConfigField "String", "CONTENT_PROXY_HOST", "\"contentproxy.signal.org\""
|
|
|
|
buildConfigField "int", "CONTENT_PROXY_PORT", "443"
|
2022-03-02 14:32:24 -05:00
|
|
|
buildConfigField "String[]", "SIGNAL_SERVICE_IPS", service_ips
|
|
|
|
buildConfigField "String[]", "SIGNAL_STORAGE_IPS", storage_ips
|
|
|
|
buildConfigField "String[]", "SIGNAL_CDN_IPS", cdn_ips
|
|
|
|
buildConfigField "String[]", "SIGNAL_CDN2_IPS", cdn2_ips
|
|
|
|
buildConfigField "String[]", "SIGNAL_CDS_IPS", cds_ips
|
|
|
|
buildConfigField "String[]", "SIGNAL_KBS_IPS", kbs_ips
|
|
|
|
buildConfigField "String[]", "SIGNAL_SFU_IPS", sfu_ips
|
|
|
|
buildConfigField "String[]", "SIGNAL_CONTENT_PROXY_IPS", content_proxy_ips
|
2020-01-23 11:28:17 -05:00
|
|
|
buildConfigField "String", "SIGNAL_AGENT", "\"OWA\""
|
2022-08-05 17:27:10 -04:00
|
|
|
buildConfigField "String", "CDS_MRENCLAVE", "\"74778bb0f93ae1f78c26e67152bab0bbeb693cd56d1bb9b4e9244157acc58081\""
|
2022-08-17 18:23:40 -04:00
|
|
|
buildConfigField "String", "CDSI_MRENCLAVE", "\"ef4787a56a154ac6d009138cac17155acd23cfe4329281252365dd7c252e7fbf\""
|
2022-08-24 12:05:46 -04:00
|
|
|
buildConfigField "org.thoughtcrime.securesms.KbsEnclave", "KBS_ENCLAVE", "new org.thoughtcrime.securesms.KbsEnclave(\"e18376436159cda3ad7a45d9320e382e4a497f26b0dca34d8eab0bd0139483b5\", " +
|
|
|
|
"\"3a485adb56e2058ef7737764c738c4069dd62bc457637eafb6bbce1ce29ddb89\", " +
|
|
|
|
"\"45627094b2ea4a66f4cf0b182858a8dcf4b8479122c3820fe7fd0551a6d4cf5c\")"
|
|
|
|
buildConfigField "org.thoughtcrime.securesms.KbsEnclave[]", "KBS_FALLBACKS", "new org.thoughtcrime.securesms.KbsEnclave[] { new org.thoughtcrime.securesms.KbsEnclave(\"0cedba03535b41b67729ce9924185f831d7767928a1d1689acb689bc079c375f\", " +
|
|
|
|
"\"187d2739d22be65e74b65f0055e74d31310e4267e5fac2b1246cc8beba81af39\", " +
|
|
|
|
"\"ee19f1965b1eefa3dc4204eb70c04f397755f771b8c1909d080c04dad2a6a9ba\") }"
|
2018-10-11 16:45:22 -07:00
|
|
|
buildConfigField "String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF\""
|
2022-07-11 15:20:00 -04:00
|
|
|
buildConfigField "String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X36nOoGPs54XsEGzPdEV+itQNGUFEjY6X9Uv+Acuks7NpyGvCoKxGwgKgE5XyJ+nNKlyHHOLb6N1NuHyBrZrgtY/JYJHRooo5CEqYKBqdFnmbTVGEkCvJKxLnjwKWf+fEPoWeQFj5ObDjcKMZf2Jm2Ae69x+ikU5gBXsRmoF94GXTLfN0/vLt98KDPnxwAQL9j5V1jGOY8jQl6MLxEs56cwXN0dqCnImzVH3TZT1cJ8SW1BRX6qIVxEzjsSGx3yxF3suAilPMqGRp4ffyopjMD1JXiKR2RwLKzizUe5e8XyGOy9fplzhw3jVzTRyUZTRSZKkMLWcQ/gv0E4aONNqs4P\""
|
2019-03-14 13:33:43 -03:00
|
|
|
buildConfigField "String[]", "LANGUAGES", "new String[]{\"" + autoResConfig().collect { s -> s.replace('-r', '_') }.join('", "') + '"}'
|
2019-05-28 19:57:06 -03:00
|
|
|
buildConfigField "int", "CANONICAL_VERSION_CODE", "$canonicalVersionCode"
|
2021-04-06 13:03:33 -03:00
|
|
|
buildConfigField "String", "DEFAULT_CURRENCIES", "\"EUR,AUD,GBP,CAD,CNY\""
|
2021-05-05 09:59:05 -03:00
|
|
|
buildConfigField "String", "GIPHY_API_KEY", "\"3o6ZsYH6U6Eri53TXy\""
|
2022-03-03 10:43:51 -08:00
|
|
|
buildConfigField "String", "SIGNAL_CAPTCHA_URL", "\"https://signalcaptchas.org/registration/generate.html\""
|
2021-05-05 12:49:18 -04:00
|
|
|
buildConfigField "String", "RECAPTCHA_PROOF_URL", "\"https://signalcaptchas.org/challenge/generate.html\""
|
2018-02-02 16:31:49 -08:00
|
|
|
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_DISTRIBUTION_TYPE", "\"unset\""
|
|
|
|
buildConfigField "String", "BUILD_ENVIRONMENT_TYPE", "\"unset\""
|
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"unset\""
|
2021-09-28 16:55:07 -03:00
|
|
|
buildConfigField "String", "BADGE_STATIC_ROOT", "\"https://updates2.signal.org/static/badges/\""
|
2021-10-21 16:39:02 -03:00
|
|
|
buildConfigField "String", "STRIPE_PUBLISHABLE_KEY", "\"pk_live_6cmGZopuTsV8novGgJJW9JpC00vLIgtQ1D\""
|
2021-06-16 00:55:24 -04:00
|
|
|
|
2018-02-02 16:31:49 -08:00
|
|
|
ndk {
|
2019-05-28 19:57:06 -03:00
|
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
2018-02-02 16:31:49 -08:00
|
|
|
}
|
2019-03-14 13:33:43 -03:00
|
|
|
|
|
|
|
resConfigs autoResConfig()
|
2019-03-28 17:21:57 -03:00
|
|
|
|
|
|
|
splits {
|
|
|
|
abi {
|
|
|
|
enable true
|
|
|
|
reset()
|
2019-05-28 19:57:06 -03:00
|
|
|
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
2019-03-28 17:21:57 -03:00
|
|
|
universalApk true
|
|
|
|
}
|
|
|
|
}
|
2020-01-22 15:02:06 -05:00
|
|
|
|
2022-08-03 11:50:16 -04:00
|
|
|
testInstrumentationRunner "org.thoughtcrime.securesms.testing.SignalTestRunner"
|
2021-10-15 10:18:38 -04:00
|
|
|
testInstrumentationRunnerArguments clearPackageData: 'true'
|
|
|
|
}
|
|
|
|
|
2013-10-10 13:52:24 -07:00
|
|
|
buildTypes {
|
2015-01-11 20:27:34 -08:00
|
|
|
debug {
|
2020-11-02 08:18:50 -05:00
|
|
|
if (keystores['debug'] != null) {
|
|
|
|
signingConfig signingConfigs.debug
|
|
|
|
}
|
2020-11-02 17:31:32 -04:00
|
|
|
isDefault true
|
2022-01-10 10:13:23 -05:00
|
|
|
minifyEnabled false
|
2015-04-01 18:04:23 -07:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
2019-11-20 12:33:57 -05:00
|
|
|
'proguard/proguard-firebase-messaging.pro',
|
|
|
|
'proguard/proguard-google-play-services.pro',
|
|
|
|
'proguard/proguard-jackson.pro',
|
|
|
|
'proguard/proguard-sqlite.pro',
|
|
|
|
'proguard/proguard-appcompat-v7.pro',
|
|
|
|
'proguard/proguard-square-okhttp.pro',
|
|
|
|
'proguard/proguard-square-okio.pro',
|
|
|
|
'proguard/proguard-rounded-image-view.pro',
|
|
|
|
'proguard/proguard-glide.pro',
|
|
|
|
'proguard/proguard-shortcutbadger.pro',
|
|
|
|
'proguard/proguard-retrofit.pro',
|
|
|
|
'proguard/proguard-webrtc.pro',
|
|
|
|
'proguard/proguard-klinker.pro',
|
2023-01-17 06:37:45 -08:00
|
|
|
'proguard/proguard-mobilecoin.pro',
|
2019-11-20 12:33:57 -05:00
|
|
|
'proguard/proguard-retrolambda.pro',
|
|
|
|
'proguard/proguard-okhttp.pro',
|
|
|
|
'proguard/proguard-ez-vcard.pro',
|
|
|
|
'proguard/proguard.cfg'
|
|
|
|
testProguardFiles 'proguard/proguard-automation.pro',
|
|
|
|
'proguard/proguard.cfg'
|
2021-06-16 00:55:24 -04:00
|
|
|
|
2022-08-04 13:21:11 -04:00
|
|
|
manifestPlaceholders = [mapsKey:getMapsKey()]
|
|
|
|
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Debug\""
|
2015-01-11 20:27:34 -08:00
|
|
|
}
|
2022-07-15 12:49:12 -03:00
|
|
|
|
|
|
|
instrumentation {
|
|
|
|
initWith debug
|
|
|
|
isDefault false
|
|
|
|
minifyEnabled false
|
|
|
|
matchingFallbacks = ['debug']
|
|
|
|
applicationIdSuffix ".instrumentation"
|
|
|
|
|
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Instrumentation\""
|
|
|
|
}
|
|
|
|
|
2022-02-14 14:18:03 -05:00
|
|
|
spinner {
|
2020-03-01 10:54:11 -05:00
|
|
|
initWith debug
|
2020-11-02 17:31:32 -04:00
|
|
|
isDefault false
|
2020-03-01 10:54:11 -05:00
|
|
|
minifyEnabled false
|
2020-12-03 13:19:03 -05:00
|
|
|
matchingFallbacks = ['debug']
|
2022-02-14 14:18:03 -05:00
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Spinner\""
|
2020-03-01 10:54:11 -05:00
|
|
|
}
|
2013-10-10 13:52:24 -07:00
|
|
|
release {
|
2015-01-20 21:26:58 -10:00
|
|
|
minifyEnabled true
|
2015-05-15 11:54:56 -07:00
|
|
|
proguardFiles = buildTypes.debug.proguardFiles
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Release\""
|
2013-10-10 13:52:24 -07:00
|
|
|
}
|
2020-12-20 13:28:55 -05:00
|
|
|
perf {
|
|
|
|
initWith debug
|
|
|
|
isDefault false
|
|
|
|
debuggable false
|
2022-01-10 10:13:23 -05:00
|
|
|
minifyEnabled true
|
2020-12-20 13:28:55 -05:00
|
|
|
matchingFallbacks = ['debug']
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Perf\""
|
2020-12-20 13:28:55 -05:00
|
|
|
}
|
2013-10-10 13:52:24 -07:00
|
|
|
}
|
2014-01-10 16:20:25 -10:00
|
|
|
|
2017-02-26 14:36:43 -08:00
|
|
|
productFlavors {
|
|
|
|
play {
|
2020-11-02 17:31:32 -04:00
|
|
|
dimension 'distribution'
|
|
|
|
isDefault true
|
2017-02-26 14:36:43 -08:00
|
|
|
ext.websiteUpdateUrl = "null"
|
|
|
|
buildConfigField "boolean", "PLAY_STORE_DISABLED", "false"
|
|
|
|
buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl"
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_DISTRIBUTION_TYPE", "\"play\""
|
2017-02-26 14:36:43 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
website {
|
2020-11-02 17:31:32 -04:00
|
|
|
dimension 'distribution'
|
2017-02-26 14:36:43 -08:00
|
|
|
ext.websiteUpdateUrl = "https://updates.signal.org/android"
|
|
|
|
buildConfigField "boolean", "PLAY_STORE_DISABLED", "true"
|
|
|
|
buildConfigField "String", "NOPLAY_UPDATE_URL", "\"$ext.websiteUpdateUrl\""
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_DISTRIBUTION_TYPE", "\"website\""
|
2017-02-26 14:36:43 -08:00
|
|
|
}
|
2020-10-29 15:33:15 -04:00
|
|
|
|
2021-07-08 09:25:35 -04:00
|
|
|
nightly {
|
|
|
|
dimension 'distribution'
|
2021-07-09 18:49:32 -04:00
|
|
|
versionNameSuffix "-nightly-untagged-${getDateSuffix()}"
|
2021-07-08 09:25:35 -04:00
|
|
|
ext.websiteUpdateUrl = "null"
|
|
|
|
buildConfigField "boolean", "PLAY_STORE_DISABLED", "false"
|
|
|
|
buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl"
|
2021-07-26 11:16:24 -04:00
|
|
|
buildConfigField "String", "BUILD_DISTRIBUTION_TYPE", "\"nightly\""
|
2021-07-08 09:25:35 -04:00
|
|
|
}
|
|
|
|
|
2020-11-02 17:31:32 -04:00
|
|
|
prod {
|
|
|
|
dimension 'environment'
|
|
|
|
|
|
|
|
isDefault true
|
2021-04-06 13:03:33 -03:00
|
|
|
|
|
|
|
buildConfigField "String", "MOBILE_COIN_ENVIRONMENT", "\"mainnet\""
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_ENVIRONMENT_TYPE", "\"Prod\""
|
2020-11-02 17:31:32 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
staging {
|
|
|
|
dimension 'environment'
|
|
|
|
|
|
|
|
applicationIdSuffix ".staging"
|
|
|
|
|
2021-12-07 14:10:18 -06:00
|
|
|
buildConfigField "String", "SIGNAL_URL", "\"https://chat.staging.signal.org\""
|
2020-11-02 17:31:32 -04:00
|
|
|
buildConfigField "String", "STORAGE_URL", "\"https://storage-staging.signal.org\""
|
|
|
|
buildConfigField "String", "SIGNAL_CDN_URL", "\"https://cdn-staging.signal.org\""
|
|
|
|
buildConfigField "String", "SIGNAL_CDN2_URL", "\"https://cdn2-staging.signal.org\""
|
|
|
|
buildConfigField "String", "SIGNAL_CONTACT_DISCOVERY_URL", "\"https://api-staging.directory.signal.org\""
|
2022-08-10 11:06:21 -04:00
|
|
|
buildConfigField "String", "SIGNAL_CDSI_URL", "\"https://cdsi.staging.signal.org\""
|
2020-11-02 17:31:32 -04:00
|
|
|
buildConfigField "String", "SIGNAL_KEY_BACKUP_URL", "\"https://api-staging.backup.signal.org\""
|
2022-08-05 17:27:10 -04:00
|
|
|
buildConfigField "String", "CDS_MRENCLAVE", "\"74778bb0f93ae1f78c26e67152bab0bbeb693cd56d1bb9b4e9244157acc58081\""
|
2022-08-24 12:05:46 -04:00
|
|
|
buildConfigField "org.thoughtcrime.securesms.KbsEnclave", "KBS_ENCLAVE", "new org.thoughtcrime.securesms.KbsEnclave(\"39963b736823d5780be96ab174869a9499d56d66497aa8f9b2244f777ebc366b\", " +
|
|
|
|
"\"9dbc6855c198e04f21b5cc35df839fdcd51b53658454dfa3f817afefaffc95ef\", " +
|
|
|
|
"\"45627094b2ea4a66f4cf0b182858a8dcf4b8479122c3820fe7fd0551a6d4cf5c\")"
|
|
|
|
buildConfigField "org.thoughtcrime.securesms.KbsEnclave[]", "KBS_FALLBACKS", "new org.thoughtcrime.securesms.KbsEnclave[] { new org.thoughtcrime.securesms.KbsEnclave(\"dd6f66d397d9e8cf6ec6db238e59a7be078dd50e9715427b9c89b409ffe53f99\", " +
|
|
|
|
"\"4200003414528c151e2dccafbc87aa6d3d66a5eb8f8c05979a6e97cb33cd493a\", " +
|
|
|
|
"\"ee19f1965b1eefa3dc4204eb70c04f397755f771b8c1909d080c04dad2a6a9ba\") }"
|
2020-11-02 17:31:32 -04:00
|
|
|
buildConfigField "String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BbqY1DzohE4NUZoVF+L18oUPrK3kILllLEJh2UnPSsEx\""
|
2022-07-11 15:20:00 -04:00
|
|
|
buildConfigField "String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"ABSY21VckQcbSXVNCGRYJcfWHiAMZmpTtTELcDmxgdFbtp/bWsSxZdMKzfCp8rvIs8ocCU3B37fT3r4Mi5qAemeGeR2X+/YmOGR5ofui7tD5mDQfstAI9i+4WpMtIe8KC3wU5w3Inq3uNWVmoGtpKndsNfwJrCg0Hd9zmObhypUnSkfYn2ooMOOnBpfdanRtrvetZUayDMSC5iSRcXKpdlukrpzzsCIvEwjwQlJYVPOQPj4V0F4UXXBdHSLK05uoPBCQG8G9rYIGedYsClJXnbrgGYG3eMTG5hnx4X4ntARBgELuMWWUEEfSK0mjXg+/2lPmWcTZWR9nkqgQQP0tbzuiPm74H2wMO4u1Wafe+UwyIlIT9L7KLS19Aw8r4sPrXZSSsOZ6s7M1+rTJN0bI5CKY2PX29y5Ok3jSWufIKcgKOnWoP67d5b2du2ZVJjpjfibNIHbT/cegy/sBLoFwtHogVYUewANUAXIaMPyCLRArsKhfJ5wBtTminG/PAvuBdJ70Z/bXVPf8TVsR292zQ65xwvWTejROW6AZX6aqucUj\""
|
2021-04-06 13:03:33 -03:00
|
|
|
buildConfigField "String", "MOBILE_COIN_ENVIRONMENT", "\"testnet\""
|
2022-03-03 10:43:51 -08:00
|
|
|
buildConfigField "String", "SIGNAL_CAPTCHA_URL", "\"https://signalcaptchas.org/staging/registration/generate.html\""
|
2021-05-05 12:49:18 -04:00
|
|
|
buildConfigField "String", "RECAPTCHA_PROOF_URL", "\"https://signalcaptchas.org/staging/challenge/generate.html\""
|
2021-06-16 00:55:24 -04:00
|
|
|
|
|
|
|
buildConfigField "String", "BUILD_ENVIRONMENT_TYPE", "\"Staging\""
|
2021-10-21 16:39:02 -03:00
|
|
|
buildConfigField "String", "STRIPE_PUBLISHABLE_KEY", "\"pk_test_sngOd8FnXNkpce9nPXawKrJD00kIDngZkD\""
|
2020-11-02 17:31:32 -04:00
|
|
|
}
|
2017-02-26 14:36:43 -08:00
|
|
|
}
|
|
|
|
|
2017-11-06 09:20:52 -08:00
|
|
|
android.applicationVariants.all { variant ->
|
2019-05-28 19:57:06 -03:00
|
|
|
variant.outputs.each { output ->
|
2021-07-08 09:25:35 -04:00
|
|
|
if (output.baseName.contains('nightly')) {
|
|
|
|
output.versionCodeOverride = canonicalVersionCode * postFixSize + 5
|
2021-07-09 18:49:32 -04:00
|
|
|
def tag = getCurrentGitTag()
|
|
|
|
if (tag != null && tag.length() > 0) {
|
2022-02-09 09:07:01 -06:00
|
|
|
if (tag.startsWith("v")) {
|
|
|
|
tag = tag.substring(1)
|
|
|
|
}
|
2021-07-09 18:49:32 -04:00
|
|
|
output.versionNameOverride = tag
|
|
|
|
}
|
2021-07-08 09:25:35 -04:00
|
|
|
} else {
|
|
|
|
output.outputFileName = output.outputFileName.replace(".apk", "-${variant.versionName}.apk")
|
|
|
|
def abiName = output.getFilter("ABI") ?: 'universal'
|
|
|
|
def postFix = abiPostFix.get(abiName, 0)
|
2019-05-28 19:57:06 -03:00
|
|
|
|
2021-07-08 09:25:35 -04:00
|
|
|
if (postFix >= postFixSize) throw new AssertionError("postFix is too large")
|
2019-05-28 19:57:06 -03:00
|
|
|
|
2021-07-08 09:25:35 -04:00
|
|
|
output.versionCodeOverride = canonicalVersionCode * postFixSize + postFix
|
|
|
|
}
|
2017-02-26 14:36:43 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-05 13:54:57 -05:00
|
|
|
android.variantFilter { variant ->
|
|
|
|
def distribution = variant.getFlavors().get(0).name
|
|
|
|
def environment = variant.getFlavors().get(1).name
|
|
|
|
def buildType = variant.buildType.name
|
2021-08-19 12:57:23 -04:00
|
|
|
def fullName = distribution + environment.capitalize() + buildType.capitalize()
|
2021-03-05 13:54:57 -05:00
|
|
|
|
2021-08-19 12:57:23 -04:00
|
|
|
if (!selectableVariants.contains(fullName)) {
|
2021-07-08 09:25:35 -04:00
|
|
|
variant.setIgnore(true)
|
2021-03-05 13:54:57 -05:00
|
|
|
}
|
|
|
|
}
|
2013-10-10 13:52:24 -07:00
|
|
|
}
|
|
|
|
|
2020-03-01 10:54:11 -05:00
|
|
|
dependencies {
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.androidx.core.ktx
|
|
|
|
implementation libs.androidx.fragment.ktx
|
2020-05-01 16:19:24 -03:00
|
|
|
lintChecks project(':lintchecks')
|
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
coreLibraryDesugaring libs.android.tools.desugar
|
2021-04-06 19:54:18 -03:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation (libs.androidx.appcompat) {
|
2021-09-14 09:01:42 -03:00
|
|
|
version {
|
2022-09-13 11:16:01 -03:00
|
|
|
strictly '1.5.1'
|
2021-09-14 09:01:42 -03:00
|
|
|
}
|
2020-05-18 12:30:03 -03:00
|
|
|
}
|
2022-09-13 11:16:01 -03:00
|
|
|
implementation libs.androidx.window.window
|
|
|
|
implementation libs.androidx.window.java
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.androidx.recyclerview
|
|
|
|
implementation libs.material.material
|
|
|
|
implementation libs.androidx.legacy.support
|
|
|
|
implementation libs.androidx.cardview
|
|
|
|
implementation libs.androidx.preference
|
|
|
|
implementation libs.androidx.legacy.preference
|
|
|
|
implementation libs.androidx.gridlayout
|
|
|
|
implementation libs.androidx.exifinterface
|
|
|
|
implementation libs.androidx.constraintlayout
|
|
|
|
implementation libs.androidx.multidex
|
|
|
|
implementation libs.androidx.navigation.fragment.ktx
|
|
|
|
implementation libs.androidx.navigation.ui.ktx
|
2022-09-13 11:16:01 -03:00
|
|
|
implementation libs.androidx.lifecycle.viewmodel.ktx
|
|
|
|
implementation libs.androidx.lifecycle.livedata.ktx
|
|
|
|
implementation libs.androidx.lifecycle.process
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.androidx.lifecycle.viewmodel.savedstate
|
|
|
|
implementation libs.androidx.lifecycle.common.java8
|
|
|
|
implementation libs.androidx.lifecycle.reactivestreams.ktx
|
|
|
|
implementation libs.androidx.camera.core
|
|
|
|
implementation libs.androidx.camera.camera2
|
|
|
|
implementation libs.androidx.camera.lifecycle
|
|
|
|
implementation libs.androidx.camera.view
|
|
|
|
implementation libs.androidx.concurrent.futures
|
|
|
|
implementation libs.androidx.autofill
|
|
|
|
implementation libs.androidx.biometric
|
|
|
|
implementation libs.androidx.sharetarget
|
|
|
|
|
|
|
|
implementation (libs.firebase.messaging) {
|
2020-03-01 10:54:11 -05:00
|
|
|
exclude group: 'com.google.firebase', module: 'firebase-core'
|
|
|
|
exclude group: 'com.google.firebase', module: 'firebase-analytics'
|
|
|
|
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
|
|
|
|
}
|
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.google.play.services.maps
|
|
|
|
implementation libs.google.play.services.auth
|
2020-03-01 10:54:11 -05:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.bundles.exoplayer
|
2020-03-01 10:54:11 -05:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.conscrypt.android
|
|
|
|
implementation libs.signal.aesgcmprovider
|
2020-03-01 10:54:11 -05:00
|
|
|
|
|
|
|
implementation project(':libsignal-service')
|
2020-12-03 13:19:03 -05:00
|
|
|
implementation project(':paging')
|
2020-12-04 18:31:58 -05:00
|
|
|
implementation project(':core-util')
|
2021-12-10 15:31:46 -05:00
|
|
|
implementation project(':glide-config')
|
2021-01-05 19:13:38 -04:00
|
|
|
implementation project(':video')
|
2021-03-11 13:27:25 -05:00
|
|
|
implementation project(':device-transfer')
|
2021-09-13 13:16:14 -03:00
|
|
|
implementation project(':image-editor')
|
2021-10-12 15:55:54 -03:00
|
|
|
implementation project(':donations')
|
2022-03-24 12:47:27 -04:00
|
|
|
implementation project(':contacts')
|
2022-05-19 16:26:03 -04:00
|
|
|
implementation project(':qr')
|
2022-08-30 15:22:40 -03:00
|
|
|
implementation project(':sms-exporter')
|
2022-10-21 11:04:40 -04:00
|
|
|
implementation project(':sticky-header-grid')
|
|
|
|
implementation project(':photoview')
|
2021-01-05 19:13:38 -04:00
|
|
|
|
2022-03-24 13:23:23 -04:00
|
|
|
implementation libs.libsignal.android
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.google.protobuf.javalite
|
2021-04-06 13:03:33 -03:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation(libs.mobilecoin) {
|
2021-04-06 13:03:33 -03:00
|
|
|
exclude group: 'com.google.protobuf'
|
|
|
|
}
|
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation(libs.signal.argon2) {
|
|
|
|
artifact {
|
|
|
|
type = "aar"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
implementation libs.signal.ringrtc
|
|
|
|
|
|
|
|
implementation libs.leolin.shortcutbadger
|
|
|
|
implementation libs.emilsjolander.stickylistheaders
|
|
|
|
implementation libs.jpardogo.materialtabstrip
|
|
|
|
implementation libs.apache.httpclient.android
|
|
|
|
implementation libs.glide.glide
|
|
|
|
implementation libs.roundedimageview
|
|
|
|
implementation libs.materialish.progress
|
|
|
|
implementation libs.greenrobot.eventbus
|
|
|
|
implementation libs.waitingdots
|
|
|
|
implementation libs.google.zxing.android.integration
|
|
|
|
implementation libs.time.duration.picker
|
|
|
|
implementation libs.google.zxing.core
|
2022-10-21 11:04:40 -04:00
|
|
|
implementation libs.google.flexbox
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation (libs.subsampling.scale.image.view) {
|
2020-03-01 10:54:11 -05:00
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
}
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation (libs.android.tooltips) {
|
2020-03-01 10:54:11 -05:00
|
|
|
exclude group: 'com.android.support', module: 'appcompat-v7'
|
|
|
|
}
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation (libs.android.smsmms) {
|
2020-03-01 10:54:11 -05:00
|
|
|
exclude group: 'com.squareup.okhttp', module: 'okhttp'
|
|
|
|
exclude group: 'com.squareup.okhttp', module: 'okhttp-urlconnection'
|
|
|
|
}
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.stream
|
2020-03-01 10:54:11 -05:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.lottie
|
2020-03-01 10:54:11 -05:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.signal.android.database.sqlcipher
|
|
|
|
implementation libs.androidx.sqlite
|
2021-05-06 12:32:25 -04:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation (libs.google.ez.vcard) {
|
2020-03-01 10:54:11 -05:00
|
|
|
exclude group: 'com.fasterxml.jackson.core'
|
|
|
|
exclude group: 'org.freemarker'
|
|
|
|
}
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.dnsjava
|
2020-03-01 10:54:11 -05:00
|
|
|
|
2022-02-14 14:18:03 -05:00
|
|
|
spinnerImplementation project(":spinner")
|
|
|
|
spinnerImplementation libs.square.leakcanary
|
2020-03-01 10:54:11 -05:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
testImplementation testLibs.junit.junit
|
|
|
|
testImplementation testLibs.assertj.core
|
|
|
|
testImplementation testLibs.mockito.core
|
2022-03-14 20:49:40 -04:00
|
|
|
testImplementation testLibs.mockito.kotlin
|
2020-03-01 10:54:11 -05:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
testImplementation testLibs.androidx.test.core
|
|
|
|
testImplementation (testLibs.robolectric.robolectric) {
|
2020-02-28 13:03:06 -05:00
|
|
|
exclude group: 'com.google.protobuf', module: 'protobuf-java'
|
|
|
|
}
|
2021-09-14 14:57:04 -03:00
|
|
|
testImplementation testLibs.robolectric.shadows.multidex
|
2022-01-28 12:32:10 -05:00
|
|
|
testImplementation (testLibs.bouncycastle.bcprov.jdk15on) {
|
|
|
|
force = true
|
|
|
|
}
|
2021-09-14 14:57:04 -03:00
|
|
|
testImplementation testLibs.hamcrest.hamcrest
|
2022-10-27 16:43:23 -04:00
|
|
|
testImplementation testLibs.mockk
|
2020-03-01 10:54:11 -05:00
|
|
|
|
2021-06-29 15:02:44 -04:00
|
|
|
testImplementation(testFixtures(project(":libsignal-service")))
|
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
androidTestImplementation testLibs.androidx.test.ext.junit
|
|
|
|
androidTestImplementation testLibs.espresso.core
|
2022-05-16 10:15:56 -04:00
|
|
|
androidTestImplementation testLibs.androidx.test.core
|
|
|
|
androidTestImplementation testLibs.androidx.test.core.ktx
|
|
|
|
androidTestImplementation testLibs.androidx.test.ext.junit.ktx
|
2022-08-03 11:50:16 -04:00
|
|
|
androidTestImplementation testLibs.mockito.android
|
|
|
|
androidTestImplementation testLibs.mockito.kotlin
|
|
|
|
androidTestImplementation testLibs.square.okhttp.mockserver
|
2021-04-13 17:12:54 -04:00
|
|
|
|
2022-09-13 11:16:01 -03:00
|
|
|
instrumentationImplementation (libs.androidx.fragment.testing) {
|
2022-09-13 10:15:07 -03:00
|
|
|
exclude group: 'androidx.test', module: 'core'
|
|
|
|
}
|
|
|
|
|
2021-10-12 15:55:54 -03:00
|
|
|
testImplementation testLibs.espresso.core
|
|
|
|
|
2021-09-16 11:45:50 -04:00
|
|
|
implementation libs.kotlin.stdlib.jdk8
|
|
|
|
implementation libs.kotlin.reflect
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.jackson.module.kotlin
|
2021-07-08 11:41:26 -04:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.rxjava3.rxandroid
|
|
|
|
implementation libs.rxjava3.rxkotlin
|
2021-12-08 13:22:36 -05:00
|
|
|
implementation libs.rxdogtag
|
2021-10-15 10:18:38 -04:00
|
|
|
|
2022-09-14 09:18:10 -03:00
|
|
|
androidTestUtil testLibs.androidx.test.orchestrator
|
2020-03-01 10:54:11 -05:00
|
|
|
}
|
|
|
|
|
2016-02-17 11:27:35 -08:00
|
|
|
def getLastCommitTimestamp() {
|
2021-05-07 13:43:31 -04:00
|
|
|
if (!(new File('.git').exists())) {
|
|
|
|
return System.currentTimeMillis().toString()
|
|
|
|
}
|
|
|
|
|
2016-02-17 11:27:35 -08:00
|
|
|
new ByteArrayOutputStream().withStream { os ->
|
2022-12-08 12:57:35 -04:00
|
|
|
exec {
|
2016-02-17 11:27:35 -08:00
|
|
|
executable = 'git'
|
|
|
|
args = ['log', '-1', '--pretty=format:%ct']
|
|
|
|
standardOutput = os
|
|
|
|
}
|
|
|
|
|
|
|
|
return os.toString() + "000"
|
|
|
|
}
|
|
|
|
}
|
2020-08-18 11:57:35 -03:00
|
|
|
|
2021-02-05 15:18:11 -05:00
|
|
|
def getGitHash() {
|
2021-05-07 13:43:31 -04:00
|
|
|
if (!(new File('.git').exists())) {
|
2022-12-08 19:34:09 -05:00
|
|
|
throw new IllegalStateException("Must be a git repository to guarantee reproducible builds! (git hash is part of APK)")
|
2021-05-07 13:43:31 -04:00
|
|
|
}
|
|
|
|
|
2021-02-05 15:18:11 -05:00
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
2022-12-08 19:34:09 -05:00
|
|
|
commandLine 'git', 'rev-parse', 'HEAD'
|
2021-02-05 15:18:11 -05:00
|
|
|
standardOutput = stdout
|
|
|
|
}
|
2022-12-08 19:34:09 -05:00
|
|
|
return stdout.toString().trim().substring(0, 12)
|
2021-02-05 15:18:11 -05:00
|
|
|
}
|
|
|
|
|
2021-07-09 18:49:32 -04:00
|
|
|
def getCurrentGitTag() {
|
|
|
|
if (!(new File('.git').exists())) {
|
2022-12-08 19:34:09 -05:00
|
|
|
throw new IllegalStateException("Must be a git repository to guarantee reproducible builds! (git hash is part of APK)")
|
2021-07-09 18:49:32 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'tag', '--points-at', 'HEAD'
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
|
|
|
|
def output = stdout.toString().trim()
|
|
|
|
|
|
|
|
if (output != null && output.size() > 0) {
|
2021-11-17 21:17:36 -05:00
|
|
|
def tags = output.split('\n').toList()
|
|
|
|
return tags.stream().filter(t -> t.contains('nightly')).findFirst().orElse(tags.get(0))
|
2021-07-09 18:49:32 -04:00
|
|
|
} else {
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-18 11:57:35 -03:00
|
|
|
tasks.withType(Test) {
|
|
|
|
testLogging {
|
|
|
|
events "failed"
|
|
|
|
exceptionFormat "full"
|
|
|
|
showCauses true
|
|
|
|
showExceptions true
|
|
|
|
showStackTraces true
|
|
|
|
}
|
|
|
|
}
|
2020-11-02 08:18:50 -05:00
|
|
|
|
|
|
|
def loadKeystoreProperties(filename) {
|
|
|
|
def keystorePropertiesFile = file("${project.rootDir}/${filename}")
|
|
|
|
if (keystorePropertiesFile.exists()) {
|
|
|
|
def keystoreProperties = new Properties()
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
2022-12-08 12:57:35 -04:00
|
|
|
return keystoreProperties
|
2020-11-02 08:18:50 -05:00
|
|
|
} else {
|
2022-12-08 12:57:35 -04:00
|
|
|
return null
|
2020-11-02 08:18:50 -05:00
|
|
|
}
|
|
|
|
}
|
2021-07-08 09:25:35 -04:00
|
|
|
|
2022-12-08 12:57:35 -04:00
|
|
|
static def getDateSuffix() {
|
2021-07-08 09:25:35 -04:00
|
|
|
def date = new Date()
|
|
|
|
def formattedDate = date.format('yyyy-MM-dd-HH:mm')
|
|
|
|
return formattedDate
|
|
|
|
}
|
2022-08-04 13:21:11 -04:00
|
|
|
|
|
|
|
def getMapsKey() {
|
|
|
|
def mapKey = file("${project.rootDir}/maps.key")
|
|
|
|
if (mapKey.exists()) {
|
|
|
|
return mapKey.readLines()[0]
|
|
|
|
}
|
|
|
|
return "AIzaSyCSx9xea86GwDKGznCAULE9Y5a8b-TfN9U"
|
|
|
|
}
|