| 
									
										
										
										
											2018-10-26 17:54:12 +00:00
										 |  |  | import org.signal.signing.ApkSignerUtil | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  | import java.security.MessageDigest | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-07-23 22:40:45 +00:00
										 |  |  | apply plugin: 'com.android.application' | 
					
						
							| 
									
										
										
										
											2019-11-04 14:03:18 +00:00
										 |  |  | apply plugin: 'com.google.protobuf' | 
					
						
							| 
									
										
										
										
											2019-10-16 22:37:08 +00:00
										 |  |  | apply plugin: 'androidx.navigation.safeargs' | 
					
						
							| 
									
										
										
										
											2014-06-05 17:16:36 +00:00
										 |  |  | apply plugin: 'witness' | 
					
						
							| 
									
										
										
										
											2019-11-07 13:58:27 +00:00
										 |  |  | apply from: 'translations.gradle' | 
					
						
							| 
									
										
										
										
											2019-10-16 13:01:35 +00:00
										 |  |  | apply from: 'witness-verifications.gradle' | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | repositories { | 
					
						
							| 
									
										
										
										
											2016-12-15 19:34:46 +00:00
										 |  |  |     maven { | 
					
						
							| 
									
										
										
										
											2018-03-08 10:06:21 +00:00
										 |  |  |         url "https://raw.github.com/signalapp/maven/master/photoview/releases/" | 
					
						
							| 
									
										
										
										
											2019-01-26 02:23:00 +00:00
										 |  |  |         content { | 
					
						
							|  |  |  |             includeGroupByRegex "com\\.github\\.chrisbanes.*" | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2016-12-15 19:34:46 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-01-23 06:45:58 +00:00
										 |  |  |     maven { | 
					
						
							| 
									
										
										
										
											2018-03-08 10:06:21 +00:00
										 |  |  |         url "https://raw.github.com/signalapp/maven/master/shortcutbadger/releases/" | 
					
						
							| 
									
										
										
										
											2019-01-26 02:23:00 +00:00
										 |  |  |         content { | 
					
						
							|  |  |  |             includeGroupByRegex "me\\.leolin.*" | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2017-01-23 06:45:58 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-11-06 23:52:18 +00:00
										 |  |  |     maven { | 
					
						
							| 
									
										
										
										
											2018-03-08 10:06:21 +00:00
										 |  |  |         url "https://raw.github.com/signalapp/maven/master/circular-progress-button/releases/" | 
					
						
							| 
									
										
										
										
											2019-01-26 02:23:00 +00:00
										 |  |  |         content { | 
					
						
							|  |  |  |             includeGroupByRegex "com\\.github\\.dmytrodanylyk\\.circular-progress-button\\.*" | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2017-11-06 23:52:18 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2018-04-07 01:15:24 +00:00
										 |  |  |     maven { | 
					
						
							|  |  |  |         url "https://raw.github.com/signalapp/maven/master/sqlcipher/release/" | 
					
						
							| 
									
										
										
										
											2019-01-26 02:23:00 +00:00
										 |  |  |         content { | 
					
						
							|  |  |  |             includeGroupByRegex "org\\.signal.*" | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2017-09-21 01:10:44 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-05-04 18:36:18 +00:00
										 |  |  |     maven { // textdrawable
 | 
					
						
							|  |  |  |         url 'https://dl.bintray.com/amulyakhare/maven' | 
					
						
							| 
									
										
										
										
											2019-01-26 02:23:00 +00:00
										 |  |  |         content { | 
					
						
							|  |  |  |             includeGroupByRegex "com\\.amulyakhare.*" | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2015-05-04 18:36:18 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2018-10-24 23:57:19 +00:00
										 |  |  |     google() | 
					
						
							| 
									
										
										
										
											2019-11-04 14:03:18 +00:00
										 |  |  |     mavenCentral() | 
					
						
							| 
									
										
										
										
											2015-01-24 04:38:45 +00:00
										 |  |  |     jcenter() | 
					
						
							| 
									
										
										
										
											2015-03-02 16:25:19 +00:00
										 |  |  |     mavenLocal() | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-04 14:03:18 +00:00
										 |  |  | protobuf { | 
					
						
							|  |  |  |     protoc { | 
					
						
							|  |  |  |         artifact = 'com.google.protobuf:protoc:3.10.0' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     generateProtoTasks { | 
					
						
							|  |  |  |         all().each { task -> | 
					
						
							|  |  |  |             task.builtins { | 
					
						
							|  |  |  |                 java { | 
					
						
							|  |  |  |                     option "lite" | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-17 05:17:47 +00:00
										 |  |  | def canonicalVersionCode = 772 | 
					
						
							|  |  |  | def canonicalVersionName = "5.2.3" | 
					
						
							| 
									
										
										
										
											2019-05-28 22:57:06 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-09 19:47:31 +00:00
										 |  |  | def postFixSize = 100 | 
					
						
							| 
									
										
										
										
											2019-09-30 15:04:12 +00:00
										 |  |  | def abiPostFix = ['universal'   : 0, | 
					
						
							|  |  |  |                   'armeabi-v7a' : 1, | 
					
						
							| 
									
										
										
										
											2019-05-28 22:57:06 +00:00
										 |  |  |                   'arm64-v8a'   : 2, | 
					
						
							|  |  |  |                   'x86'         : 3, | 
					
						
							| 
									
										
										
										
											2019-09-30 15:04:12 +00:00
										 |  |  |                   'x86_64'      : 4] | 
					
						
							| 
									
										
										
										
											2019-05-01 16:00:26 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  | def keystores = [ 'debug'  : loadKeystoreProperties('keystore.debug.properties') ] | 
					
						
							| 
									
										
										
										
											2020-11-02 13:18:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  | android { | 
					
						
							| 
									
										
										
										
											2020-12-03 18:19:03 +00:00
										 |  |  |     buildToolsVersion BUILD_TOOL_VERSION | 
					
						
							|  |  |  |     compileSdkVersion COMPILE_SDK | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |     flavorDimensions 'distribution', 'environment' | 
					
						
							| 
									
										
										
										
											2016-12-11 21:37:22 +00:00
										 |  |  |     useLibrary 'org.apache.http.legacy' | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-12 18:30:45 +00:00
										 |  |  |     dexOptions { | 
					
						
							|  |  |  |         javaMaxHeapSize "4g" | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-18 19:52:11 +00:00
										 |  |  |     signingConfigs { | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |         if (keystores.debug != null) { | 
					
						
							| 
									
										
										
										
											2020-11-02 13:18:50 +00:00
										 |  |  |             debug { | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |                 storeFile file("${project.rootDir}/${keystores.debug.storeFile}") | 
					
						
							|  |  |  |                 storePassword keystores.debug.storePassword | 
					
						
							|  |  |  |                 keyAlias keystores.debug.keyAlias | 
					
						
							|  |  |  |                 keyPassword keystores.debug.keyPassword | 
					
						
							| 
									
										
										
										
											2020-11-02 13:18:50 +00:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2020-09-18 19:52:11 +00:00
										 |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  |     defaultConfig { | 
					
						
							| 
									
										
										
										
											2019-05-28 22:57:06 +00:00
										 |  |  |         versionCode canonicalVersionCode * postFixSize | 
					
						
							|  |  |  |         versionName canonicalVersionName | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-12-03 18:19:03 +00:00
										 |  |  |         minSdkVersion MINIMUM_SDK | 
					
						
							|  |  |  |         targetSdkVersion TARGET_SDK | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-08 17:43:43 +00:00
										 |  |  |         multiDexEnabled true | 
					
						
							| 
									
										
										
										
											2015-01-12 04:27:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-22 02:58:10 +00:00
										 |  |  |         vectorDrawables.useSupportLibrary = true | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  |         project.ext.set("archivesBaseName", "Signal"); | 
					
						
							| 
									
										
										
										
											2016-11-22 02:58:10 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-17 19:27:35 +00:00
										 |  |  |         buildConfigField "long", "BUILD_TIMESTAMP", getLastCommitTimestamp() + "L" | 
					
						
							| 
									
										
										
										
											2018-10-11 23:45:22 +00:00
										 |  |  |         buildConfigField "String", "SIGNAL_URL", "\"https://textsecure-service.whispersystems.org\"" | 
					
						
							| 
									
										
										
										
											2019-09-26 14:12:51 +00:00
										 |  |  |         buildConfigField "String", "STORAGE_URL", "\"https://storage.signal.org\"" | 
					
						
							| 
									
										
										
										
											2017-08-08 23:37:15 +00:00
										 |  |  |         buildConfigField "String", "SIGNAL_CDN_URL", "\"https://cdn.signal.org\"" | 
					
						
							| 
									
										
										
										
											2020-04-06 00:32:06 +00:00
										 |  |  |         buildConfigField "String", "SIGNAL_CDN2_URL", "\"https://cdn2.signal.org\"" | 
					
						
							| 
									
										
										
										
											2018-07-18 15:27:05 +00:00
										 |  |  |         buildConfigField "String", "SIGNAL_CONTACT_DISCOVERY_URL", "\"https://api.directory.signal.org\"" | 
					
						
							| 
									
										
										
										
											2018-06-11 16:37:01 +00:00
										 |  |  |         buildConfigField "String", "SIGNAL_SERVICE_STATUS_URL", "\"uptime.signal.org\"" | 
					
						
							| 
									
										
										
										
											2019-12-03 17:31:23 +00:00
										 |  |  |         buildConfigField "String", "SIGNAL_KEY_BACKUP_URL", "\"https://api.backup.signal.org\"" | 
					
						
							| 
									
										
										
										
											2020-11-20 20:42:46 +00:00
										 |  |  |         buildConfigField "String", "SIGNAL_SFU_URL", "\"https://sfu.voip.signal.org\"" | 
					
						
							| 
									
										
										
										
											2019-01-15 08:41:05 +00:00
										 |  |  |         buildConfigField "String", "CONTENT_PROXY_HOST", "\"contentproxy.signal.org\"" | 
					
						
							|  |  |  |         buildConfigField "int", "CONTENT_PROXY_PORT", "443" | 
					
						
							| 
									
										
										
										
											2020-01-23 16:28:17 +00:00
										 |  |  |         buildConfigField "String", "SIGNAL_AGENT", "\"OWA\"" | 
					
						
							| 
									
										
										
										
											2020-09-09 19:36:38 +00:00
										 |  |  |         buildConfigField "String", "CDS_MRENCLAVE", "\"c98e00a4e3ff977a56afefe7362a27e4961e4f19e211febfbb19b897e6b80b15\"" | 
					
						
							| 
									
										
										
										
											2020-10-05 13:26:51 +00:00
										 |  |  |         buildConfigField "KbsEnclave", "KBS_ENCLAVE", "new KbsEnclave(\"fe7c1bfae98f9b073d220366ea31163ee82f6d04bead774f71ca8e5c40847bfe\"," + | 
					
						
							|  |  |  |                                                                      "\"fe7c1bfae98f9b073d220366ea31163ee82f6d04bead774f71ca8e5c40847bfe\", " + | 
					
						
							|  |  |  |                                                                      "\"a3baab19ef6ce6f34ab9ebb25ba722725ae44a8872dc0ff08ad6d83a9489de87\")"; | 
					
						
							|  |  |  |         buildConfigField "KbsEnclave[]", "KBS_FALLBACKS", "new KbsEnclave[0]" | 
					
						
							| 
									
										
										
										
											2018-10-11 23:45:22 +00:00
										 |  |  |         buildConfigField "String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF\"" | 
					
						
							| 
									
										
										
										
											2020-05-19 18:45:46 +00:00
										 |  |  |         buildConfigField "String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X0=\"" | 
					
						
							| 
									
										
										
										
											2019-03-14 16:33:43 +00:00
										 |  |  |         buildConfigField "String[]", "LANGUAGES", "new String[]{\"" + autoResConfig().collect { s -> s.replace('-r', '_') }.join('", "') + '"}' | 
					
						
							| 
									
										
										
										
											2019-05-28 22:57:06 +00:00
										 |  |  |         buildConfigField "int", "CANONICAL_VERSION_CODE", "$canonicalVersionCode" | 
					
						
							| 
									
										
										
										
											2018-02-03 00:31:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         ndk { | 
					
						
							| 
									
										
										
										
											2019-05-28 22:57:06 +00:00
										 |  |  |             abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' | 
					
						
							| 
									
										
										
										
											2018-02-03 00:31:49 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2019-03-14 16:33:43 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         resConfigs autoResConfig() | 
					
						
							| 
									
										
										
										
											2019-03-28 20:21:57 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         splits { | 
					
						
							|  |  |  |             abi { | 
					
						
							|  |  |  |                 enable true | 
					
						
							|  |  |  |                 reset() | 
					
						
							| 
									
										
										
										
											2019-05-28 22:57:06 +00:00
										 |  |  |                 include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' | 
					
						
							| 
									
										
										
										
											2019-03-28 20:21:57 +00:00
										 |  |  |                 universalApk true | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-01-22 20:02:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-22 21:33:29 +00:00
										 |  |  |     compileOptions { | 
					
						
							| 
									
										
										
										
											2020-12-03 18:19:03 +00:00
										 |  |  |         sourceCompatibility JAVA_VERSION | 
					
						
							|  |  |  |         targetCompatibility JAVA_VERSION | 
					
						
							| 
									
										
										
										
											2014-04-22 21:33:29 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-31 00:49:57 +00:00
										 |  |  |     packagingOptions { | 
					
						
							|  |  |  |         exclude 'LICENSE.txt' | 
					
						
							|  |  |  |         exclude 'LICENSE' | 
					
						
							|  |  |  |         exclude 'NOTICE' | 
					
						
							|  |  |  |         exclude 'asm-license.txt' | 
					
						
							| 
									
										
										
										
											2015-05-15 18:57:18 +00:00
										 |  |  |         exclude 'META-INF/LICENSE' | 
					
						
							|  |  |  |         exclude 'META-INF/NOTICE' | 
					
						
							| 
									
										
										
										
											2018-08-09 14:15:43 +00:00
										 |  |  |         exclude 'META-INF/proguard/androidx-annotations.pro' | 
					
						
							| 
									
										
										
										
											2014-12-31 00:49:57 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-27 19:34:12 +00:00
										 |  |  |     aaptOptions { | 
					
						
							| 
									
										
										
										
											2020-09-14 13:49:33 +00:00
										 |  |  |         ignoreAssetsPattern '!contours.tfl:!LMprec_600.emd:!blazeface.tfl' | 
					
						
							| 
									
										
										
										
											2020-08-27 19:34:12 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  |     buildTypes { | 
					
						
							| 
									
										
										
										
											2015-01-12 04:27:34 +00:00
										 |  |  |         debug { | 
					
						
							| 
									
										
										
										
											2020-11-02 13:18:50 +00:00
										 |  |  |             if (keystores['debug'] != null) { | 
					
						
							|  |  |  |                 signingConfig signingConfigs.debug | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |             isDefault true | 
					
						
							| 
									
										
										
										
											2015-01-21 07:26:58 +00:00
										 |  |  |             minifyEnabled true | 
					
						
							| 
									
										
										
										
											2015-04-02 01:04:23 +00:00
										 |  |  |             proguardFiles getDefaultProguardFile('proguard-android.txt'), | 
					
						
							| 
									
										
										
										
											2019-11-20 17:33:57 +00: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' | 
					
						
							| 
									
										
										
										
											2015-01-12 04:27:34 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  |         flipper { | 
					
						
							|  |  |  |             initWith debug | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |             isDefault false | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  |             minifyEnabled false | 
					
						
							| 
									
										
										
										
											2020-12-03 18:19:03 +00:00
										 |  |  |             matchingFallbacks = ['debug'] | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  |         release { | 
					
						
							| 
									
										
										
										
											2015-01-21 07:26:58 +00:00
										 |  |  |             minifyEnabled true | 
					
						
							| 
									
										
										
										
											2015-05-15 18:54:56 +00:00
										 |  |  |             proguardFiles = buildTypes.debug.proguardFiles | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-12-20 18:28:55 +00:00
										 |  |  |         perf { | 
					
						
							|  |  |  |             initWith debug | 
					
						
							|  |  |  |             isDefault false | 
					
						
							|  |  |  |             debuggable false | 
					
						
							|  |  |  |             matchingFallbacks = ['debug'] | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2014-01-11 02:20:25 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  |     productFlavors { | 
					
						
							|  |  |  |         play { | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |             dimension 'distribution' | 
					
						
							|  |  |  |             isDefault true | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  |             ext.websiteUpdateUrl = "null" | 
					
						
							|  |  |  |             buildConfigField "boolean", "PLAY_STORE_DISABLED", "false" | 
					
						
							|  |  |  |             buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl" | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         website { | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |             dimension 'distribution' | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  |             ext.websiteUpdateUrl = "https://updates.signal.org/android" | 
					
						
							|  |  |  |             buildConfigField "boolean", "PLAY_STORE_DISABLED", "true" | 
					
						
							|  |  |  |             buildConfigField "String", "NOPLAY_UPDATE_URL", "\"$ext.websiteUpdateUrl\"" | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-10-29 19:33:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         internal { | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |             dimension 'distribution' | 
					
						
							| 
									
										
										
										
											2020-10-29 19:33:15 +00:00
										 |  |  |             ext.websiteUpdateUrl = "null" | 
					
						
							|  |  |  |             buildConfigField "boolean", "PLAY_STORE_DISABLED", "false" | 
					
						
							|  |  |  |             buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl" | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         prod { | 
					
						
							|  |  |  |             dimension 'environment' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             isDefault true | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         staging { | 
					
						
							|  |  |  |             dimension 'environment' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             applicationIdSuffix ".staging" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             buildConfigField "String", "SIGNAL_URL", "\"https://textsecure-service-staging.whispersystems.org\"" | 
					
						
							|  |  |  |             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\", " + | 
					
						
							|  |  |  |                                                                          "\"038c40bbbacdc873caa81ac793bb75afde6dfe436a99ab1f15e3f0cbb7434ced\", " + | 
					
						
							|  |  |  |                                                                          "\"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=\"" | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-06 17:20:52 +00:00
										 |  |  |     android.applicationVariants.all { variant -> | 
					
						
							| 
									
										
										
										
											2019-05-28 22:57:06 +00:00
										 |  |  |         variant.outputs.each { output -> | 
					
						
							|  |  |  |             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") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             output.versionCodeOverride = canonicalVersionCode * postFixSize + postFix | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-24 18:14:07 +00:00
										 |  |  |     lintOptions { | 
					
						
							|  |  |  |         abortOnError true | 
					
						
							|  |  |  |         baseline file("lint-baseline.xml") | 
					
						
							| 
									
										
										
										
											2019-10-17 12:08:24 +00:00
										 |  |  |         disable "LintError" | 
					
						
							| 
									
										
										
										
											2014-01-11 02:20:25 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2019-03-11 19:40:26 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     testOptions { | 
					
						
							|  |  |  |         unitTests { | 
					
						
							|  |  |  |             includeAndroidResources = true | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2013-10-10 20:52:24 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  | dependencies { | 
					
						
							| 
									
										
										
										
											2020-05-01 19:19:24 +00:00
										 |  |  |     lintChecks project(':lintchecks') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-09 14:12:28 +00:00
										 |  |  |     implementation ('androidx.appcompat:appcompat:1.2.0') { | 
					
						
							| 
									
										
										
										
											2020-05-18 15:30:03 +00:00
										 |  |  |         force = true | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-11-09 14:12:28 +00:00
										 |  |  |     implementation 'androidx.recyclerview:recyclerview:1.1.0' | 
					
						
							|  |  |  |     implementation 'com.google.android.material:material:1.2.1' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  |     implementation 'androidx.legacy:legacy-support-v13:1.0.0' | 
					
						
							|  |  |  |     implementation 'androidx.cardview:cardview:1.0.0' | 
					
						
							|  |  |  |     implementation 'androidx.preference:preference:1.0.0' | 
					
						
							|  |  |  |     implementation 'androidx.legacy:legacy-preference-v14:1.0.0' | 
					
						
							|  |  |  |     implementation 'androidx.gridlayout:gridlayout:1.0.0' | 
					
						
							|  |  |  |     implementation 'androidx.exifinterface:exifinterface:1.0.0' | 
					
						
							| 
									
										
										
										
											2020-11-09 14:12:28 +00:00
										 |  |  |     implementation 'androidx.constraintlayout:constraintlayout:2.0.4' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  |     implementation 'androidx.multidex:multidex:2.0.1' | 
					
						
							|  |  |  |     implementation 'androidx.navigation:navigation-fragment:2.1.0' | 
					
						
							|  |  |  |     implementation 'androidx.navigation:navigation-ui:2.1.0' | 
					
						
							|  |  |  |     implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' | 
					
						
							|  |  |  |     implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:1.0.0-alpha05' | 
					
						
							|  |  |  |     implementation 'androidx.lifecycle:lifecycle-common-java8:2.1.0' | 
					
						
							| 
									
										
										
										
											2020-11-09 13:21:59 +00:00
										 |  |  |     implementation "androidx.camera:camera-core:1.0.0-beta11" | 
					
						
							|  |  |  |     implementation "androidx.camera:camera-camera2:1.0.0-beta11" | 
					
						
							|  |  |  |     implementation "androidx.camera:camera-lifecycle:1.0.0-beta11" | 
					
						
							|  |  |  |     implementation "androidx.camera:camera-view:1.0.0-alpha18" | 
					
						
							| 
									
										
										
										
											2020-03-25 12:30:13 +00:00
										 |  |  |     implementation "androidx.concurrent:concurrent-futures:1.0.0" | 
					
						
							| 
									
										
										
										
											2020-04-24 02:11:07 +00:00
										 |  |  |     implementation "androidx.autofill:autofill:1.0.0" | 
					
						
							| 
									
										
										
										
											2020-06-03 00:35:44 +00:00
										 |  |  |     implementation 'com.google.firebase:firebase-ml-vision:24.0.3' | 
					
						
							|  |  |  |     implementation 'com.google.firebase:firebase-ml-vision-face-model:20.0.1' | 
					
						
							| 
									
										
										
										
											2020-05-07 01:03:00 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-03 00:35:44 +00:00
										 |  |  |     implementation ('com.google.firebase:firebase-messaging:20.2.0') { | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00: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' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     implementation 'com.google.android.gms:play-services-maps:16.1.0' | 
					
						
							|  |  |  |     implementation 'com.google.android.gms:play-services-auth:16.0.1' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     implementation 'com.google.android.exoplayer:exoplayer-core:2.9.1' | 
					
						
							|  |  |  |     implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.1' | 
					
						
							| 
									
										
										
										
											2020-10-13 12:20:52 +00:00
										 |  |  |     implementation 'com.google.android.exoplayer:extension-mediasession:2.9.1' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     implementation 'org.conscrypt:conscrypt-android:2.0.0' | 
					
						
							|  |  |  |     implementation 'org.signal:aesgcmprovider:0.0.3' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     implementation project(':libsignal-service') | 
					
						
							| 
									
										
										
										
											2020-12-03 18:19:03 +00:00
										 |  |  |     implementation project(':paging') | 
					
						
							| 
									
										
										
										
											2020-12-04 23:31:58 +00:00
										 |  |  |     implementation project(':core-util') | 
					
						
							| 
									
										
										
										
											2021-01-05 23:13:38 +00:00
										 |  |  |     implementation project(':video') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-01 22:13:23 +00:00
										 |  |  |     implementation 'org.signal:zkgroup-android:0.7.0' | 
					
						
							| 
									
										
										
										
											2021-01-07 19:09:25 +00:00
										 |  |  |     implementation 'org.whispersystems:signal-client-android:0.1.5' | 
					
						
							| 
									
										
										
										
											2020-11-12 19:29:06 +00:00
										 |  |  |     implementation 'com.google.protobuf:protobuf-javalite:3.10.0' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  |     implementation 'org.signal:argon2:13.1@aar' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-19 21:03:37 +00:00
										 |  |  |     implementation 'org.signal:ringrtc-android:2.8.10' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     implementation "me.leolin:ShortcutBadger:1.1.16" | 
					
						
							|  |  |  |     implementation 'se.emilsjolander:stickylistheaders:2.7.0' | 
					
						
							|  |  |  |     implementation 'com.jpardogo.materialtabstrip:library:1.0.9' | 
					
						
							|  |  |  |     implementation 'org.apache.httpcomponents:httpclient-android:4.3.5' | 
					
						
							|  |  |  |     implementation 'com.github.chrisbanes:PhotoView:2.1.3' | 
					
						
							| 
									
										
										
										
											2020-03-03 13:52:11 +00:00
										 |  |  |     implementation 'com.github.bumptech.glide:glide:4.11.0' | 
					
						
							|  |  |  |     annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  |     annotationProcessor 'androidx.annotation:annotation:1.1.0' | 
					
						
							|  |  |  |     implementation 'com.makeramen:roundedimageview:2.1.0' | 
					
						
							|  |  |  |     implementation 'com.pnikosis:materialish-progress:1.5' | 
					
						
							|  |  |  |     implementation 'org.greenrobot:eventbus:3.0.0' | 
					
						
							|  |  |  |     implementation 'pl.tajchert:waitingdots:0.1.0' | 
					
						
							|  |  |  |     implementation 'com.melnykov:floatingactionbutton:1.3.0' | 
					
						
							|  |  |  |     implementation 'com.google.zxing:android-integration:3.1.0' | 
					
						
							|  |  |  |     implementation 'mobi.upod:time-duration-picker:1.1.3' | 
					
						
							|  |  |  |     implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' | 
					
						
							|  |  |  |     implementation 'com.google.zxing:core:3.2.1' | 
					
						
							|  |  |  |     implementation ('com.davemorrissey.labs:subsampling-scale-image-view:3.6.0') { | 
					
						
							|  |  |  |         exclude group: 'com.android.support', module: 'support-annotations' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     implementation ('cn.carbswang.android:NumberPickerView:1.0.9') { | 
					
						
							|  |  |  |         exclude group: 'com.android.support', module: 'appcompat-v7' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     implementation ('com.tomergoldst.android:tooltips:1.0.6') { | 
					
						
							|  |  |  |         exclude group: 'com.android.support', module: 'appcompat-v7' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     implementation ('com.klinkerapps:android-smsmms:4.0.1') { | 
					
						
							|  |  |  |         exclude group: 'com.squareup.okhttp', module: 'okhttp' | 
					
						
							|  |  |  |         exclude group: 'com.squareup.okhttp', module: 'okhttp-urlconnection' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     implementation 'com.annimon:stream:1.1.8' | 
					
						
							|  |  |  |     implementation ('com.takisoft.fix:colorpicker:0.9.1') { | 
					
						
							|  |  |  |         exclude group: 'com.android.support', module: 'appcompat-v7' | 
					
						
							|  |  |  |         exclude group: 'com.android.support', module: 'recyclerview-v7' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     implementation 'com.airbnb.android:lottie:3.0.7' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     implementation 'com.codewaves.stickyheadergrid:stickyheadergrid:0.9.4' | 
					
						
							|  |  |  |     implementation 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3-S2' | 
					
						
							|  |  |  |     implementation 'org.signal:android-database-sqlcipher:3.5.9-S3' | 
					
						
							|  |  |  |     implementation ('com.googlecode.ez-vcard:ez-vcard:0.9.11') { | 
					
						
							|  |  |  |         exclude group: 'com.fasterxml.jackson.core' | 
					
						
							|  |  |  |         exclude group: 'org.freemarker' | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-03-28 04:49:30 +00:00
										 |  |  |     implementation 'dnsjava:dnsjava:2.1.9' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     flipperImplementation 'com.facebook.flipper:flipper:0.32.2' | 
					
						
							|  |  |  |     flipperImplementation 'com.facebook.soloader:soloader:0.8.2' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     testImplementation 'junit:junit:4.12' | 
					
						
							|  |  |  |     testImplementation 'org.assertj:assertj-core:3.11.1' | 
					
						
							| 
									
										
										
										
											2020-08-18 14:57:35 +00:00
										 |  |  |     testImplementation 'org.mockito:mockito-core:2.8.9' | 
					
						
							|  |  |  |     testImplementation 'org.powermock:powermock-api-mockito2:1.7.4' | 
					
						
							|  |  |  |     testImplementation 'org.powermock:powermock-module-junit4:1.7.4' | 
					
						
							|  |  |  |     testImplementation 'org.powermock:powermock-module-junit4-rule:1.7.4' | 
					
						
							|  |  |  |     testImplementation 'org.powermock:powermock-classloading-xstream:1.7.4' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     testImplementation 'androidx.test:core:1.2.0' | 
					
						
							| 
									
										
										
										
											2020-10-15 19:12:53 +00:00
										 |  |  |     testImplementation ('org.robolectric:robolectric:4.4') { | 
					
						
							| 
									
										
										
										
											2020-02-28 18:03:06 +00:00
										 |  |  |         exclude group: 'com.google.protobuf', module: 'protobuf-java' | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-10-15 19:12:53 +00:00
										 |  |  |     testImplementation 'org.robolectric:shadows-multidex:4.4' | 
					
						
							|  |  |  |     testImplementation 'org.hamcrest:hamcrest:2.2' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     androidTestImplementation 'androidx.test.ext:junit:1.1.1' | 
					
						
							|  |  |  |     androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | dependencyVerification { | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |     configuration = '(play|website)(Prod|Staging)(Debug|Release)RuntimeClasspath' | 
					
						
							| 
									
										
										
										
											2020-03-01 15:54:11 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-26 17:54:12 +00:00
										 |  |  | def assembleWebsiteDescriptor = { variant, file -> | 
					
						
							|  |  |  |     if (file.exists()) { | 
					
						
							|  |  |  |         MessageDigest md = MessageDigest.getInstance("SHA-256"); | 
					
						
							|  |  |  |         file.eachByte 4096, {bytes, size -> | 
					
						
							|  |  |  |             md.update(bytes, 0, size); | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2018-10-26 17:54:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         String digest  = md.digest().collect {String.format "%02x", it}.join(); | 
					
						
							|  |  |  |         String url     = variant.productFlavors.get(0).ext.websiteUpdateUrl | 
					
						
							|  |  |  |         String apkName = file.getName() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         String descriptor = "{" + | 
					
						
							| 
									
										
										
										
											2019-08-28 14:24:33 +00:00
										 |  |  |                 "\"versionCode\" : ${canonicalVersionCode * postFixSize + abiPostFix['universal']}," + | 
					
						
							| 
									
										
										
										
											2019-05-28 22:57:06 +00:00
										 |  |  |                 "\"versionName\" : \"$canonicalVersionName\"," + | 
					
						
							| 
									
										
										
										
											2018-10-26 17:54:12 +00:00
										 |  |  |                 "\"sha256sum\" : \"$digest\"," + | 
					
						
							|  |  |  |                 "\"url\" : \"$url/$apkName\"" + | 
					
						
							|  |  |  |                 "}" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         File descriptorFile = new File(file.getParent(), apkName.replace(".apk", ".json")) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         descriptorFile.write(descriptor) | 
					
						
							| 
									
										
										
										
											2017-02-26 22:36:43 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-26 17:54:12 +00:00
										 |  |  | def signProductionRelease = { variant -> | 
					
						
							| 
									
										
										
										
											2019-03-28 20:21:57 +00:00
										 |  |  |     variant.outputs.collect { output -> | 
					
						
							|  |  |  |         String apkName    = output.outputFile.name | 
					
						
							|  |  |  |         File   inputFile  = new File(output.outputFile.path) | 
					
						
							|  |  |  |         File   outputFile = new File(output.outputFile.parent, apkName.replace('-unsigned', '')) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         new ApkSignerUtil('sun.security.pkcs11.SunPKCS11', | 
					
						
							|  |  |  |                           'pkcs11.config', | 
					
						
							|  |  |  |                           'PKCS11', | 
					
						
							|  |  |  |                           'file:pkcs11.password').calculateSignature(inputFile.getAbsolutePath(), | 
					
						
							|  |  |  |                                                                      outputFile.getAbsolutePath()) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         inputFile.delete() | 
					
						
							|  |  |  |         outputFile | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2018-10-26 17:54:12 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-26 02:23:00 +00:00
										 |  |  | task signProductionPlayRelease { | 
					
						
							|  |  |  |     doLast { | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |         signProductionRelease(android.applicationVariants.find { (it.name == 'playProdRelease') }) | 
					
						
							| 
									
										
										
										
											2019-01-26 02:23:00 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2018-10-26 17:54:12 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-30 13:10:19 +00:00
										 |  |  | task signProductionInternalRelease { | 
					
						
							| 
									
										
										
										
											2020-10-30 12:17:29 +00:00
										 |  |  |     doLast { | 
					
						
							| 
									
										
										
										
											2020-11-02 21:31:32 +00:00
										 |  |  |         signProductionRelease(android.applicationVariants.find { (it.name == 'internalProdRelease') }) | 
					
						
							| 
									
										
										
										
											2020-10-30 12:17:29 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-26 02:23:00 +00:00
										 |  |  | task signProductionWebsiteRelease { | 
					
						
							|  |  |  |     doLast { | 
					
						
							| 
									
										
										
										
											2020-11-06 00:27:24 +00:00
										 |  |  |         def  variant       = android.applicationVariants.find { (it.name == 'websiteProdRelease') } | 
					
						
							| 
									
										
										
										
											2019-03-28 20:21:57 +00:00
										 |  |  |         File signedRelease = signProductionRelease(variant).find { it.name.contains('universal') } | 
					
						
							|  |  |  |         assembleWebsiteDescriptor(variant, signedRelease) | 
					
						
							| 
									
										
										
										
											2019-01-26 02:23:00 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2018-10-26 17:54:12 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-17 19:27:35 +00:00
										 |  |  | def getLastCommitTimestamp() { | 
					
						
							|  |  |  |     new ByteArrayOutputStream().withStream { os -> | 
					
						
							|  |  |  |         def result = exec { | 
					
						
							|  |  |  |             executable = 'git' | 
					
						
							|  |  |  |             args = ['log', '-1', '--pretty=format:%ct'] | 
					
						
							|  |  |  |             standardOutput = os | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         return os.toString() + "000" | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-08-18 14:57:35 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | tasks.withType(Test) { | 
					
						
							|  |  |  |     testLogging { | 
					
						
							|  |  |  |         events "failed" | 
					
						
							|  |  |  |         exceptionFormat "full" | 
					
						
							|  |  |  |         showCauses true | 
					
						
							|  |  |  |         showExceptions true | 
					
						
							|  |  |  |         showStackTraces true | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-11-02 13:18:50 +00: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; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |