build.gradle 10.6 KB
Newer Older
Moxie Marlinspike's avatar
Moxie Marlinspike committed
1
2
buildscript {
    repositories {
Jake McGinty's avatar
Jake McGinty committed
3
4
5
        maven {
            url "https://repo1.maven.org/maven2"
        }
Moxie Marlinspike's avatar
Moxie Marlinspike committed
6
7
    }
    dependencies {
8
        classpath 'com.android.tools.build:gradle:2.3.0'
9
        classpath files('libs/gradle-witness.jar')
Moxie Marlinspike's avatar
Moxie Marlinspike committed
10
11
12
    }
}

Moxie Marlinspike's avatar
Moxie Marlinspike committed
13
apply plugin: 'com.android.application'
14
apply plugin: 'witness'
Moxie Marlinspike's avatar
Moxie Marlinspike committed
15
16

repositories {
Jake McGinty's avatar
Jake McGinty committed
17
    maven {
18
        url "https://repo1.maven.org/maven2/"
Jake McGinty's avatar
Jake McGinty committed
19
    }
Jake McGinty's avatar
Jake McGinty committed
20
    jcenter()
Moxie Marlinspike's avatar
Moxie Marlinspike committed
21
    mavenLocal()
Moxie Marlinspike's avatar
Moxie Marlinspike committed
22
23
}

Bastien Le Querrec's avatar
Bastien Le Querrec committed
24
25
26
27
28
29
subprojects {
    ext.version_number     = "2.4.0"
    ext.group_info         = "org.whispersystems"
    ext.curve25519_version = "0.3.0"
}

