129 lines
4.9 KiB
Groovy
129 lines
4.9 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'witness'
|
|
|
|
android {
|
|
compileSdkVersion 22
|
|
buildToolsVersion '22.0.1'
|
|
defaultConfig {
|
|
versionCode 11
|
|
versionName '0.5'
|
|
minSdkVersion 9
|
|
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.1.1'
|
|
compile 'com.android.support:support-v4:22.1.1'
|
|
compile 'com.android.support:appcompat-v7:22.1.1'
|
|
compile 'com.android.support:recyclerview-v7:22.1.1'
|
|
|
|
// 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'
|
|
}
|
|
|
|
// 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:7bc07519aa613b186001160403bcfd68260fa82c61cc7e83adeedc9b862b94ae',
|
|
'com.android.support:support-v4:1e2e4d35ac7fd30db5ce3bc177b92e4d5af86acef2ef93e9221599d733346f56',
|
|
'com.android.support:appcompat-v7:9a2355537c2f01cf0b95523605c18606b8d824017e6e94a05c77b0cfc8f21c96',
|
|
'com.android.support:recyclerview-v7:aaecd962eff758b716cef6ecef8d9237be10be3e2cb5ece4d5780e609e40246d',
|
|
'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',
|
|
]
|
|
}
|
|
|
|
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" |