FeederOldUI/app/build.gradle

229 lines
8.3 KiB
Groovy

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
buildToolsVersion "$build_tools_version"
lintOptions {
abortOnError true
explainIssues true
ignoreWarnings true
textReport true
textOutput 'stdout'
// Should try to remove last two here
disable "MissingTranslation", "AppCompatCustomView", "InvalidPackage"
// I really want some to show as errors
error "InlinedApi", "StringEscaping"
}
defaultConfig {
applicationId "com.nononsenseapps.feeder"
versionCode 106
versionName "1.13.5"
compileSdkVersion 30
minSdkVersion 23
targetSdkVersion 30
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
// For espresso tests
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Export Room schemas
javaCompileOptions {
annotationProcessorOptions {
arguments = [
"room.schemaLocation": "$projectDir/schemas".toString(),
"room.incremental" : "true"
]
}
}
}
sourceSets {
// To test Room we need to include the schema dir in resources
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
if (project.hasProperty('STORE_FILE')) {
signingConfigs {
release {
storeFile file(STORE_FILE)
storePassword STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
}
}
buildTypes {
debug {
minifyEnabled false
shrinkResources false
applicationIdSuffix ".debug"
pseudoLocalesEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debugMini {
initWith debug
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
matchingFallbacks = ['debug']
}
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (project.hasProperty('STORE_FILE')) {
signingConfig signingConfigs.release
}
}
play {
applicationIdSuffix ".play"
// If you re-enable this - fix the issues on Android 4.3
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (project.hasProperty('STORE_FILE')) {
signingConfig signingConfigs.release
}
}
}
testOptions {
unitTests.returnDefaultValues = true
}
kotlinOptions {
jvmTarget = "1.8"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/AL2.0'
exclude 'META-INF/LGPL2.1'
}
}
configurations.all {
resolutionStrategy {
// failOnVersionConflict()
force "com.squareup.okhttp3:okhttp:$okhttp_version"
force "com.squareup.okio:okio:$okio_version"
force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
force "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
force "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
}
}
dependencies {
kapt "androidx.room:room-compiler:$room_version"
// BOMS
api(platform("com.squareup.okhttp3:okhttp-bom:$okhttp_version"))
// Needed pre SDK21
implementation "com.android.support:multidex:$multi_dex_version"
implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.work:work-runtime-ktx:$workmanager_version"
implementation "androidx.core:core-ktx:$androidx_core_version"
implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
implementation "androidx.recyclerview:recyclerview:$recyclerview_version"
implementation "androidx.legacy:legacy-support-v4:$legacy_support_version"
implementation "androidx.appcompat:appcompat:$appcompat_version"
implementation "androidx.preference:preference:$preference_version"
implementation "com.google.android.material:material:$material_version"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.paging:paging-runtime-ktx:$paging_version"
// Better times
implementation "com.jakewharton.threetenabp:threetenabp:$threetenabp_version"
// HTML parsing
implementation "org.jsoup:jsoup:$jsoup_version"
implementation "org.ccil.cowan.tagsoup:tagsoup:1.2.1"
// RSS
implementation "com.rometools:rome:$rome_version"
implementation "com.rometools:rome-modules:$rome_version"
// JSONFeed
implementation project(":jsonfeed-parser")
// For better fetching
implementation("com.squareup.okhttp3:okhttp:$okhttp_version")
// For supporting TLSv1.3 on pre Android-10
implementation "org.conscrypt:conscrypt-android:$conscrypt_version"
// Image loading
implementation("io.coil-kt:coil-base:1.1.1")
implementation("io.coil-kt:coil-gif:1.1.1")
implementation("io.coil-kt:coil-svg:1.1.1")
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
// For doing coroutines on UI thread
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
// Dependency injection
implementation "org.kodein.di:kodein-di-generic-jvm:$kodein_version"
implementation "org.kodein.di:kodein-di-framework-android-x:$kodein_version"
// Custom tabs
implementation "com.android.support:customtabs:28.0.0"
// Full text
implementation "net.dankito.readability4j:readability4j:$readability4j_version"
// tests
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
testImplementation "junit:junit:4.12"
testImplementation "org.mockito:mockito-core:$mockito_version"
testImplementation "io.mockk:mockk:$mockk_version"
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
// Needed for unit testing timezone stuff
testImplementation "org.threeten:threetenbp:$threetentest_version"
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
androidTestImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
androidTestImplementation "io.mockk:mockk-android:1.8.10.kotlin13"
androidTestImplementation "junit:junit:4.12"
androidTestImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
androidTestImplementation "androidx.test:core:$androidx_core_version"
androidTestImplementation "androidx.test:runner:$test_runner_version"
androidTestImplementation "androidx.test:rules:$test_rules_version"
androidTestImplementation "androidx.test.ext:junit:$test_ext_junit_version"
androidTestImplementation "androidx.recyclerview:recyclerview:$recyclerview_version"
androidTestImplementation "androidx.legacy:legacy-support-v4:$legacy_support_version"
androidTestImplementation "androidx.appcompat:appcompat:$appcompat_version"
androidTestImplementation "com.google.android.material:material:$material_version"
androidTestImplementation "androidx.room:room-testing:$room_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espresso_version"
androidTestImplementation "androidx.test.uiautomator:uiautomator:$uiautomator_version"
}