import de.undercouch.gradle.tasks.download.Download import de.undercouch.gradle.tasks.download.Verify apply plugin: 'com.android.application' apply plugin: 'witness' apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'de.undercouch.download' repositories { jcenter() } dependencies { def supportVersion = '23.1.1' compile project(':briar-api') compile project(':briar-core') compile fileTree(dir: 'libs', include: '*.jar') // This shouldn't be necessary; per section 23.4.4 of the Gradle docs: // "file dependencies are included in transitive project dependencies within the same build". compile files('../briar-core/libs/jsocks.jar') compile "com.android.support:support-v4:$supportVersion" compile("com.android.support:appcompat-v7:$supportVersion") { exclude module: 'support-v4' } compile("com.android.support:preference-v7:$supportVersion") { exclude module: 'support-v4' } compile("com.android.support:preference-v14:$supportVersion") { exclude module: 'support-v4' exclude module: 'preference-v7' exclude module: 'recyclerview-v7' } compile("com.android.support:design:$supportVersion") { exclude module: 'support-v4' exclude module: 'recyclerview-v7' } compile "info.guardianproject.panic:panic:0.5" compile "info.guardianproject.trustedintents:trustedintents:0.2" compile "de.hdodenhof:circleimageview:2.0.0" compile "com.google.zxing:core:3.2.1" apt 'com.google.dagger:dagger-compiler:2.0.2' provided 'javax.annotation:jsr250-api:1.0' } dependencyVerification { verify = [ 'com.android.support:support-v4:5c7dceb6c824089fe80f502e5206264048ef8bffa4e8ddeab180b81723e79b7f', 'com.android.support:appcompat-v7:0a8762214382b7e8d4b989b4ac10b5c846b957d767ccb7bccbc6be5afa885a82', 'com.android.support:preference-v7:4b6dabaa4400cbed885c7edc885aa6372468f48d628cc0d4a04b9ccd128ed324', 'com.android.support:preference-v14:a69906c2b29b315ac3c1fdf01537a7557660a65b8ea1cf891baa8665e1197459', 'com.android.support:design:41a9cd75ca78f25df5f573db7cedf8bb66beae00c330943923ba9f3e2051736d', 'com.android.support:support-annotations:f347a35b9748a4103b39a6714a77e2100f488d623fd6268e259c177b200e9d82', 'com.android.support:recyclerview-v7:7606373da0931a1e62588335465a0e390cd676c98117edab29220317495faefd', 'info.guardianproject.panic:panic:a7ed9439826db2e9901649892cf9afbe76f00991b768d8f4c26332d7c9406cb2', 'info.guardianproject.trustedintents:trustedintents:6221456d8821a8d974c2acf86306900237cf6afaaa94a4c9c44e161350f80f3e', 'de.hdodenhof:circleimageview:c76d936395b50705a3f98c9220c22d2599aeb9e609f559f6048975cfc1f686b8', 'com.google.zxing:core:b4d82452e7a6bf6ec2698904b332431717ed8f9a850224f295aec89de80f2259', ] } android { compileSdkVersion 23 buildToolsVersion "23.0.2" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similar customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } buildTypes { debug { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_6 targetCompatibility JavaVersion.VERSION_1_6 } lintOptions { abortOnError false } } task downloadTorGeoIp(type: Download) { src 'https://briarproject.org/build/geoip-2015-12-01.zip' dest 'assets/geoip.zip' onlyIfNewer true } task downloadTorBinaryArm(type: Download) { src 'https://briarproject.org/build/tor-0.2.7.6-arm.zip' dest 'assets/tor-arm.zip' onlyIfNewer true } task downloadTorBinaryArmPie(type: Download) { src 'https://briarproject.org/build/tor-0.2.7.6-arm-pie.zip' dest 'assets/tor-arm-pie.zip' onlyIfNewer true } task downloadTorBinaryX86(type: Download) { src 'https://briarproject.org/build/tor-0.2.7.6-x86.zip' dest 'assets/tor-x86.zip' onlyIfNewer true } task downloadTorBinaryX86Pie(type: Download) { src 'https://briarproject.org/build/tor-0.2.7.6-x86-pie.zip' dest 'assets/tor-x86-pie.zip' onlyIfNewer true } task verifyTorGeoIp(type: Verify, dependsOn: 'downloadTorGeoIp') { src 'assets/geoip.zip' algorithm 'SHA-256' checksum '9bcdaf0a7ba0933735328d8ec466c25c25dbb459efc2bce9e55c774eabea5162' } task verifyTorBinaryArm(type: Verify, dependsOn: 'downloadTorBinaryArm') { src 'assets/tor-arm.zip' algorithm 'SHA-256' checksum '83272962eda701cd5d74d2418651c4ff0f0b1dff51f558a292d1a1c42bf12146' } task verifyTorBinaryArmPie(type: Verify, dependsOn: 'downloadTorBinaryArmPie') { src 'assets/tor-arm-pie.zip' algorithm 'SHA-256' checksum 'd0300d1e45de11ebb24ed62b9c492be9c2e88590b7822195ab38c7a76ffcf646' } task verifyTorBinaryX86(type: Verify, dependsOn: 'downloadTorBinaryX86') { src 'assets/tor-x86.zip' algorithm 'SHA-256' checksum 'b8813d97b01ee1b9c9a4233c1b9bbe9f9f6b494ae6f9cbd84de8a3911911615e' } task verifyTorBinaryX86Pie(type: Verify, dependsOn: 'downloadTorBinaryX86Pie') { src 'assets/tor-x86-pie.zip' algorithm 'SHA-256' checksum '9c66e765aa196dc089951a1b2140cc8290305c2fcbf365121f99e01a233baf4e' } project.afterEvaluate { preBuild.dependsOn { [ 'verifyTorGeoIp', 'verifyTorBinaryArm', 'verifyTorBinaryArmPie', 'verifyTorBinaryX86', 'verifyTorBinaryX86Pie' ] } }