news-android/News-Android-App/build.gradle
David Luhmer 99938a58fb add privacy document
Signed-off-by: David Luhmer <david-dev@live.de>
2020-12-09 17:02:06 +01:00

259 lines
No EOL
9.8 KiB
Groovy

apply plugin: 'com.android.application'
android {
/*
signingConfigs {
debug {
storeFile file("~/.android/debug.keystore")
}
}*/
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
testOptions.unitTests.includeAndroidResources = true
defaultConfig {
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
//testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "de.luhmer.owncloudnewsreader.CustomTestRunner"
// The following argument makes the Android Test Orchestrator run its
// "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'
vectorDrawables.useSupportLibrary = true
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
debug {
shrinkResources false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
testProguardFiles 'proguard-test.pro'
pseudoLocalesEnabled true
}
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
testProguardFiles 'proguard-test.pro'
//signingConfig signingConfigs.debug
}
}
flavorDimensions "default"
productFlavors {
// 100% Open-Source Edition
oss {
dimension "default"
}
// 99% Open-source edition: uses the YouTube Player Jar
extra {
dimension "default"
}
// Used for continous integration, e.g. to test built .apk-files from pull requests
dev {
dimension "default"
applicationIdSuffix ".dev"
}
}
lintOptions {
// translations are imported from transifex, so no need to check here
disable 'MissingTranslation'
disable 'ExtraTranslation'
disable 'MissingQuantity'
disable 'InconsistentArrays'
disable 'TypographyEllipsis'
checkReleaseBuilds false
// if set to true (default), stops the build if errors are found.
abortOnError true
// if true, only report errors.
ignoreWarnings true
}
sourceSets {
main {
aidl.srcDirs = ['src/main/java']
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'LICENSE.txt'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
// Gradle automatically adds 'android.test.runner' as a dependency.
useLibrary 'android.test.runner'
useLibrary 'android.test.base'
useLibrary 'android.test.mock'
}
repositories {
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://guardian.github.com/maven/repo-releases' } //needed for com.gu:option:1.3 in Android-DirectoryChooser
maven { url "https://dl.bintray.com/lukaville/maven" } //Needed for com.nbsp:library:1.8 in Material File Picker
}
final DAGGER_VERSION = '2.27'
final BUTTERKNIFE_VERSION = '10.2.1'
final ESPRESSO_VERSION = '3.3.0'
final OKHTTP_VERSION = '3.12.10'
final MOCKITO_VERSION = '3.3.3'
final RETROFIT_VERSION = '2.6.4'
dependencies {
// core android studio module
// compile project(':core')
// You must install or update the Google Repository through the SDK manager to use this dependency.
// The Google Repository (separate from the corresponding library) can be found in the Extras category.
// implementation 'com.google.android.gms:play-services:4.2.42'
implementation project(':Android-SingleSignOn')
// implementation project(path: ':MaterialShowcaseView:library', configuration: 'default')
//implementation 'com.github.nextcloud:Android-SingleSignOn:0.5.4'
implementation 'com.github.David-Development:MaterialShowcaseView:bf6afa225d'
implementation "androidx.core:core:1.3.2"
implementation 'androidx.annotation:annotation:1.1.0'
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "androidx.preference:preference:1.1.1"
// https://mvnrepository.com/artifact/com.google.android.material/material
implementation "com.google.android.material:material:1.3.0-alpha03"
//implementation "com.google.android.material:material:1.0.0"
implementation "androidx.palette:palette:1.0.0"
implementation "androidx.recyclerview:recyclerview:1.1.0"
implementation "androidx.browser:browser:1.2.0"
implementation "androidx.cardview:cardview:1.0.0"
//implementation 'de.mrmaffen:holocircularprogressbar:1.0.1'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.google.code.gson:gson:2.8.6'
implementation "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
annotationProcessor "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"
implementation 'com.sothree.slidinguppanel:library:3.2.1'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'de.greenrobot:greendao:2.0.0'
implementation ('de.greenrobot:greendao-generator:2.0.0') {
exclude group: 'org.freemarker'
}
//implementation 'org.freemarker:freemarker:2.3.23' // Required for DAO generation
//implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0'
implementation 'org.jsoup:jsoup:1.13.1'
implementation ('net.rdrei.android.dirchooser:library:3.0@aar') {
exclude group: 'com.google.auto.value', module: 'auto-value'
transitive = true
}
implementation "com.google.dagger:dagger:${DAGGER_VERSION}"
annotationProcessor "com.google.dagger:dagger-compiler:${DAGGER_VERSION}"
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
// Because RxAndroid releases are few and far between, it is recommended you also
// explicitly depend on RxJava's latest version for bug fixes and new features.
implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
implementation "com.squareup.retrofit2:adapter-rxjava2:$RETROFIT_VERSION"
implementation "com.squareup.retrofit2:retrofit:$RETROFIT_VERSION"
implementation "com.squareup.retrofit2:converter-gson:$RETROFIT_VERSION"
implementation "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}"
implementation "com.squareup.okhttp3:logging-interceptor:${OKHTTP_VERSION}"
implementation 'com.nbsp:library:1.8' // MaterialFilePicker
//extraImplementation 'com.github.tommus:youtube-android-player-api:1.2.2'
testImplementation 'junit:junit:4.13'
testImplementation("org.mockito:mockito-core:$MOCKITO_VERSION") {
exclude group: 'org.hamcrest'
}
testImplementation 'com.google.dexmaker:dexmaker:1.2'
testImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
testImplementation "com.squareup.okhttp3:mockwebserver:${OKHTTP_VERSION}"
androidTestAnnotationProcessor "com.google.dagger:dagger-compiler:${DAGGER_VERSION}"
// https://mvnrepository.com/artifact/com.squareup.okhttp3/mockwebserver
//androidTestImplementation "com.squareup.okhttp3:mockwebserver:${OKHTTP_VERSION}"
androidTestImplementation 'tools.fastlane:screengrab:2.0.0'
//androidTestImplementation "org.mockito:mockito-core:MOCKITO_VERSION"
androidTestImplementation "org.mockito:mockito-android:$MOCKITO_VERSION"
//androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
//androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
testImplementation 'org.robolectric:robolectric:4.3.1'
// Core library
androidTestImplementation 'androidx.test:core:1.3.0'
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
// Assertions
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.ext:truth:1.3.0'
androidTestImplementation 'com.google.truth:truth:1.0.1'
// Espresso dependencies
androidTestImplementation "androidx.test.espresso:espresso-core:$ESPRESSO_VERSION"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$ESPRESSO_VERSION"
androidTestImplementation "androidx.test.espresso:espresso-intents:$ESPRESSO_VERSION"
androidTestImplementation "androidx.test.espresso:espresso-accessibility:$ESPRESSO_VERSION"
androidTestImplementation "androidx.test.espresso:espresso-web:$ESPRESSO_VERSION"
androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$ESPRESSO_VERSION"
// https://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator
androidTestUtil 'androidx.test:orchestrator:1.3.0'
// The following Espresso dependency can be either "implementation"
// or "androidTestImplementation", depending on whether you want the
// dependency to appear on your APK's compile classpath or the test APK
// classpath.
//androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.1.1'
}
/*
// Workaround for https://github.com/mockito/mockito/issues/1511#issuecomment-458544398
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'net.bytebuddy') {
details.useVersion "1.8.22"
}
}
}
*/