apply plugin: 'com.android.application' apply plugin: 'witness' android { compileSdkVersion 22 buildToolsVersion '22.0.1' defaultConfig { versionCode 13 versionName '0.6' minSdkVersion 10 targetSdkVersion 22 // For Espresso testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } debug { applicationIdSuffix '.debug' versionNameSuffix '-DEBUG' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } lintOptions { abortOnError false } packagingOptions { exclude 'LICENSE.txt' } dexOptions { jumboMode = true } } dependencies { // Local dependencies compile project(':botejars') compile fileTree(dir: 'libs', include: '*.jar') // Android Support Repository dependencies compile 'com.android.support:support-annotations:22.2.0' compile 'com.android.support:support-v4:22.2.0' compile 'com.android.support:appcompat-v7:22.2.0' compile 'com.android.support:recyclerview-v7:22.2.0' // Remote dependencies compile 'net.i2p.android:client:0.7@aar' compile 'net.i2p.android.ext:floatingactionbutton:1.9.0' compile 'com.madgag.spongycastle:core:1.52.0.0' compile 'com.madgag.spongycastle:prov:1.52.0.0' compile('com.mcxiaoke.viewpagerindicator:library:2.4.1') { exclude group: 'com.android.support', module: 'support-v4' } compile 'com.google.zxing:core:3.2.0' compile 'com.google.zxing:android-integration:3.2.0' compile 'com.androidplot:androidplot-core:0.6.1' compile 'com.pnikosis:materialish-progress:1.5' compile('com.android.support:support-v4-preferencefragment:1.0.0@aar') { exclude module: 'support-v4' } compile 'com.mikepenz:iconics:1.0.2@aar' compile('com.mikepenz:materialdrawer:3.0.7@aar') { transitive = true } // Testing-only dependencies androidTestCompile 'com.android.support.test:runner:0.3' androidTestCompile 'com.android.support.test:rules:0.3' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2' androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2' } dependencyVerification { verify = [ 'com.android.support:support-annotations:beac5cae60bdb597df9af9c916f785c2f71f8c8ae4be9a32d4298dea85496a42', 'com.android.support:support-v4:7bb6e40a18774aa2595e4d8f9fe0ae14e61670f71a1279272fb0b79b8be71180', 'com.android.support:appcompat-v7:2d5867698410b41f75140c91d6c1e58da74ae0f97baf6e0bdd1f7cc1017ceb2c', 'com.android.support:recyclerview-v7:3a8da14585fa1c81f06e7cef4d93a7641f0323d8f984ff9a7bd7a6e416b46888', 'net.i2p.android:client:61f5a54b3c8464a5d2a4df65d00cc32a40cef935cad57e0075e98a4b5625ff30', 'net.i2p.android.ext:floatingactionbutton:b41eae5fe6be599e3fade00273521b0914f2e199d5f04c50fa34cfe935347f76', 'com.madgag.spongycastle:core:07a401edbe26e1028e2324754557b741cc57306008df7b71a9e12ec32d65be8f', 'com.madgag.spongycastle:prov:becbb70797b0103517693d2a97ce93174cc4d1f732897ed965a24e32dd99503e', 'com.mcxiaoke.viewpagerindicator:library:470bbd2bec1ede64ad21efd6f02676807d22f1b526c4ac6a5b41a428c6e47e67', 'com.google.zxing:core:7fe5a8ff437635a540e56317649937b768b454795ce999ed5f244f83373dee7b', 'com.google.zxing:android-integration:0de037a73138033c4a03cdbca5d5728ef65a026ffb89afce071105f43a98ee0e', 'com.androidplot:androidplot-core:777b54dd98b8dedc5f3fcc95018eece1188f6c692dcbd5b7744af175e15d70bd', 'com.pnikosis:materialish-progress:d71d80e00717a096784482aee21001a9d299fec3833e4ebd87739ed36cf77c54', 'com.android.support:support-v4-preferencefragment:5470f5872514a6226fa1fc6f4e000991f38805691c534cf0bd2778911fc773ad', 'com.mikepenz:iconics:c1a02203d8e0d638959463c00af3ab9096e0a7c1ad5928762eb10ef5ce8a63cd', 'com.mikepenz:materialdrawer:3331ec671630fc1b1a54c4ff4da9d2a0cee45a2c129dd7f2adb337fa814b9497', ] } project.ext.i2pbase = '../i2p.i2p' def Properties props = new Properties() def propFile = new File(project(':botejars').projectDir, 'local.properties') if (propFile.canRead()) { props.load(new FileInputStream(propFile)) if (props != null && props.containsKey('i2psrc')) { i2pbase = props['i2psrc'] } else { println 'local.properties found but some entries are missing' } } else { println 'local.properties not found' } task certificatesZip(type: Zip) { archiveName = 'certificates_zip' into('reseed') { from files('' + i2pbase + '/installer/resources/certificates/reseed') } into('ssl') { from files('' + i2pbase + '/installer/resources/certificates/ssl') } } task copyI2PResources(type: Copy) { // Force this to always run: Copy only detects source changes, not if missing in destination outputs.upToDateWhen { false } into 'src/main/res/raw' from certificatesZip } task cleanI2PResources(type: Delete) { delete file('src/main/res/raw/certificates_zip') } preBuild.dependsOn copyI2PResources clean.dependsOn cleanI2PResources apply from: "${project.rootDir}/gradle/signing.gradle"