mirror of https://github.com/kurisufriend/Clover
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.
134 lines
3.9 KiB
134 lines
3.9 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', 'HEAD'
|
|
standardOutput = stdout
|
|
}
|
|
return "-" + stdout.toString().trim()
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 25
|
|
// update the travis config when changing this
|
|
buildToolsVersion '25.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_7
|
|
targetCompatibility JavaVersion.VERSION_1_7
|
|
}
|
|
|
|
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
|
|
*/
|
|
|
|
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"
|
|
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" {
|
|
applicationId "org.floens.chan"
|
|
resValue "string", "app_name", "Clover"
|
|
resValue "string", "app_flavor_name", ""
|
|
buildConfigField "String", "UPDATE_API_ENDPOINT", "\"https://floens.github.io/Clover/api/update\""
|
|
}
|
|
|
|
dev {
|
|
applicationId "org.floens.chan.dev"
|
|
resValue "string", "app_name", "Clover dev"
|
|
resValue "string", "app_flavor_name", ""
|
|
buildConfigField "String", "UPDATE_API_ENDPOINT", "\"\""
|
|
}
|
|
|
|
fdroid {
|
|
applicationId "org.floens.chan"
|
|
resValue "string", "app_name", "Clover"
|
|
resValue "string", "app_flavor_name", "F-Droid"
|
|
buildConfigField "String", "UPDATE_API_ENDPOINT", "\"https://floens.github.io/Clover/api/update\""
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
if (doSign) {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
minifyEnabled true
|
|
proguardFiles 'proguard.cfg'
|
|
}
|
|
|
|
debug {
|
|
versionNameSuffix getCommitHash()
|
|
// minifyEnabled true
|
|
// proguardFiles 'proguard.cfg'
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
beta.java.srcDirs = ['src/release/java']
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile 'com.android.support:support-v13:25.3.1'
|
|
compile 'com.android.support:appcompat-v7:25.3.1'
|
|
compile 'com.android.support:recyclerview-v7:25.3.1'
|
|
compile 'com.android.support:cardview-v7:25.3.1'
|
|
compile 'com.android.support:support-annotations:25.3.1'
|
|
compile 'com.android.support:design:25.3.1'
|
|
compile 'com.android.support:customtabs:25.3.1'
|
|
|
|
compile 'org.jsoup:jsoup:1.9.2'
|
|
compile 'com.j256.ormlite:ormlite-core:4.48'
|
|
compile 'com.j256.ormlite:ormlite-android:4.48'
|
|
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.16'
|
|
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
|
|
compile 'com.squareup.okhttp3:okhttp:3.4.1'
|
|
compile 'de.greenrobot:eventbus:2.4.0'
|
|
compile 'org.nibor.autolink:autolink:0.6.0'
|
|
}
|
|
|