You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Clover/Clover/app/build.gradle

155 lines
5.1 KiB

apply plugin: 'com.android.application'
/**
* Gets the version name from the latest Git tag
*/
def getCommitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short=8', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
android {
compileSdkVersion 26
// update the travis config when changing this
buildToolsVersion '26.0.2'
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionName "v2.3.1"
// of the format XXYYZZ, where XX is major, YY is minor, ZZ is patch
// (watch out for octal notation, never start with a 0)
versionCode 20301
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError false
}
// Needed for volley
useLibrary 'org.apache.http.legacy'
/*
If you want to sign releases, make a file in app/keys.properties with the following content:
keystoreFile=yourkey.store
keystorePass=pass
keyAlias=alias
keyPass=pass
*/
def hash = getCommitHash();
File f = file('keys.properties')
boolean doSign = f.exists();
if (doSign) {
Properties props = new Properties()
InputStream is = new FileInputStream(f)
props.load(is)
signingConfigs {
release {
storeFile file(props['keystoreFile'])
storePassword props['keystorePass']
keyAlias props['keyAlias']
keyPassword props['keyPass']
}
}
is.close()
}
defaultPublishConfig "default"
flavorDimensions "default"
productFlavors {
// The app name refers to the name as displayed on the launcher.
// the flavor name is appended to the name in the settings.
"default" {
dimension "default"
applicationId "org.floens.chan"
resValue "string", "app_name", "Clover"
resValue "string", "app_flavor_name", ""
buildConfigField "String", "BUILD_HASH", "\"$hash\""
buildConfigField "String", "UPDATE_API_ENDPOINT", "\"https://floens.github.io/Clover/api/update\""
buildConfigField "String", "CRASH_REPORT_ENDPOINT", "\"https://acra.floens.org/clover/report\""
}
dev {
dimension "default"
applicationId "org.floens.chan.dev"
resValue "string", "app_name", "Clover dev"
resValue "string", "app_flavor_name", ""
buildConfigField "String", "BUILD_HASH", "\"$hash\""
buildConfigField "String", "UPDATE_API_ENDPOINT", "\"https://build.floens.org/api/update_dev\""
buildConfigField "String", "CRASH_REPORT_ENDPOINT", "\"https://acra.floens.org/clover/report\""
versionNameSuffix "-" + hash
}
fdroid {
dimension "default"
applicationId "org.floens.chan"
resValue "string", "app_name", "Clover"
resValue "string", "app_flavor_name", "F-Droid"
buildConfigField "String", "BUILD_HASH", "\"$hash\""
buildConfigField "String", "UPDATE_API_ENDPOINT", "\"https://floens.github.io/Clover/api/update\""
buildConfigField "String", "CRASH_REPORT_ENDPOINT", "\"https://acra.floens.org/clover/report\""
}
}
buildTypes {
release {
if (doSign) {
signingConfig signingConfigs.release
}
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
debug {
// minifyEnabled true
// proguardFiles 'proguard.cfg'
}
}
sourceSets {
beta.java.srcDirs = ['src/release/java']
}
}
dependencies {
def supportVersion = '26.1.0'
implementation "com.android.support:support-v13:${supportVersion}"
implementation "com.android.support:appcompat-v7:${supportVersion}"
implementation "com.android.support:recyclerview-v7:${supportVersion}"
implementation "com.android.support:cardview-v7:${supportVersion}"
implementation "com.android.support:support-annotations:${supportVersion}"
implementation "com.android.support:design:${supportVersion}"
implementation "com.android.support:customtabs:${supportVersion}"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation 'com.j256.ormlite:ormlite-core:4.48'
implementation 'com.j256.ormlite:ormlite-android:4.48'
implementation 'org.jsoup:jsoup:1.9.2'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.1.16'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
implementation 'de.greenrobot:eventbus:2.4.0'
implementation 'org.nibor.autolink:autolink:0.6.0'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'me.xdrop:fuzzywuzzy:1.1.9'
implementation 'org.codejargon.feather:feather:1.0'
releaseImplementation 'ch.acra:acra-http:5.0.1'
}