2015-05-02 16:40:40 +00:00
|
|
|
apply plugin: 'com.android.application'
|
2015-10-15 01:21:51 +00:00
|
|
|
apply plugin: 'com.getkeepsafe.dexcount'
|
2015-05-02 16:40:40 +00:00
|
|
|
|
|
|
|
android {
|
2017-06-09 02:39:16 +00:00
|
|
|
compileSdkVersion project.targetSdkVersion
|
|
|
|
buildToolsVersion project.buildToolsVersion
|
2016-03-03 02:39:53 +00:00
|
|
|
|
2015-05-02 16:40:40 +00:00
|
|
|
defaultConfig {
|
2017-06-09 02:39:16 +00:00
|
|
|
minSdkVersion project.minSdkVersion
|
|
|
|
targetSdkVersion project.targetSdkVersion
|
2018-12-04 05:31:06 +00:00
|
|
|
applicationId "org.purplei2p.lightning"
|
2017-06-04 23:19:10 +00:00
|
|
|
versionName project.versionName
|
2018-12-04 05:31:06 +00:00
|
|
|
versionCode project.versionCode
|
2016-07-31 18:50:03 +00:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2016-03-03 02:39:53 +00:00
|
|
|
}
|
|
|
|
|
2018-11-19 12:26:02 +00:00
|
|
|
signingConfigs {
|
|
|
|
r4sas {
|
|
|
|
storeFile file("store.jks")
|
|
|
|
storePassword "storepass"
|
|
|
|
keyAlias "keyalias"
|
|
|
|
keyPassword "keypass"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-02 16:40:40 +00:00
|
|
|
buildTypes {
|
2015-05-25 16:55:35 +00:00
|
|
|
debug {
|
2015-07-18 18:30:41 +00:00
|
|
|
minifyEnabled false
|
|
|
|
shrinkResources false
|
2015-05-03 11:56:22 +00:00
|
|
|
proguardFiles 'proguard-project.txt'
|
2019-01-27 08:22:38 +00:00
|
|
|
applicationVariants.all { variant ->
|
|
|
|
renameAPK(variant, defaultConfig, 'debug')
|
|
|
|
}
|
2015-05-02 16:40:40 +00:00
|
|
|
}
|
2015-05-25 16:55:35 +00:00
|
|
|
|
|
|
|
release {
|
2015-05-02 16:40:40 +00:00
|
|
|
minifyEnabled true
|
2015-05-04 16:07:15 +00:00
|
|
|
shrinkResources true
|
2018-11-19 12:26:02 +00:00
|
|
|
signingConfig signingConfigs.r4sas
|
2015-05-03 11:56:22 +00:00
|
|
|
proguardFiles 'proguard-project.txt'
|
2019-01-27 08:22:38 +00:00
|
|
|
applicationVariants.all { variant ->
|
|
|
|
renameAPK(variant, defaultConfig, 'release')
|
|
|
|
}
|
2015-05-02 16:40:40 +00:00
|
|
|
}
|
|
|
|
}
|
2016-03-03 02:39:53 +00:00
|
|
|
|
2015-05-03 11:56:22 +00:00
|
|
|
lintOptions {
|
2015-10-18 02:12:07 +00:00
|
|
|
abortOnError true
|
2015-05-03 11:56:22 +00:00
|
|
|
}
|
2016-03-03 02:39:53 +00:00
|
|
|
|
2015-10-18 03:05:33 +00:00
|
|
|
packagingOptions {
|
2015-10-18 19:15:36 +00:00
|
|
|
exclude '.readme'
|
2015-10-18 03:05:33 +00:00
|
|
|
}
|
2015-05-02 16:40:40 +00:00
|
|
|
}
|
|
|
|
|
2015-10-15 01:21:51 +00:00
|
|
|
dexcount {
|
|
|
|
includeClasses = false
|
|
|
|
includeFieldCount = false
|
2017-03-19 01:46:08 +00:00
|
|
|
format = "tree"
|
2015-10-15 01:21:51 +00:00
|
|
|
orderByMethodCount = true
|
|
|
|
verbose = false
|
|
|
|
}
|
|
|
|
|
2015-05-02 16:40:40 +00:00
|
|
|
dependencies {
|
2017-06-14 03:11:44 +00:00
|
|
|
testCompile 'junit:junit:4.12'
|
2016-03-23 03:39:06 +00:00
|
|
|
|
2015-10-22 01:42:22 +00:00
|
|
|
// support libraries
|
2017-06-09 03:17:04 +00:00
|
|
|
def supportLibVersion = '25.4.0'
|
2017-03-19 02:56:30 +00:00
|
|
|
compile "com.android.support:palette-v7:$supportLibVersion"
|
|
|
|
compile "com.android.support:appcompat-v7:$supportLibVersion"
|
|
|
|
compile "com.android.support:design:$supportLibVersion"
|
|
|
|
compile "com.android.support:recyclerview-v7:$supportLibVersion"
|
|
|
|
compile "com.android.support:support-v4:$supportLibVersion"
|
2015-10-22 01:42:22 +00:00
|
|
|
|
|
|
|
// dependency injection
|
2017-06-02 02:16:45 +00:00
|
|
|
def daggerVersion = '2.11'
|
2017-03-19 02:56:30 +00:00
|
|
|
compile "com.google.dagger:dagger:$daggerVersion"
|
2017-04-23 00:46:41 +00:00
|
|
|
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
|
2016-05-20 02:52:52 +00:00
|
|
|
provided 'javax.annotation:jsr250-api:1.0'
|
2015-10-22 01:42:22 +00:00
|
|
|
|
|
|
|
// view binding
|
2017-06-03 22:50:36 +00:00
|
|
|
def butterknifeVersion = '8.6.0'
|
|
|
|
compile "com.jakewharton:butterknife:$butterknifeVersion"
|
|
|
|
annotationProcessor "com.jakewharton:butterknife-compiler:$butterknifeVersion"
|
2015-09-03 13:33:40 +00:00
|
|
|
|
2015-10-22 01:42:22 +00:00
|
|
|
// permissions
|
2015-11-21 23:21:58 +00:00
|
|
|
compile 'com.anthonycr.grant:permissions:1.1.2'
|
2015-09-03 13:33:40 +00:00
|
|
|
|
2017-03-19 02:39:23 +00:00
|
|
|
// tor proxy
|
2017-03-19 02:56:30 +00:00
|
|
|
def netcipherVersion = '2.0.0-alpha1'
|
|
|
|
compile "info.guardianproject.netcipher:netcipher:$netcipherVersion"
|
|
|
|
compile "info.guardianproject.netcipher:netcipher-webkit:$netcipherVersion"
|
2015-09-09 02:24:15 +00:00
|
|
|
|
2017-04-09 19:29:37 +00:00
|
|
|
compile 'com.anthonycr.bonsai:bonsai:1.1.0'
|
2016-07-12 01:51:45 +00:00
|
|
|
|
2017-03-20 23:41:22 +00:00
|
|
|
compile 'com.anthonycr.progress:animated-progress:1.0'
|
2016-07-22 03:29:33 +00:00
|
|
|
|
2015-10-22 01:42:22 +00:00
|
|
|
// memory leak analysis
|
2017-05-08 04:05:44 +00:00
|
|
|
def leakCanaryVersion = '1.5.1'
|
2017-03-19 02:56:30 +00:00
|
|
|
debugCompile "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
|
|
|
releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
2017-06-27 01:55:04 +00:00
|
|
|
|
|
|
|
// Kotlin
|
2017-05-08 04:05:44 +00:00
|
|
|
}
|
2019-01-27 08:22:38 +00:00
|
|
|
|
|
|
|
def renameAPK(variant, defaultConfig, buildType) {
|
|
|
|
variant.outputs.each { output ->
|
|
|
|
def formattedDate = new Date().format('yyMMdd')
|
|
|
|
|
|
|
|
def file = output.packageApplication.outputFile
|
|
|
|
def fileName = defaultConfig.applicationId + "_" + defaultConfig.versionCode + "_" + formattedDate + "_" + buildType + ".apk"
|
|
|
|
output.packageApplication.outputFile = new File(file.parent, fileName)
|
|
|
|
}
|
|
|
|
}
|