ReadYou/app/build.gradle

202 lines
7.7 KiB
Groovy
Raw Normal View History

2022-03-01 18:40:53 +01:00
plugins {
2022-04-20 16:25:29 +02:00
id "com.android.application"
id "org.jetbrains.kotlin.android"
id "kotlin-kapt"
id "dagger.hilt.android.plugin"
2022-03-01 18:40:53 +01:00
id "androidx.navigation.safeargs.kotlin"
}
2022-04-20 16:25:29 +02:00
def gitCommitHash = "git rev-parse --verify --short HEAD".execute().text.trim()
2022-04-19 19:36:34 +02:00
def keyProps = new Properties()
2022-04-28 19:43:01 +02:00
def keyPropsFile = rootProject.file("signature/keystore.properties")
2022-04-19 19:36:34 +02:00
if (keyPropsFile.exists()) {
println("Loading keystore properties from ${keyPropsFile.absolutePath}")
keyProps.load(new FileInputStream(keyPropsFile))
}
2022-12-08 09:50:19 +01:00
Properties defaultOuinetProperties = new Properties()
defaultOuinetProperties.load(rootProject.file('ouinet.default.properties').newDataInputStream())
2022-11-29 14:03:01 +01:00
2022-03-01 18:40:53 +01:00
android {
2022-11-29 14:03:01 +01:00
compileSdk 33
2022-03-01 18:40:53 +01:00
defaultConfig {
applicationId "me.ash.reader"
minSdk 26
2022-11-29 14:03:01 +01:00
targetSdk 33
2022-10-15 14:50:57 +02:00
versionCode 15
versionName "0.9.1"
2022-03-01 18:40:53 +01:00
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
javaCompileOptions {
annotationProcessorOptions {
arguments += [
"room.schemaLocation": "$projectDir/schemas".toString(),
"room.incremental" : "true"
]
}
}
2022-11-29 14:03:01 +01:00
2022-12-08 09:50:19 +01:00
buildConfigField "String", "CACHE_PUB_KEY", defaultOuinetProperties['CACHE_PUB_KEY']
buildConfigField "String", "INJECTOR_CREDENTIALS", defaultOuinetProperties['INJECTOR_CREDENTIALS']
buildConfigField "String", "INJECTOR_TLS_CERT", defaultOuinetProperties['INJECTOR_TLS_CERT']
2022-03-01 18:40:53 +01:00
}
2022-05-10 16:38:57 +02:00
flavorDimensions "channel"
productFlavors {
fdroid {
dimension "channel"
}
github {
dimension "channel"
}
}
2022-04-19 19:36:34 +02:00
signingConfigs {
release {
2022-04-20 16:25:29 +02:00
keyAlias keyProps["keyAlias"]
keyPassword keyProps["keyPassword"]
storeFile keyProps["storeFile"] ? file(keyProps["storeFile"]) : null
storePassword keyProps["storePassword"]
2022-04-19 19:36:34 +02:00
}
}
2022-03-01 18:40:53 +01:00
buildTypes {
release {
minifyEnabled true
shrinkResources true
2022-04-20 16:25:29 +02:00
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
2022-04-19 19:36:34 +02:00
signingConfig signingConfigs.release
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFileName = "ReadYou-${defaultConfig.versionName}-${gitCommitHash}.apk"
2022-03-01 18:40:53 +01:00
}
}
2022-03-29 14:32:17 +02:00
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn"
}
2022-03-01 18:40:53 +01:00
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
2022-04-20 16:25:29 +02:00
jvmTarget = "1.8"
2022-03-01 18:40:53 +01:00
}
buildFeatures {
compose true
}
composeOptions {
2022-04-20 16:25:29 +02:00
kotlinCompilerExtensionVersion compose
2022-03-01 18:40:53 +01:00
}
packagingOptions {
resources {
2022-04-20 16:25:29 +02:00
excludes += "/META-INF/{AL2.0,LGPL2.1}"
2022-03-01 18:40:53 +01:00
}
}
}
dependencies {
2022-04-20 16:25:29 +02:00
implementation "com.github.ireward:compose-html:1.0.2"
// http://bigbadaboom.github.io/androidsvg/release_notes.html
implementation "com.caverock:androidsvg-aar:$androidSVG"
// https://github.com/mdewilde/opml-parser
implementation "be.ceau:opml-parser:$opmlParser"
// https://github.com/dankito/Readability4J
implementation "net.dankito.readability4j:readability4j:$readability4j"
// https://mvnrepository.com/artifact/com.rometools/rome
implementation "com.rometools:rome:$rome"
2022-04-20 16:25:29 +02:00
// https://coil-kt.github.io/coil/changelog/
implementation("io.coil-kt:coil-base:$coil")
2022-04-20 16:25:29 +02:00
implementation("io.coil-kt:coil-compose:$coil")
implementation("io.coil-kt:coil-svg:$coil")
implementation("io.coil-kt:coil-gif:$coil")
2022-04-20 16:25:29 +02:00
2022-08-08 15:23:57 +02:00
// Cancel TLSv1.3 support pre Android10
// implementation 'org.conscrypt:conscrypt-android:2.5.2'
2022-04-20 16:25:29 +02:00
// https://square.github.io/okhttp/changelogs/changelog/
2022-05-21 23:06:49 +02:00
implementation "com.squareup.okhttp3:okhttp:$okhttp"
implementation "com.squareup.okhttp3:okhttp-coroutines-jvm:$okhttp"
2022-04-20 16:25:29 +02:00
implementation "com.squareup.retrofit2:retrofit:$retrofit2"
implementation "com.squareup.retrofit2:converter-gson:$retrofit2"
// https://developer.android.com/jetpack/androidx/releases/profileinstaller
implementation "androidx.profileinstaller:profileinstaller:$profileinstaller"
// https://developer.android.com/jetpack/androidx/releases/work
implementation "androidx.work:work-runtime-ktx:$work"
// https://developer.android.com/jetpack/androidx/releases/datastore
implementation "androidx.datastore:datastore-preferences:$datastore"
// https://developer.android.com/jetpack/androidx/releases/room
implementation "androidx.room:room-paging:$room"
implementation "androidx.room:room-common:$room"
implementation "androidx.room:room-ktx:$room"
kapt "androidx.room:room-compiler:$room"
// https://developer.android.com/jetpack/androidx/releases/paging
implementation "androidx.paging:paging-common:$paging"
implementation "androidx.paging:paging-runtime:$paging"
implementation "androidx.paging:paging-compose:1.0.0-alpha14"
// https://developer.android.com/jetpack/androidx/releases/navigation
implementation "androidx.navigation:navigation-compose:$navigation"
// https://developer.android.com/jetpack/androidx/releases/lifecycle
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle"
// https://developer.android.com/jetpack/androidx/releases/compose-material3
implementation "androidx.compose.material3:material3:$material3"
// https://github.com/google/accompanist/releases
implementation "com.google.accompanist:accompanist-insets:$accompanist"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist"
implementation "com.google.accompanist:accompanist-pager:$accompanist"
implementation "com.google.accompanist:accompanist-flowlayout:$accompanist"
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist"
implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist"
// https://developer.android.com/jetpack/androidx/releases/compose-animation
implementation "androidx.compose.animation:animation-graphics:$compose"
// https://developer.android.com/jetpack/androidx/releases/compose-ui
implementation "androidx.compose.ui:ui:$compose"
implementation "androidx.compose.ui:ui-util:$compose"
2022-04-20 16:25:29 +02:00
// https://developer.android.com/jetpack/androidx/releases/compose-material
implementation "androidx.compose.material:material:$compose"
implementation "androidx.compose.material:material-icons-extended:$compose"
2022-05-23 14:54:06 +02:00
debugImplementation "androidx.compose.ui:ui-tooling:$compose"
2022-04-20 16:25:29 +02:00
implementation "androidx.compose.ui:ui-tooling-preview:$compose"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose"
// hilt
2022-03-21 15:40:40 +01:00
implementation "androidx.hilt:hilt-work:1.0.0"
2022-03-01 18:40:53 +01:00
implementation "com.google.dagger:hilt-android:2.40.5"
kapt "com.google.dagger:hilt-android-compiler:2.40.5"
2022-04-20 16:25:29 +02:00
implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03"
kapt "androidx.hilt:hilt-compiler:1.0.0"
2022-03-01 18:40:53 +01:00
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
2022-04-20 16:25:29 +02:00
// android
implementation "androidx.core:core-ktx:1.7.0"
implementation "androidx.activity:activity-compose:1.4.0"
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test.ext:junit:1.1.3"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
2022-11-29 14:03:01 +01:00
// OuiNet integration
2022-11-30 15:02:22 +01:00
implementation 'ie.equalit.ouinet:ouinet-omni:0.21.3'
2022-11-29 14:03:01 +01:00
implementation 'com.getkeepsafe.relinker:relinker:1.4.4'
2022-07-10 09:35:04 +02:00
}