2017-02-26 22:36:43 +00:00
|
|
|
import java.security.MessageDigest
|
|
|
|
|
2013-10-10 20:52:24 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2014-10-01 04:46:13 +00:00
|
|
|
maven {
|
|
|
|
url "https://repo1.maven.org/maven2"
|
2016-08-30 00:49:49 +00:00
|
|
|
jcenter()
|
2014-10-01 04:46:13 +00:00
|
|
|
}
|
2013-10-10 20:52:24 +00:00
|
|
|
}
|
|
|
|
dependencies {
|
2017-03-09 01:38:55 +00:00
|
|
|
classpath 'com.android.tools.build:gradle:2.3.0'
|
2014-06-05 17:16:36 +00:00
|
|
|
classpath files('libs/gradle-witness.jar')
|
2017-08-07 04:43:11 +00:00
|
|
|
classpath 'me.tatarka:gradle-retrolambda:3.7.0'
|
2013-10-10 20:52:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-23 22:40:45 +00:00
|
|
|
apply plugin: 'com.android.application'
|
2014-06-05 17:16:36 +00:00
|
|
|
apply plugin: 'witness'
|
2017-08-07 04:43:11 +00:00
|
|
|
apply plugin: 'me.tatarka.retrolambda'
|
2013-10-10 20:52:24 +00:00
|
|
|
|
|
|
|
repositories {
|
2014-10-01 04:46:13 +00:00
|
|
|
maven {
|
2014-12-30 09:36:51 +00:00
|
|
|
url "https://repo1.maven.org/maven2/"
|
2014-10-01 04:46:13 +00:00
|
|
|
}
|
2013-10-10 20:52:24 +00:00
|
|
|
maven {
|
2014-06-29 03:40:57 +00:00
|
|
|
url "https://raw.github.com/whispersystems/maven/master/preferencefragment/releases/"
|
2013-10-10 20:52:24 +00:00
|
|
|
}
|
2014-06-28 21:06:15 +00:00
|
|
|
maven {
|
|
|
|
url "https://raw.github.com/whispersystems/maven/master/smil/releases/"
|
|
|
|
}
|
2016-12-15 19:34:46 +00:00
|
|
|
maven {
|
|
|
|
url "https://raw.github.com/whispersystems/maven/master/photoview/releases/"
|
|
|
|
}
|
2017-01-23 06:45:58 +00:00
|
|
|
maven {
|
|
|
|
url "https://raw.github.com/whispersystems/maven/master/shortcutbadger/releases/"
|
|
|
|
}
|
2015-05-04 18:36:18 +00:00
|
|
|
maven { // textdrawable
|
|
|
|
url 'https://dl.bintray.com/amulyakhare/maven'
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2017-01-08 17:43:43 +00:00
|
|
|
compile 'com.android.support:appcompat-v7:25.1.0'
|
|
|
|
compile 'com.android.support:recyclerview-v7:25.1.0'
|
|
|
|
compile 'com.android.support:design:25.1.0'
|
|
|
|
compile 'com.android.support:support-v13:25.1.0'
|
2017-01-09 15:51:56 +00:00
|
|
|
compile 'com.android.support:cardview-v7:25.1.0'
|
2017-01-08 17:43:43 +00:00
|
|
|
compile ('com.android.support:support-v4-preferencefragment:1.0.0@aar'){
|
|
|
|
exclude module: 'support-v4'
|
|
|
|
}
|
|
|
|
compile ('com.android.support:gridlayout-v7:25.1.0') {
|
|
|
|
exclude module: 'support-v4'
|
|
|
|
}
|
|
|
|
compile 'com.android.support:multidex:1.0.1'
|
|
|
|
|
2017-01-07 02:00:40 +00:00
|
|
|
compile 'com.google.android.gms:play-services-gcm:9.6.1'
|
|
|
|
compile 'com.google.android.gms:play-services-maps:9.6.1'
|
|
|
|
compile 'com.google.android.gms:play-services-places:9.6.1'
|
2017-01-08 17:43:43 +00:00
|
|
|
|
2017-04-13 21:15:06 +00:00
|
|
|
compile 'com.google.android.exoplayer:exoplayer:r2.3.1'
|
|
|
|
|
2017-01-08 17:43:43 +00:00
|
|
|
compile 'org.whispersystems:jobmanager:1.0.2'
|
|
|
|
compile 'org.whispersystems:libpastelog:1.0.7'
|
2017-08-29 00:56:49 +00:00
|
|
|
compile 'org.whispersystems:signal-service-android:2.6.5'
|
2017-06-13 17:27:51 +00:00
|
|
|
compile 'org.whispersystems:webrtc-android:M59-S1'
|
2017-01-08 17:43:43 +00:00
|
|
|
|
2017-04-20 23:29:51 +00:00
|
|
|
compile "me.leolin:ShortcutBadger:1.1.16"
|
2017-01-08 17:43:43 +00:00
|
|
|
compile 'se.emilsjolander:stickylistheaders:2.7.0'
|
2015-05-06 20:53:55 +00:00
|
|
|
compile 'com.jpardogo.materialtabstrip:library:1.0.9'
|
2014-09-16 23:21:41 +00:00
|
|
|
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
|
2016-12-15 19:34:46 +00:00
|
|
|
compile 'com.github.chrisbanes.photoview:library:1.3.1'
|
2016-02-17 22:37:45 +00:00
|
|
|
compile 'com.github.bumptech.glide:glide:3.7.0'
|
2015-06-12 22:31:12 +00:00
|
|
|
compile 'com.makeramen:roundedimageview:2.1.0'
|
2015-06-27 03:14:51 +00:00
|
|
|
compile 'com.pnikosis:materialish-progress:1.5'
|
2017-02-18 04:27:11 +00:00
|
|
|
compile 'org.greenrobot:eventbus:3.0.0'
|
2015-06-29 15:49:32 +00:00
|
|
|
compile 'pl.tajchert:waitingdots:0.1.0'
|
2014-12-30 01:31:41 +00:00
|
|
|
compile 'com.soundcloud.android:android-crop:0.9.10@aar'
|
2015-09-29 20:14:22 +00:00
|
|
|
compile 'com.melnykov:floatingactionbutton:1.3.0'
|
2014-11-22 17:47:02 +00:00
|
|
|
compile 'com.google.zxing:android-integration:3.1.0'
|
2014-11-12 03:57:53 +00:00
|
|
|
compile 'com.squareup.dagger:dagger:1.2.2'
|
2015-01-21 07:26:58 +00:00
|
|
|
compile ("com.doomonafireball.betterpickers:library:1.5.3") {
|
2014-12-13 00:07:02 +00:00
|
|
|
exclude group: 'com.android.support', module: 'support-v4'
|
|
|
|
}
|
2014-11-12 03:57:53 +00:00
|
|
|
provided 'com.squareup.dagger:dagger-compiler:1.2.2'
|
2015-05-04 18:36:18 +00:00
|
|
|
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
2015-08-24 22:24:31 +00:00
|
|
|
compile 'com.h6ah4i.android.compat:mulsellistprefcompat:1.0.0'
|
2015-11-19 18:21:19 +00:00
|
|
|
compile 'com.google.zxing:core:3.2.1'
|
2016-12-14 18:21:14 +00:00
|
|
|
compile ('com.davemorrissey.labs:subsampling-scale-image-view:3.6.0') {
|
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
}
|
2016-08-16 03:23:56 +00:00
|
|
|
compile ('cn.carbswang.android:NumberPickerView:1.0.9') {
|
|
|
|
exclude group: 'com.android.support', module: 'appcompat-v7'
|
|
|
|
}
|
2017-02-11 19:05:53 +00:00
|
|
|
compile ('com.tomergoldst.android:tooltips:1.0.6') {
|
|
|
|
exclude group: 'com.android.support', module: 'appcompat-v7'
|
|
|
|
}
|
2017-05-08 22:32:59 +00:00
|
|
|
compile ('com.klinkerapps:android-smsmms:4.0.1') {
|
|
|
|
exclude group: 'com.squareup.okhttp', module: 'okhttp'
|
|
|
|
exclude group: 'com.squareup.okhttp', module: 'okhttp-urlconnection'
|
|
|
|
}
|
2017-08-07 04:43:11 +00:00
|
|
|
compile 'com.annimon:stream:1.1.8'
|
|
|
|
|
2016-08-16 03:23:56 +00:00
|
|
|
|
2015-09-03 23:31:26 +00:00
|
|
|
testCompile 'junit:junit:4.12'
|
|
|
|
testCompile 'org.assertj:assertj-core:1.7.1'
|
|
|
|
testCompile 'org.mockito:mockito-core:1.9.5'
|
|
|
|
testCompile 'org.powermock:powermock-api-mockito:1.6.1'
|
|
|
|
testCompile 'org.powermock:powermock-module-junit4:1.6.1'
|
|
|
|
testCompile 'org.powermock:powermock-module-junit4-rule:1.6.1'
|
|
|
|
testCompile 'org.powermock:powermock-classloading-xstream:1.6.1'
|
|
|
|
|
2015-08-10 16:30:59 +00:00
|
|
|
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
|
|
|
|
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
|
2014-12-31 00:49:57 +00:00
|
|
|
androidTestCompile ('org.assertj:assertj-core:1.7.1') {
|
|
|
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
|
|
|
}
|
2016-11-03 16:36:45 +00:00
|
|
|
androidTestCompile ('com.squareup.assertj:assertj-android:1.1.1') {
|
2015-06-02 04:44:10 +00:00
|
|
|
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
}
|
2013-10-10 20:52:24 +00:00
|
|
|
}
|
|
|
|
|
2015-02-28 17:40:52 +00:00
|
|
|
dependencyVerification {
|
|
|
|
verify = [
|
2017-01-08 17:43:43 +00:00
|
|
|
'com.android.support:appcompat-v7:b48bfd5efc14da938ba0647f9894aa7d3d90f0b618167652a318f6f336ef303e',
|
|
|
|
'com.android.support:recyclerview-v7:45beed1778f785c75540b68aa7735b8973a518ac21e8d763188dbbdae6c5b65d',
|
|
|
|
'com.android.support:design:92466557dc6a222bbff361801b26979573cb7086119331e78c74a2df34d5e11e',
|
|
|
|
'com.android.support:support-v13:deeb43c2878025f2a0485791f66b5f59a1c6a4c6671c6ad7bb20abfeffaa313f',
|
2017-01-09 15:51:56 +00:00
|
|
|
'com.android.support:cardview-v7:cd6f472f130a75f029cd1b7c56f72174023d56a2eee2b97577837fe39169d5df',
|
2017-01-08 17:43:43 +00:00
|
|
|
'com.android.support:support-v4-preferencefragment:5470f5872514a6226fa1fc6f4e000991f38805691c534cf0bd2778911fc773ad',
|
|
|
|
'com.android.support:gridlayout-v7:c24f2aa68089fd31b39811bc502e24637a6a8cc29bbf709cda4f4605047c9e11',
|
|
|
|
'com.android.support:multidex:60df8e7153fabdcf3a6a48a2ce5980b599cf25cbeb3b689b7b615975ca731840',
|
2017-01-07 02:00:40 +00:00
|
|
|
'com.google.android.gms:play-services-gcm:312e61253a236f2d9b750b9c04fc92fd190d23b0b2755c99de6ce4a28b259dae',
|
|
|
|
'com.google.android.gms:play-services-maps:45e8021e7ddac4a44a82a0e9698991389ded3023d35c58f38dbd86d54211ec0e',
|
|
|
|
'com.google.android.gms:play-services-places:abf3a4a3b146ec7e6e753be62775e512868cf37d6f88ffe2d81167b33b57132b',
|
2017-04-13 21:15:06 +00:00
|
|
|
'com.google.android.exoplayer:exoplayer:955085aa611a8f7cf6c61b88ae03d1a392f4ad94c9bfbc153f3dedb9ffb14718',
|
2017-01-08 17:43:43 +00:00
|
|
|
'org.whispersystems:jobmanager:506f679fc2fcf7bb6d10f00f41d6f6ea0abf75c70dc95b913398661ad538a181',
|
|
|
|
'org.whispersystems:libpastelog:bb331d9a98240fc139101128ba836c1edec3c40e000597cdbb29ebf4cbf34d88',
|
2017-08-29 00:56:49 +00:00
|
|
|
'org.whispersystems:signal-service-android:690e04d53c8b5ec8cda064b242d7c00b0e5321851b811798dd0ec3712f5e1a85',
|
2017-06-13 17:27:51 +00:00
|
|
|
'org.whispersystems:webrtc-android:de647643afbbea45a26a4f24db75aa10bc8de45426e8eb0d9d563cc10af4f582',
|
2017-04-20 23:29:51 +00:00
|
|
|
'me.leolin:ShortcutBadger:e3cb3e7625892129b0c92dd5e4bc649faffdd526d5af26d9c45ee31ff8851774',
|
2017-01-08 17:43:43 +00:00
|
|
|
'se.emilsjolander:stickylistheaders:a08ca948aa6b220f09d82f16bbbac395f6b78897e9eeac6a9f0b0ba755928eeb',
|
2016-08-16 03:23:56 +00:00
|
|
|
'com.jpardogo.materialtabstrip:library:c6ef812fba4f74be7dc4a905faa4c2908cba261a94c13d4f96d5e67e4aad4aaa',
|
|
|
|
'org.apache.httpcomponents:httpclient-android:6f56466a9bd0d42934b90bfbfe9977a8b654c058bf44a12bdc2877c4e1f033f1',
|
2016-12-15 19:34:46 +00:00
|
|
|
'com.github.chrisbanes.photoview:library:f152dd0a87aca891aa182e42863fa05e0e8b2842e3b9fc512d7a3a6243c38ac4',
|
2016-08-16 03:23:56 +00:00
|
|
|
'com.github.bumptech.glide:glide:76ef123957b5fbaebb05fcbe6606dd58c3bc3fcdadb257f99811d0ac9ea9b88b',
|
|
|
|
'com.makeramen:roundedimageview:1f5a1865796b308c6cdd114acc6e78408b110f0a62fc63553278fbeacd489cd1',
|
|
|
|
'com.pnikosis:materialish-progress:d71d80e00717a096784482aee21001a9d299fec3833e4ebd87739ed36cf77c54',
|
2017-02-18 04:27:11 +00:00
|
|
|
'org.greenrobot:eventbus:180d4212467df06f2fbc9c8d8a2984533ac79c87769ad883bc421612f0b4e17c',
|
2016-08-16 03:23:56 +00:00
|
|
|
'pl.tajchert:waitingdots:2835d49e0787dbcb606c5a60021ced66578503b1e9fddcd7a5ef0cd5f095ba2c',
|
|
|
|
'com.soundcloud.android:android-crop:ffd4b973cf6e97f7d64118a0dc088df50e9066fd5634fe6911dd0c0c5d346177',
|
|
|
|
'com.melnykov:floatingactionbutton:15d58d4fac0f7a288d0e5301bbaf501a146f5b3f5921277811bf99bd3b397263',
|
|
|
|
'com.google.zxing:android-integration:89e56aadf1164bd71e57949163c53abf90af368b51669c0d4a47a163335f95c4',
|
|
|
|
'com.squareup.dagger:dagger:789aca24537022e49f91fc6444078d9de8f1dd99e1bfb090f18491b186967883',
|
|
|
|
'com.doomonafireball.betterpickers:library:132ecd685c95a99e7377c4e27bfadbb2d7ed0bea995944060cd62d4369fdaf3d',
|
|
|
|
'com.amulyakhare:com.amulyakhare.textdrawable:54c92b5fba38cfd316a07e5a30528068f45ce8515a6890f1297df4c401af5dcb',
|
|
|
|
'com.h6ah4i.android.compat:mulsellistprefcompat:47167c5cb796de1a854788e9ff318358e36c8fb88123baaa6e38fb78511dfabe',
|
|
|
|
'com.google.zxing:core:b4d82452e7a6bf6ec2698904b332431717ed8f9a850224f295aec89de80f2259',
|
2017-01-07 02:00:40 +00:00
|
|
|
'com.davemorrissey.labs:subsampling-scale-image-view:550c5baa07e0bb4ff0a18b705e96d34436d22619248bd8c08c08c730b1f55cfe',
|
2016-08-16 03:23:56 +00:00
|
|
|
'cn.carbswang.android:NumberPickerView:18b3c316d62c7c277978a8d4ed57a5b8f4e943762264960f579a8a549c756729',
|
2017-02-11 19:05:53 +00:00
|
|
|
'com.tomergoldst.android:tooltips:4c56697dd1ad64b8066535c61f961a6d901e7ae5d97ae27084ba40ad620349b6',
|
2017-05-08 22:32:59 +00:00
|
|
|
'com.klinkerapps:android-smsmms:e7c3328a0f3a8dd44daa8129de4e99996f3057a4546e47891b036b81e0ebf1d1',
|
2017-08-07 04:43:11 +00:00
|
|
|
'com.annimon:stream:5da6e2e3e0551d61a3ea7014f04312276549e3dd739cf637996e4cf43c5535b9',
|
2017-01-08 17:43:43 +00:00
|
|
|
'com.android.support:support-v4:ed4cda7c752f51d33f9bbdfff3422b425b323d356cd1bdc9786aa413c912e594',
|
|
|
|
'com.android.support:support-vector-drawable:2697503d3e8e709023ae176ba5db7f98ca0aa0b4e6290aedcb3c371904806bf7',
|
|
|
|
'com.android.support:animated-vector-drawable:6d05cb63d1f68900220f85c56dfe1066a9bb19cb0ec1247cc68fc2ba32f6b4a7',
|
2016-12-26 23:14:23 +00:00
|
|
|
'com.android.support:support-compat:e880fb1209c33fcb43e2b25716808e1a6e0b4d3170d5a8dc7704e15084428f88',
|
|
|
|
'com.android.support:support-core-ui:0149b54fd3bc9f4b3b2d321ff53c11821b31a2eca1e664d0cee224e8f53073d6',
|
|
|
|
'com.android.support:transition:cf53f778352fe0b74ff14d838bef9fe79264f3fd43eac499b6e0d1664dbd8997',
|
2017-01-08 17:43:43 +00:00
|
|
|
'com.google.android.gms:play-services-base:0ca636a8fc9a5af45e607cdcd61783bf5d561cbbb0f862021ce69606eee5ad49',
|
|
|
|
'com.google.android.gms:play-services-basement:95dd882c5ffba15b9a99de3fefb05d3a01946623af67454ca00055d222f85a8d',
|
|
|
|
'com.google.android.gms:play-services-iid:54e919f9957b8b7820da7ee9b83471d00d0cac1cf08ddea8b5b41aea80bb1a70',
|
2017-07-13 01:05:27 +00:00
|
|
|
'org.whispersystems:signal-protocol-android:5b8acded7f2a40178eb90ab8e8cbfec89d170d91b3ff5e78487d1098df6185a1',
|
2017-08-29 00:56:49 +00:00
|
|
|
'org.whispersystems:signal-service-java:438e8330cf806152e7e226d8241dd6388ee4005f0ea7d2aaa99d7ef514012dca',
|
2016-08-16 03:23:56 +00:00
|
|
|
'com.nineoldandroids:library:68025a14e3e7673d6ad2f95e4b46d78d7d068343aa99256b686fe59de1b3163a',
|
|
|
|
'javax.inject:javax.inject:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
|
2017-05-08 22:32:59 +00:00
|
|
|
'com.klinkerapps:logger:177e325259a8b111ad6745ec10db5861723c99f402222b80629f576f49408541',
|
2017-01-07 02:00:40 +00:00
|
|
|
'com.google.android.gms:play-services-tasks:69ec265168e601d0203d04cd42e34bb019b2f029aa1e16fabd38a5153eea2086',
|
2017-07-13 01:05:27 +00:00
|
|
|
'org.whispersystems:curve25519-android:82595394422b957d4a5b5f1b27b75ba25cf6dc4db4d312418ca38cd6fff279ca',
|
|
|
|
'org.whispersystems:signal-protocol-java:5152c2b01a25147967d6bf82e540f947901bdfa79260be3eb3e96b03f787d6b5',
|
2017-08-08 23:37:15 +00:00
|
|
|
'com.google.protobuf:protobuf-java:e0c1c64575c005601725e7c6a02cebf9e1285e888f756b2a1d73ffa8d725cc74',
|
|
|
|
'com.googlecode.libphonenumber:libphonenumber:be23ec6195df9f328364a3122ddd111e30f42d18a841dd06f84d2685c7fabb9f',
|
|
|
|
'com.fasterxml.jackson.core:jackson-databind:835097bcdd11f5bc8a08378c70d4c8054dfa4b911691cc2752063c75534d198d',
|
|
|
|
'com.squareup.okhttp3:okhttp:c1d57f913f74f61d424d4250a92723ba9a61affc12a0ab194d84cc179b472841',
|
|
|
|
'com.madgag.spongycastle:prov:b8c3fec3a59aac1aa04ccf4dad7179351e54ef7672f53f508151b614c131398a',
|
|
|
|
'org.whispersystems:curve25519-java:7dd659d8822c06c3aea1a47f18fac9e5761e29cab8100030b877db445005f03e',
|
2016-08-16 03:23:56 +00:00
|
|
|
'com.fasterxml.jackson.core:jackson-annotations:0ca408c24202a7626ec8b861e99d85eca5e38b73311dd6dd12e3e9deecc3fe94',
|
|
|
|
'com.fasterxml.jackson.core:jackson-core:cbf4604784b4de226262845447a1ad3bb38a6728cebe86562e2c5afada8be2c0',
|
2017-08-08 23:37:15 +00:00
|
|
|
'com.squareup.okio:okio:734269c3ebc5090e3b23566db558f421f0b4027277c79ad5d176b8ec168bb850',
|
|
|
|
'com.madgag.spongycastle:core:8d6240b974b0aca4d3da9c7dd44d42339d8a374358aca5fc98e50a995764511f',
|
2017-04-13 21:15:06 +00:00
|
|
|
'com.android.support:support-annotations:47a2a30eab487a490a8a8f16678007c3d2b6dcae1e09b0485a12bbf921200ec3',
|
2016-12-26 23:14:23 +00:00
|
|
|
'com.android.support:support-media-compat:8d6a1a5ba3d9eb1a25cb8f21bb312ac6280202e3d2900cb0b447d065d0d8a125',
|
|
|
|
'com.android.support:support-core-utils:a7649e18c04143dde40c218c5ce9a030e7ae674089cd7b18c6cf8ed2a22cf01a',
|
|
|
|
'com.android.support:support-fragment:1294500b357f52cf3779e2521c79f54ae7844f3b9a5f6727495dbbda7f231377',
|
2015-02-28 17:40:52 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2013-10-10 20:52:24 +00:00
|
|
|
android {
|
2016-12-25 23:27:59 +00:00
|
|
|
compileSdkVersion 25
|
2017-03-09 01:38:55 +00:00
|
|
|
buildToolsVersion '25.0.0'
|
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"
|
|
|
|
}
|
|
|
|
|
2013-10-10 20:52:24 +00:00
|
|
|
defaultConfig {
|
2017-08-23 17:46:41 +00:00
|
|
|
versionCode 285
|
|
|
|
versionName "4.9.9"
|
2017-02-26 22:36:43 +00:00
|
|
|
|
2014-01-11 18:44:54 +00:00
|
|
|
minSdkVersion 9
|
2015-04-10 06:10:19 +00:00
|
|
|
targetSdkVersion 22
|
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"
|
2016-12-30 04:54:05 +00:00
|
|
|
buildConfigField "String", "SIGNAL_URL", "\"https://textsecure-service.whispersystems.org\""
|
2017-08-08 23:37:15 +00:00
|
|
|
buildConfigField "String", "SIGNAL_CDN_URL", "\"https://cdn.signal.org\""
|
2016-10-17 02:05:07 +00:00
|
|
|
buildConfigField "String", "GIPHY_PROXY_HOST", "\"giphy-proxy-production.whispersystems.org\""
|
|
|
|
buildConfigField "int", "GIPHY_PROXY_PORT", "80"
|
2015-09-09 20:54:29 +00:00
|
|
|
buildConfigField "String", "USER_AGENT", "\"OWA\""
|
2015-05-21 19:30:18 +00:00
|
|
|
buildConfigField "boolean", "DEV_BUILD", "false"
|
2013-10-10 20:52:24 +00:00
|
|
|
}
|
|
|
|
|
2014-04-22 21:33:29 +00:00
|
|
|
compileOptions {
|
2017-08-07 04:43:11 +00:00
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
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'
|
2014-12-31 00:49:57 +00:00
|
|
|
}
|
|
|
|
|
2013-10-10 20:52:24 +00:00
|
|
|
signingConfigs {
|
|
|
|
release
|
|
|
|
}
|
2015-01-12 04:27:34 +00:00
|
|
|
|
2013-10-10 20:52:24 +00:00
|
|
|
buildTypes {
|
2015-01-12 04:27:34 +00:00
|
|
|
debug {
|
2015-01-21 07:26:58 +00:00
|
|
|
minifyEnabled true
|
2015-04-02 01:04:23 +00:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
|
|
|
'proguard-google-play-services.pro',
|
|
|
|
'proguard-dagger.pro',
|
|
|
|
'proguard-jackson.pro',
|
|
|
|
'proguard-sqlite.pro',
|
|
|
|
'proguard-appcompat-v7.pro',
|
|
|
|
'proguard-square-okhttp.pro',
|
|
|
|
'proguard-square-okio.pro',
|
|
|
|
'proguard-spongycastle.pro',
|
|
|
|
'proguard-rounded-image-view.pro',
|
2015-03-31 22:44:41 +00:00
|
|
|
'proguard-glide.pro',
|
2015-05-08 00:20:44 +00:00
|
|
|
'proguard-shortcutbadger.pro',
|
2015-09-09 20:54:29 +00:00
|
|
|
'proguard-retrofit.pro',
|
2016-11-09 17:37:40 +00:00
|
|
|
'proguard-webrtc.pro',
|
2017-05-12 22:47:04 +00:00
|
|
|
'proguard-klinker.pro',
|
2017-08-07 04:43:11 +00:00
|
|
|
'proguard-retrolambda.pro',
|
2015-04-02 01:04:23 +00:00
|
|
|
'proguard.cfg'
|
2016-12-12 14:05:06 +00:00
|
|
|
testProguardFiles 'proguard-automation.pro',
|
|
|
|
'proguard.cfg'
|
2015-01-12 04:27:34 +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
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
|
|
|
}
|
2014-01-11 02:20:25 +00:00
|
|
|
|
2017-02-26 22:36:43 +00:00
|
|
|
productFlavors {
|
|
|
|
play {
|
|
|
|
ext.websiteUpdateUrl = "null"
|
|
|
|
buildConfigField "boolean", "PLAY_STORE_DISABLED", "false"
|
|
|
|
buildConfigField "String", "NOPLAY_UPDATE_URL", "$ext.websiteUpdateUrl"
|
|
|
|
}
|
|
|
|
|
|
|
|
website {
|
|
|
|
ext.websiteUpdateUrl = "https://updates.signal.org/android"
|
|
|
|
buildConfigField "boolean", "PLAY_STORE_DISABLED", "true"
|
|
|
|
buildConfigField "String", "NOPLAY_UPDATE_URL", "\"$ext.websiteUpdateUrl\""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
applicationVariants.all { variant ->
|
|
|
|
variant.outputs.each { output ->
|
|
|
|
output.outputFile = new File(
|
|
|
|
output.outputFile.parent,
|
|
|
|
output.outputFile.name.replace(".apk", "-${variant.versionName}.apk"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-12 04:27:34 +00:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
|
|
java.srcDirs = ['src']
|
|
|
|
resources.srcDirs = ['src']
|
|
|
|
aidl.srcDirs = ['src']
|
|
|
|
renderscript.srcDirs = ['src']
|
|
|
|
res.srcDirs = ['res']
|
|
|
|
assets.srcDirs = ['assets']
|
2015-09-09 20:54:29 +00:00
|
|
|
jniLibs.srcDirs = ['libs']
|
2015-01-12 04:27:34 +00:00
|
|
|
}
|
|
|
|
androidTest {
|
2015-05-25 21:56:15 +00:00
|
|
|
java.srcDirs = ['test/androidTest/java']
|
2015-01-12 04:27:34 +00:00
|
|
|
}
|
2015-09-03 23:31:26 +00:00
|
|
|
test {
|
|
|
|
java.srcDirs = ['test/unitTest/java']
|
|
|
|
}
|
2017-02-26 22:36:43 +00:00
|
|
|
|
|
|
|
website.manifest.srcFile 'website/AndroidManifest.xml'
|
2015-01-12 04:27:34 +00:00
|
|
|
}
|
|
|
|
|
2014-01-11 02:20:25 +00:00
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
|
|
|
}
|
2013-10-10 20:52:24 +00:00
|
|
|
}
|
|
|
|
|
2017-02-26 22:36:43 +00:00
|
|
|
task assembleWebsiteDescriptor << {
|
|
|
|
android.applicationVariants.all { variant ->
|
|
|
|
if (variant.name.equals("websiteDebug") ||
|
|
|
|
variant.name.equals("websiteRelease"))
|
|
|
|
{
|
|
|
|
File file = new File(variant.outputs[0].outputFile.path)
|
|
|
|
|
|
|
|
if (file.exists()) {
|
|
|
|
MessageDigest md = MessageDigest.getInstance("SHA-256");
|
|
|
|
file.eachByte 4096, {bytes, size ->
|
|
|
|
md.update(bytes, 0, size);
|
|
|
|
}
|
|
|
|
|
|
|
|
String digest = md.digest().collect {String.format "%02x", it}.join();
|
|
|
|
String url = variant.productFlavors.get(0).ext.websiteUpdateUrl
|
|
|
|
String apkName = variant.outputs[0].outputFile.name
|
|
|
|
|
|
|
|
String descriptor = "{" +
|
|
|
|
"\"versionCode\" : $project.android.defaultConfig.versionCode," +
|
|
|
|
"\"versionName\" : \"$project.android.defaultConfig.versionName\"," +
|
|
|
|
"\"sha256sum\" : \"$digest\"," +
|
|
|
|
"\"url\" : \"$url/$apkName\"" +
|
|
|
|
"}"
|
|
|
|
|
|
|
|
File descriptorFile = new File(variant.outputs[0].outputFile.parent, apkName.replace(".apk", ".json"))
|
|
|
|
|
|
|
|
descriptorFile.write(descriptor)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-21 15:40:19 +00:00
|
|
|
tasks.whenTaskAdded { task ->
|
|
|
|
if (task.name.equals("lint")) {
|
|
|
|
task.enabled = false
|
|
|
|
}
|
2017-02-26 22:36:43 +00:00
|
|
|
|
|
|
|
if (task.name.equals("assembleWebsiteDebug") ||
|
|
|
|
task.name.equals("assembleWebsiteRelease"))
|
|
|
|
{
|
|
|
|
task.finalizedBy assembleWebsiteDescriptor
|
|
|
|
}
|
2014-04-21 15:40:19 +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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-10-10 20:52:24 +00:00
|
|
|
def Properties props = new Properties()
|
|
|
|
def propFile = new File('signing.properties')
|
|
|
|
|
|
|
|
if (propFile.canRead()){
|
|
|
|
props.load(new FileInputStream(propFile))
|
|
|
|
|
|
|
|
if (props !=null &&
|
|
|
|
props.containsKey('STORE_FILE') &&
|
|
|
|
props.containsKey('STORE_PASSWORD') &&
|
|
|
|
props.containsKey('KEY_ALIAS') &&
|
|
|
|
props.containsKey('KEY_PASSWORD'))
|
|
|
|
{
|
|
|
|
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
|
|
|
|
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
|
|
|
|
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
|
|
|
|
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
|
|
|
|
} else {
|
|
|
|
println 'signing.properties found but some entries are missing'
|
|
|
|
android.buildTypes.release.signingConfig = null
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
println 'signing.properties not found'
|
|
|
|
android.buildTypes.release.signingConfig = null
|
|
|
|
}
|
2015-05-26 06:39:35 +00:00
|
|
|
|