split up everything into 'full' and 'basic' build flavor

"full" is the original F-Droid app with all the features.  It should still
build the exact same app after this change.  "basic" is the smallest
version of F-Droid possible.  It does not yet build, nor work.
This commit is contained in:
Hans-Christoph Steiner 2018-05-30 17:44:21 +02:00
parent 90748a3685
commit ea80704598
86 changed files with 23 additions and 7 deletions

View File

@ -15,6 +15,9 @@ def getVersionName = { ->
def isCi = "true".equals(System.getenv("CI")) def isCi = "true".equals(System.getenv("CI"))
def preDexEnabled = "true".equals(System.getProperty("pre-dex", "true")) def preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
def fullApplicationId = "org.fdroid.fdroid"
def basicApplicationId = "org.fdroid.basic"
android { android {
compileSdkVersion 27 compileSdkVersion 27
buildToolsVersion '27.0.3' buildToolsVersion '27.0.3'
@ -31,6 +34,20 @@ android {
} }
} }
flavorDimensions "base"
productFlavors {
full {
dimension "base"
applicationId fullApplicationId
resValue "string", "applicationId", fullApplicationId
}
basic {
dimension "base"
applicationId basicApplicationId
resValue "string", "applicationId", basicApplicationId
}
}
compileOptions { compileOptions {
compileOptions.encoding = "UTF-8" compileOptions.encoding = "UTF-8"
} }
@ -49,15 +66,13 @@ android {
defaultConfig { defaultConfig {
versionCode 1003001 versionCode 1003001
versionName getVersionName() versionName getVersionName()
applicationId 'org.fdroid.fdroid'
resValue "string", "applicationId", applicationId
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
debug { debug {
applicationIdSuffix ".debug" applicationIdSuffix ".debug"
resValue "string", "applicationId", defaultConfig.applicationId + applicationIdSuffix resValue "string", "applicationId", fullApplicationId + applicationIdSuffix
versionNameSuffix "-debug" versionNameSuffix "-debug"
println 'buildTypes.debug defaultConfig.versionCode ' + defaultConfig.versionCode println 'buildTypes.debug defaultConfig.versionCode ' + defaultConfig.versionCode
} }
@ -125,13 +140,10 @@ dependencies {
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.google.zxing:core:3.3.2' implementation 'com.google.zxing:core:3.3.2'
implementation 'eu.chainfire:libsuperuser:1.0.0.201602271131' implementation 'eu.chainfire:libsuperuser:1.0.0.201602271131'
implementation 'cc.mvdan.accesspoint:library:0.2.0'
implementation 'info.guardianproject.netcipher:netcipher:2.0.0-alpha1' implementation 'info.guardianproject.netcipher:netcipher:2.0.0-alpha1'
implementation 'info.guardianproject.panic:panic:0.5' implementation 'info.guardianproject.panic:panic:0.5'
implementation 'commons-io:commons-io:2.5' implementation 'commons-io:commons-io:2.5'
implementation 'commons-net:commons-net:3.5' implementation 'commons-net:commons-net:3.5'
implementation 'org.jmdns:jmdns:3.5.3'
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation 'ch.acra:acra:4.9.1' implementation 'ch.acra:acra:4.9.1'
implementation 'io.reactivex:rxjava:1.1.0' implementation 'io.reactivex:rxjava:1.1.0'
implementation 'io.reactivex:rxandroid:0.23.0' implementation 'io.reactivex:rxandroid:0.23.0'
@ -142,10 +154,14 @@ dependencies {
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.8.7' implementation 'com.fasterxml.jackson.core:jackson-annotations:2.8.7'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.7' implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.7'
implementation 'org.bouncycastle:bcpkix-jdk15on:1.59'
implementation 'org.bouncycastle:bcprov-jdk15on:1.59' implementation 'org.bouncycastle:bcprov-jdk15on:1.59'
fullImplementation 'org.bouncycastle:bcpkix-jdk15on:1.59'
fullImplementation 'cc.mvdan.accesspoint:library:0.2.0'
fullImplementation 'org.jmdns:jmdns:3.5.3'
fullImplementation 'org.nanohttpd:nanohttpd:2.3.1'
testImplementation 'org.robolectric:robolectric:3.8' testImplementation 'org.robolectric:robolectric:3.8'
testImplementation 'org.bouncycastle:bcprov-jdk15on:1.59'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.7.22' testImplementation 'org.mockito:mockito-core:2.7.22'