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'
|
|
|
|
apply plugin: 'kotlin-kapt'
|
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'
|
2014-06-05 10:16:36 -07:00
|
|
|
apply plugin: 'witness'
|
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'
|
2019-10-16 09:01:35 -04:00
|
|
|
apply from: 'witness-verifications.gradle'
|
2021-06-24 13:52:54 -03:00
|
|
|
apply plugin: 'org.jetbrains.kotlin.android'
|
|
|
|
apply plugin: 'app.cash.exhaustive'
|
2013-10-10 13:52:24 -07:00
|
|
|
|
|
|
|
repositories {
|
2017-11-06 15:52:18 -08:00
|
|
|
maven {
|
2018-03-08 18:06:21 +08:00
|
|
|
url "https://raw.github.com/signalapp/maven/master/circular-progress-button/releases/"
|
2019-01-25 18:23:00 -08:00
|
|
|
content {
|
|
|
|
includeGroupByRegex "com\\.github\\.dmytrodanylyk\\.circular-progress-button\\.*"
|
|
|
|
}
|
2017-11-06 15:52:18 -08:00
|
|
|
}
|
2021-08-18 10:16:54 -04:00
|
|
|
maven {
|
|
|
|
url "https://raw.github.com/signalapp/maven/master/sqlcipher/release/"
|
|
|
|
content {
|
|
|
|
includeGroupByRegex "org\\.signal.*"
|
|
|
|
}
|
|
|
|
}
|
2015-05-04 11:36:18 -07:00
|
|
|
maven { // textdrawable
|
|
|
|
url 'https://dl.bintray.com/amulyakhare/maven'
|
2019-01-25 18:23:00 -08:00
|
|
|
content {
|
|
|
|
includeGroupByRegex "com\\.amulyakhare.*"
|
|
|
|
}
|
2015-05-04 11:36:18 -07:00
|
|
|
}
|
2021-09-12 13:01:18 -04:00
|
|
|
maven {
|
|
|
|
url "https://www.jitpack.io"
|
|
|
|
}
|
|
|
|
|
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"
|
|
|
|
includeVersion "cn.carbswang.android", "NumberPickerView", "1.0.9"
|
|
|
|
includeVersion "com.takisoft.fix", "colorpicker", "0.9.1"
|
|
|
|
includeVersion "com.codewaves.stickyheadergrid", "stickyheadergrid", "0.9.4"
|
|
|
|
includeVersion "com.amulyakhare", "com.amulyakhare.textdrawable", "1.0.1"
|
|
|
|
includeVersion "com.google.android", "flexbox", "0.3.0"
|
|
|
|
}
|
|
|
|
}
|
2013-10-10 13:52:24 -07:00
|
|
|
}
|
|
|
|
|
2019-11-04 09:03:18 -05:00
|
|
|
protobuf {
|
|
|
|
protoc {
|
|
|
|
artifact = 'com.google.protobuf:protoc:3.10.0'
|
|
|
|
}
|
|
|
|
generateProtoTasks {
|
|
|
|
all().each { task ->
|
|
|
|
task.builtins {
|
|
|
|
java {
|
|
|
|
option "lite"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-22 16:40:02 -03:00
|
|
|
def canonicalVersionCode = 925
|
|
|
|
def canonicalVersionName = "5.24.5"
|
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 = [
|
|
|
|
'internalProdFlipper',
|
|
|
|
'internalProdPerf',
|
|
|
|
'internalProdRelease',
|
|
|
|
'internalStagingFlipper',
|
|
|
|
'internalStagingPerf',
|
|
|
|
'internalStagingRelease',
|
|
|
|
'nightlyProdFlipper',
|
|
|
|
'nightlyProdPerf',
|
|
|
|
'nightlyProdRelease',
|
|
|
|
'nightlyStagingPerf',
|
|
|
|
'playProdDebug',
|
|
|
|
'playProdFlipper',
|
|
|
|
'playProdPerf',
|
|
|
|
'playProdRelease',
|
|
|
|
'playStagingDebug',
|
|
|
|
'playStagingFlipper',
|
|
|
|
'playStagingPerf',
|
|
|
|
'playStagingRelease',
|
|
|
|
'studyProdMock',
|
|
|
|
'studyProdPerf',
|
|
|
|
'websiteProdFlipper',
|
|
|
|
'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'
|
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"]
|
|
|
|
}
|
|
|
|
|
2015-02-12 10:30:45 -08:00
|
|
|
dexOptions {
|
|
|
|
javaMaxHeapSize "4g"
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
2017-02-26 14:36:43 -08:00
|
|
|
project.ext.set("archivesBaseName", "Signal");
|
2016-11-21 18:58:10 -08:00
|
|
|
|
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-09-07 10:00:28 -04:00
|
|
|
buildConfigField "String", "SIGNAL_URL", "\"https://textsecure-service.whispersystems.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\""
|
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\""
|
2021-06-23 17:50:59 -03:00
|
|
|
buildConfigField "String[]", "SIGNAL_SFU_INTERNAL_NAMES", "new String[]{\"Test\", \"Staging\"}"
|
|
|
|
buildConfigField "String[]", "SIGNAL_SFU_INTERNAL_URLS", "new String[]{\"https://sfu.test.voip.signal.org\", \"https://sfu.staging.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"
|
2020-01-23 11:28:17 -05:00
|
|
|
buildConfigField "String", "SIGNAL_AGENT", "\"OWA\""
|
2020-09-09 15:36:38 -04:00
|
|
|
buildConfigField "String", "CDS_MRENCLAVE", "\"c98e00a4e3ff977a56afefe7362a27e4961e4f19e211febfbb19b897e6b80b15\""
|
2020-10-05 09:26:51 -04:00
|
|
|
buildConfigField "KbsEnclave", "KBS_ENCLAVE", "new KbsEnclave(\"fe7c1bfae98f9b073d220366ea31163ee82f6d04bead774f71ca8e5c40847bfe\"," +
|
|
|
|
"\"fe7c1bfae98f9b073d220366ea31163ee82f6d04bead774f71ca8e5c40847bfe\", " +
|
|
|
|
"\"a3baab19ef6ce6f34ab9ebb25ba722725ae44a8872dc0ff08ad6d83a9489de87\")";
|
|
|
|
buildConfigField "KbsEnclave[]", "KBS_FALLBACKS", "new KbsEnclave[0]"
|
2018-10-11 16:45:22 -07:00
|
|
|
buildConfigField "String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF\""
|
2020-05-19 15:45:46 -03:00
|
|
|
buildConfigField "String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X0=\""
|
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-08-30 15:12:51 -03:00
|
|
|
buildConfigField "int[]", "MOBILE_COIN_REGIONS", "new int[]{44,49,33,41}"
|
2021-05-05 09:59:05 -03:00
|
|
|
buildConfigField "String", "GIPHY_API_KEY", "\"3o6ZsYH6U6Eri53TXy\""
|
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\""
|
|
|
|
|
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
|
|
|
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2013-10-10 13:52:24 -07:00
|
|
|
}
|
|
|
|
|
2014-04-22 14:33:29 -07:00
|
|
|
compileOptions {
|
2021-04-06 19:54:18 -03:00
|
|
|
coreLibraryDesugaringEnabled true
|
2020-12-03 13:19:03 -05:00
|
|
|
sourceCompatibility JAVA_VERSION
|
|
|
|
targetCompatibility JAVA_VERSION
|
2014-04-22 14:33:29 -07:00
|
|
|
}
|
|
|
|
|
2014-12-30 16:49:57 -08:00
|
|
|
packagingOptions {
|
|
|
|
exclude 'LICENSE.txt'
|
|
|
|
exclude 'LICENSE'
|
|
|
|
exclude 'NOTICE'
|
|
|
|
exclude 'asm-license.txt'
|
2015-05-15 11:57:18 -07:00
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/NOTICE'
|
2018-08-09 10:15:43 -04:00
|
|
|
exclude 'META-INF/proguard/androidx-annotations.pro'
|
2021-03-11 13:27:25 -05:00
|
|
|
exclude '/org/spongycastle/x509/CertPathReviewerMessages.properties'
|
|
|
|
exclude '/org/spongycastle/x509/CertPathReviewerMessages_de.properties'
|
2014-12-30 16:49:57 -08:00
|
|
|
}
|
|
|
|
|
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
|
2015-01-20 21:26:58 -10:00
|
|
|
minifyEnabled true
|
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-spongycastle.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',
|
|
|
|
'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
|
|
|
|
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Debug\""
|
2015-01-11 20:27:34 -08:00
|
|
|
}
|
2020-03-01 10:54:11 -05:00
|
|
|
flipper {
|
|
|
|
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']
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Flipper\""
|
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
|
|
|
|
matchingFallbacks = ['debug']
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Perf\""
|
2020-12-20 13:28:55 -05:00
|
|
|
}
|
2021-03-05 13:54:57 -05:00
|
|
|
mock {
|
|
|
|
initWith debug
|
|
|
|
isDefault false
|
|
|
|
minifyEnabled false
|
|
|
|
matchingFallbacks = ['debug']
|
2021-06-16 00:55:24 -04:00
|
|
|
buildConfigField "String", "BUILD_VARIANT_TYPE", "\"Mock\""
|
2021-03-05 13:54:57 -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
|
|
|
|
|
|
|
internal {
|
2020-11-02 17:31:32 -04:00
|
|
|
dimension 'distribution'
|
2020-10-29 15:33:15 -04: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", "\"internal\""
|
2020-10-29 15:33:15 -04:00
|
|
|
}
|
2020-11-02 17:31:32 -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
|
|
|
}
|
|
|
|
|
2021-03-05 13:54:57 -05:00
|
|
|
study {
|
|
|
|
dimension 'distribution'
|
|
|
|
|
|
|
|
applicationIdSuffix ".study"
|
|
|
|
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", "\"study\""
|
2021-03-05 13:54:57 -05: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-09-07 10:00:28 -04:00
|
|
|
buildConfigField "String", "SIGNAL_URL", "\"https://textsecure-service-staging.whispersystems.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\""
|
|
|
|
buildConfigField "String", "SIGNAL_KEY_BACKUP_URL", "\"https://api-staging.backup.signal.org\""
|
|
|
|
buildConfigField "String", "CDS_MRENCLAVE", "\"c98e00a4e3ff977a56afefe7362a27e4961e4f19e211febfbb19b897e6b80b15\""
|
|
|
|
buildConfigField "KbsEnclave", "KBS_ENCLAVE", "new KbsEnclave(\"823a3b2c037ff0cbe305cc48928cfcc97c9ed4a8ca6d49af6f7d6981fb60a4e9\", " +
|
2021-08-31 12:50:57 -04:00
|
|
|
"\"16b94ac6d2b7f7b9d72928f36d798dbb35ed32e7bb14c42b4301ad0344b46f29\", " +
|
2020-11-02 17:31:32 -04:00
|
|
|
"\"a3baab19ef6ce6f34ab9ebb25ba722725ae44a8872dc0ff08ad6d83a9489de87\")"
|
|
|
|
buildConfigField "KbsEnclave[]", "KBS_FALLBACKS", "new KbsEnclave[0]"
|
|
|
|
buildConfigField "String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BbqY1DzohE4NUZoVF+L18oUPrK3kILllLEJh2UnPSsEx\""
|
|
|
|
buildConfigField "String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"ABSY21VckQcbSXVNCGRYJcfWHiAMZmpTtTELcDmxgdFbtp/bWsSxZdMKzfCp8rvIs8ocCU3B37fT3r4Mi5qAemeGeR2X+/YmOGR5ofui7tD5mDQfstAI9i+4WpMtIe8KC3wU5w3Inq3uNWVmoGtpKndsNfwJrCg0Hd9zmObhypUnSkfYn2ooMOOnBpfdanRtrvetZUayDMSC5iSRcXKpdls=\""
|
2021-04-06 13:03:33 -03:00
|
|
|
buildConfigField "String", "MOBILE_COIN_ENVIRONMENT", "\"testnet\""
|
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\""
|
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) {
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-24 15:14:07 -03:00
|
|
|
lintOptions {
|
|
|
|
abortOnError true
|
|
|
|
baseline file("lint-baseline.xml")
|
2019-10-17 09:08:24 -03:00
|
|
|
disable "LintError"
|
2014-01-10 16:20:25 -10:00
|
|
|
}
|
2019-03-11 16:40:26 -03:00
|
|
|
|
|
|
|
testOptions {
|
|
|
|
unitTests {
|
|
|
|
includeAndroidResources = true
|
|
|
|
}
|
|
|
|
}
|
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 {
|
|
|
|
strictly '1.2.0'
|
|
|
|
}
|
2020-05-18 12:30:03 -03:00
|
|
|
}
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.androidx.window
|
|
|
|
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
|
|
|
|
implementation libs.androidx.lifecycle.extensions
|
|
|
|
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-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-01-05 19:13:38 -04:00
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
implementation libs.signal.zkgroup.android
|
|
|
|
implementation libs.signal.client.android
|
|
|
|
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.photoview
|
|
|
|
implementation libs.glide.glide
|
|
|
|
kapt libs.glide.compiler
|
|
|
|
kapt libs.androidx.annotation
|
|
|
|
implementation libs.roundedimageview
|
|
|
|
implementation libs.materialish.progress
|
|
|
|
implementation libs.greenrobot.eventbus
|
|
|
|
implementation libs.waitingdots
|
|
|
|
implementation libs.floatingactionbutton
|
|
|
|
implementation libs.google.zxing.android.integration
|
|
|
|
implementation libs.time.duration.picker
|
|
|
|
implementation libs.textdrawable
|
|
|
|
implementation libs.google.zxing.core
|
|
|
|
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.numberpickerview) {
|
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.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
|
|
|
|
implementation (libs.colorpicker) {
|
2020-03-01 10:54:11 -05:00
|
|
|
exclude group: 'com.android.support', module: 'appcompat-v7'
|
|
|
|
exclude group: 'com.android.support', module: 'recyclerview-v7'
|
|
|
|
}
|
|
|
|
|
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.stickyheadergrid
|
|
|
|
implementation libs.circular.progress.button
|
2021-05-06 12:32:25 -04: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
|
|
|
|
2021-09-14 14:57:04 -03:00
|
|
|
flipperImplementation libs.facebook.flipper
|
|
|
|
flipperImplementation libs.facebook.soloader
|
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
|
|
|
|
testImplementation testLibs.powermock.api.mockito
|
|
|
|
testImplementation testLibs.powermock.module.junit4.core
|
|
|
|
testImplementation testLibs.powermock.module.junit4.rule
|
|
|
|
testImplementation testLibs.powermock.classloading.xstream
|
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
|
|
|
|
testImplementation testLibs.hamcrest.hamcrest
|
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
|
2021-04-13 17:12:54 -04:00
|
|
|
|
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
|
2020-03-01 10:54:11 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencyVerification {
|
2020-11-02 17:31:32 -04:00
|
|
|
configuration = '(play|website)(Prod|Staging)(Debug|Release)RuntimeClasspath'
|
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 ->
|
|
|
|
def result = exec {
|
|
|
|
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())) {
|
|
|
|
return "abcd1234"
|
|
|
|
}
|
|
|
|
|
2021-02-05 15:18:11 -05:00
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
return stdout.toString().trim()
|
|
|
|
}
|
|
|
|
|
2021-07-09 18:49:32 -04:00
|
|
|
def getCurrentGitTag() {
|
|
|
|
if (!(new File('.git').exists())) {
|
|
|
|
return ''
|
|
|
|
}
|
|
|
|
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine 'git', 'tag', '--points-at', 'HEAD'
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
|
|
|
|
def output = stdout.toString().trim()
|
|
|
|
|
|
|
|
if (output != null && output.size() > 0) {
|
|
|
|
return output.split('\n')[0];
|
|
|
|
} 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))
|
|
|
|
return keystoreProperties;
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
2021-07-08 09:25:35 -04:00
|
|
|
|
|
|
|
def getDateSuffix() {
|
|
|
|
def date = new Date()
|
|
|
|
def formattedDate = date.format('yyyy-MM-dd-HH:mm')
|
|
|
|
return formattedDate
|
|
|
|
}
|