135 lines
5.3 KiB
Groovy
135 lines
5.3 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'witness'
|
|
|
|
android {
|
|
compileSdkVersion 22
|
|
buildToolsVersion '22.0.1'
|
|
defaultConfig {
|
|
versionCode 11
|
|
versionName '0.5'
|
|
minSdkVersion 10
|
|
targetSdkVersion 22
|
|
|
|
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.5.1@aar'
|
|
compile 'net.i2p.android.ext:floatingactionbutton:1.8.0'
|
|
compile 'com.madgag.spongycastle:core:1.51.0.0'
|
|
compile 'com.madgag.spongycastle:prov:1.51.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.4'
|
|
compile('com.android.support:support-v4-preferencefragment:1.0.0@aar') {
|
|
exclude module: 'support-v4'
|
|
}
|
|
compile 'com.mikepenz:iconics:1.0.1@aar'
|
|
compile('com.mikepenz:materialdrawer:3.0.5@aar') {
|
|
transitive = true
|
|
}
|
|
|
|
// Testing-only dependencies
|
|
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
|
|
androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
|
|
}
|
|
|
|
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:b700c1b8b69556bb832eb5f11054d0d2a4b1c5ab8eb133d108131bed12833970',
|
|
'net.i2p.android.ext:floatingactionbutton:a20d1f0cae15f8965b81486ba31245937968ae6ee5fa6e8a3ea21d7f6c6243ab',
|
|
'com.madgag.spongycastle:core:8d6240b974b0aca4d3da9c7dd44d42339d8a374358aca5fc98e50a995764511f',
|
|
'com.madgag.spongycastle:prov:b8c3fec3a59aac1aa04ccf4dad7179351e54ef7672f53f508151b614c131398a',
|
|
'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:5dd770a78047d8dbf2690deb686675fe2b242a6d06bb52ef425c829454ca54b8',
|
|
'com.android.support:support-v4-preferencefragment:5470f5872514a6226fa1fc6f4e000991f38805691c534cf0bd2778911fc773ad',
|
|
'com.mikepenz:iconics:38b4094d8a3f2a084a10d7789d017408e3d95908810a21eec3b29241d04afe49',
|
|
'com.mikepenz:materialdrawer:f97570f4b4ea133a3f78737f78f4d1e7b947c0fecfb2b541741cd26000c38694',
|
|
]
|
|
}
|
|
|
|
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" |