Moxie Marlinspike's avatar
Moxie Marlinspike committed
30
dependencies {
31
    compile 'se.emilsjolander:stickylistheaders:2.7.0'
32
    compile 'com.jpardogo.materialtabstrip:library:1.0.9'
33
    compile project (':org.w3c.dom')
34
    compile 'info.guardianproject.trustedintents:trustedintents:0.2'
Jake McGinty's avatar
Jake McGinty committed
35
    compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
Jake McGinty's avatar
Jake McGinty committed
36
    compile 'com.github.chrisbanes.photoview:library:1.2.3'
Moxie Marlinspike's avatar
Moxie Marlinspike committed
37
    compile 'com.github.bumptech.glide:glide:3.7.0'
38
    compile 'com.makeramen:roundedimageview:2.1.0'
39
    compile 'com.pnikosis:materialish-progress:1.5'
40
    compile project (':org.greenrobot.eventbus')
Moxie Marlinspike's avatar
Moxie Marlinspike committed
41
    compile 'pl.tajchert:waitingdots:0.1.0'
42
43
44
45
    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'
46
    compile 'com.android.support:cardview-v7:25.1.0'
47
    compile 'com.melnykov:floatingactionbutton:1.3.0'
48
    compile 'com.google.zxing:android-integration:3.1.0'
49
    compile project (':com.android.support.support-v4-preferencefragment')
50
51
52
    compile ('com.android.support:gridlayout-v7:22.2.0') {
        exclude module: 'support-v4'
    }
53
54
55
    compile ('com.davemorrissey.labs:subsampling-scale-image-view:3.6.0') {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
56

57
    compile 'com.squareup.dagger:dagger:1.2.2'
Jake McGinty's avatar
Jake McGinty committed
58
    compile ("com.doomonafireball.betterpickers:library:1.5.3") {
59
60
        exclude group: 'com.android.support', module: 'support-v4'
    }
61
    compile 'com.madgag.spongycastle:prov:1.51.0.0'
62
    provided 'com.squareup.dagger:dagger-compiler:1.2.2'
63

64
65
    compile project (':org.whispersystems.jobmanager')
    compile project (':org.whispersystems.libpastelog')
Bastien Le Querrec's avatar
Bastien Le Querrec committed
66
67
68
69
70
71
72
    compile project (':org.whispersystems.libsignal')

    compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.7'
    compile 'com.fasterxml.jackson.core:jackson-core:2.8.7'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.8.7'
    compile 'com.googlecode.libphonenumber:libphonenumber:8.3.3'

73
    compile project (':com.amulyakhare.textdrawable')
74
    compile 'me.relex:circleindicator:1.0.0@aar'
75

76
77
78
79
80
81
82
83
    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'

84
85
86
87
88
89
    androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
    androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
    androidTestCompile ('org.assertj:assertj-core:1.7.1') {
        exclude group: 'org.hamcrest', module: 'hamcrest-core'
    }
    androidTestCompile ('com.squareup.assertj:assertj-android:1.0.0') {
90
        exclude group: 'org.hamcrest',        module: 'hamcrest-core'
Carey Metcalfe's avatar
Carey Metcalfe committed
91
        exclude group: 'com.android.support', module: 'support-annotations'
92
    }
Moxie Marlinspike's avatar
Moxie Marlinspike committed
93
94
}

Moxie Marlinspike's avatar
Moxie Marlinspike committed
95
96
dependencyVerification {
    verify = [
97
            'pl.tajchert:waitingdots:2835d49e0787dbcb606c5a60021ced66578503b1e9fddcd7a5ef0cd5f095ba2c',
98
99
100
101
            'com.android.support:appcompat-v7:b48bfd5efc14da938ba0647f9894aa7d3d90f0b618167652a318f6f336ef303e',
            'com.android.support:recyclerview-v7:45beed1778f785c75540b68aa7735b8973a518ac21e8d763188dbbdae6c5b65d',
            'com.android.support:design:92466557dc6a222bbff361801b26979573cb7086119331e78c74a2df34d5e11e',
            'com.android.support:support-v13:deeb43c2878025f2a0485791f66b5f59a1c6a4c6671c6ad7bb20abfeffaa313f',
102
            'com.android.support:cardview-v7:cd6f472f130a75f029cd1b7c56f72174023d56a2eee2b97577837fe39169d5df',
103
104
105
106
107
108
109
110
111
112
            'com.android.support:support-vector-drawable:2697503d3e8e709023ae176ba5db7f98ca0aa0b4e6290aedcb3c371904806bf7',
            'com.android.support:animated-vector-drawable:6d05cb63d1f68900220f85c56dfe1066a9bb19cb0ec1247cc68fc2ba32f6b4a7',
            'com.android.support:support-v4:ed4cda7c752f51d33f9bbdfff3422b425b323d356cd1bdc9786aa413c912e594',
            'com.android.support:support-media-compat:8d6a1a5ba3d9eb1a25cb8f21bb312ac6280202e3d2900cb0b447d065d0d8a125',
            'com.android.support:support-core-utils:a7649e18c04143dde40c218c5ce9a030e7ae674089cd7b18c6cf8ed2a22cf01a',
            'com.android.support:support-fragment:1294500b357f52cf3779e2521c79f54ae7844f3b9a5f6727495dbbda7f231377',
            'com.android.support:support-annotations:fb941680f43afbd70ce01ec3cc837a5037f0a774701b12a9fd3090bd4727cf15',
            'com.android.support:support-compat:e880fb1209c33fcb43e2b25716808e1a6e0b4d3170d5a8dc7704e15084428f88',
            'com.android.support:support-core-ui:0149b54fd3bc9f4b3b2d321ff53c11821b31a2eca1e664d0cee224e8f53073d6',
            'com.android.support:transition:cf53f778352fe0b74ff14d838bef9fe79264f3fd43eac499b6e0d1664dbd8997',
113
            'com.android.support:gridlayout-v7:a9b770cffca2c7c5cd83cba4dd12503365de5e8d9c79c479165adf18ab3bc25b',
114
            'com.doomonafireball.betterpickers:library:132ecd685c95a99e7377c4e27bfadbb2d7ed0bea995944060cd62d4369fdaf3d',
115
            'com.madgag.spongycastle:prov:b8c3fec3a59aac1aa04ccf4dad7179351e54ef7672f53f508151b614c131398a',
Bastien Le Querrec's avatar
Bastien Le Querrec committed
116
117
118
            'com.fasterxml.jackson.core:jackson-annotations:6b7802f6c22c09c4a92a2ebeb76e755c3c0a58dfbf419835fae470d89e469b86',
            'com.fasterxml.jackson.core:jackson-core:256ff34118ab292d1b4f3ee4d2c3e5e5f0f609d8e07c57e8ad1f51c46d4fbb46',
            'com.fasterxml.jackson.core:jackson-databind:4f74337b6d18664be0f5b15c6664b17aa3972c9c175092328b139b894ff66f19',
Moxie Marlinspike's avatar
Moxie Marlinspike committed
119
            'com.github.bumptech.glide:glide:76ef123957b5fbaebb05fcbe6606dd58c3bc3fcdadb257f99811d0ac9ea9b88b',
120
121
122
            'com.github.chrisbanes.photoview:library:8b5344e206f125e7ba9d684008f36c4992d03853c57e5814125f88496126e3cc',
            'com.google.protobuf:protobuf-java:e0c1c64575c005601725e7c6a02cebf9e1285e888f756b2a1d73ffa8d725cc74',
            'com.google.zxing:android-integration:89e56aadf1164bd71e57949163c53abf90af368b51669c0d4a47a163335f95c4',
Bastien Le Querrec's avatar
Bastien Le Querrec committed
123
            'com.googlecode.libphonenumber:libphonenumber:48c03059241d52411e6b775962adf5a1e95c3de1e7f0efaf577bc1548ded616a',
124
            'com.jpardogo.materialtabstrip:library:c6ef812fba4f74be7dc4a905faa4c2908cba261a94c13d4f96d5e67e4aad4aaa',
125
            'com.makeramen:roundedimageview:1f5a1865796b308c6cdd114acc6e78408b110f0a62fc63553278fbeacd489cd1',
126
            'com.pnikosis:materialish-progress:d71d80e00717a096784482aee21001a9d299fec3833e4ebd87739ed36cf77c54',
127
            'info.guardianproject.trustedintents:trustedintents:6221456d8821a8d974c2acf86306900237cf6afaaa94a4c9c44e161350f80f3e',
128
            'com.melnykov:floatingactionbutton:15d58d4fac0f7a288d0e5301bbaf501a146f5b3f5921277811bf99bd3b397263',
Moxie Marlinspike's avatar
Moxie Marlinspike committed
129
            'com.nineoldandroids:library:68025a14e3e7673d6ad2f95e4b46d78d7d068343aa99256b686fe59de1b3163a',
130
            'com.squareup.dagger:dagger:789aca24537022e49f91fc6444078d9de8f1dd99e1bfb090f18491b186967883',
Moxie Marlinspike's avatar
Moxie Marlinspike committed
131
            'javax.inject:javax.inject:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
132
            'org.apache.httpcomponents:httpclient-android:6f56466a9bd0d42934b90bfbfe9977a8b654c058bf44a12bdc2877c4e1f033f1',
133
            'se.emilsjolander:stickylistheaders:a08ca948aa6b220f09d82f16bbbac395f6b78897e9eeac6a9f0b0ba755928eeb',
134
            'com.davemorrissey.labs:subsampling-scale-image-view:550c5baa07e0bb4ff0a18b705e96d34436d22619248bd8c08c08c730b1f55cfe',
Moxie Marlinspike's avatar
Moxie Marlinspike committed
135
136
137
    ]
}

Moxie Marlinspike's avatar
Moxie Marlinspike committed
138
android {
139
    compileSdkVersion 25
140
    buildToolsVersion '25.0.2'
141
    useLibrary 'org.apache.http.legacy'
Moxie Marlinspike's avatar
Moxie Marlinspike committed
142
143

    defaultConfig {
144
145
        versionCode 204
        versionName "0.16.5-unstable"
146

Ruben Pollan's avatar
Ruben Pollan committed
147
        minSdkVersion 9
148
        targetSdkVersion 22
149

150
        vectorDrawables.useSupportLibrary = true
Moxie Marlinspike's avatar
Moxie Marlinspike committed
151
152
    }

153
154
155
156
157
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

158
159
160
161
162
    packagingOptions {
        exclude 'LICENSE.txt'
        exclude 'LICENSE'
        exclude 'NOTICE'
        exclude 'asm-license.txt'
163
164
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
165
166
    }

Moxie Marlinspike's avatar
Moxie Marlinspike committed
167
168
169
    signingConfigs {
        release
    }
170

Moxie Marlinspike's avatar
Moxie Marlinspike committed
171
    buildTypes {
172
        debug {
Jake McGinty's avatar
Jake McGinty committed
173
            minifyEnabled true
174
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
175
            testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
176
        }
Moxie Marlinspike's avatar
Moxie Marlinspike committed
177
        release {
Jake McGinty's avatar
Jake McGinty committed
178
            minifyEnabled true
179
            proguardFiles = buildTypes.debug.proguardFiles
180
            testProguardFiles = buildTypes.debug.testProguardFiles
Moxie Marlinspike's avatar
Moxie Marlinspike committed
181
182
183
            signingConfig signingConfigs.release
        }
    }
184

185
186
187
188
189
190
191
192
193
194
195
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
        androidTest {
196
197
198
199
            java.srcDirs = ['test/androidTest/java']
        }
        test {
            java.srcDirs = ['test/unitTest/java']
200
201
202
        }
    }

203
204
205
     lintOptions {
        abortOnError false
    }
Moxie Marlinspike's avatar
Moxie Marlinspike committed
206
207
}

208
209
210
211
212
213
tasks.whenTaskAdded { task ->
    if (task.name.equals("lint")) {
        task.enabled = false
    }
}

Moxie Marlinspike's avatar
Moxie Marlinspike committed
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
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
}
238
239
240
241

tasks.withType(JavaCompile){
    options.warnings = false
}