chinwag-android/app/build.gradle
Mike Barnes cbd1268339 v23.0
-----BEGIN PGP SIGNATURE-----
 Version: BCPG v1.72
 
 iQJDBAABCAAtBQJkrEbnFiEEj23e8Mh/GILvvT0B+VJoFZwuyJcPHG5pa0BuZ28u
 b3JnLnVrAAoJEPlSaBWcLsiX5oEQANeQ26a9Hman++Ox+gXMP9+l4f1YzRq7FTmJ
 YhX5SJOfz1KN1Fbmv5ZgyI4nFUCJUASqBYube2LVV6m0mG1B4FeDAXyidUtQjH80
 Fv2H7E3BlJ1Y/Zo660/eBoTAIYothu2ukWBl8MmDeb/LpUhZ7NPPd7r8C0wD+HIJ
 1cnwDE9e7GunqsIvlg3hSzaqgSL3+EwyR2/iWMgI1X/qSDszIbk6QKq6nGP7+oLP
 +It3bQTGljgIJD+U0WpgqV+rKxV5/47RO0K+CPz7I2KpXK9GKSQ123hKxKuyndCY
 LajC9qel05aL7ufvzL8+BO2ucQJESuM1LEWB1YBgD6kTCuTrDlQHTsDCc3uOLjkO
 smlXc/tPsTAl0w/NXTrD/G6poW9yoirk4rpAAG3r8uFxzFNce5qNRGuD3TEbsBVQ
 QVmFnbxfrRZzGqcPDfH3yBn1VI7PEquM7NUp2d1PHCv/VKB4st7b7Z2oZRtr4Tv4
 vAIwsBqoGu71wGtdsx+8swPNxP/m8F7ROzvcf58M38tiYSzx+5fhJ6ffgpQ5leSu
 R7JiLws5q3FLS74mO3gs9R9xitEjTCG2+BDMLtyc30hEveELG6rorUAGtg1RAhge
 kuaLE3pz8Sxw4UbRIEnFEjLlt4EDlL4Ttwgnaxy/VTUvLJ6o7h9yawZXi3yunwgZ
 SB6u20dK
 =RrjC
 -----END PGP SIGNATURE-----

Merge Tusky 23, prep for graphics refresh
2023-08-06 16:25:50 +10:00

191 lines
5.8 KiB
Groovy

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.google.ksp)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.kotlin.parcelize)
}
apply from: 'getGitSha.gradle'
final def gitSha = ext.getGitSha()
// The app name
final def APP_NAME = "Chinwag Social"
// The application id. Must be unique, e.g. based on your domain
final def APP_ID = "org.chinwag.socialapp"
// url of a custom app logo. Recommended size at least 600x600. Keep empty to use the Tusky elephant friend.
final def CUSTOM_LOGO_URL = ""
// e.g. mastodon.social. Keep empty to not suggest any instance on the signup screen
final def CUSTOM_INSTANCE = "chinwag.org"
// link to your support account. Will be linked on the about page when not empty.
final def SUPPORT_ACCOUNT_URL = "https://social.chinwag.org/@ChinwagNews"
// New account registration link
final def REGISTER_ACCOUNT_URL = "https://chinwag.org/auth/sign_up"
android {
compileSdk 33
namespace "com.keylesspalace.tusky"
defaultConfig {
applicationId APP_ID
namespace "com.keylesspalace.tusky"
minSdk 23
targetSdk 33
versionCode 90
versionName "23.0-CW0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
resValue "string", "app_name", APP_NAME
buildConfigField("String", "CUSTOM_LOGO_URL", "\"$CUSTOM_LOGO_URL\"")
buildConfigField("String", "CUSTOM_INSTANCE", "\"$CUSTOM_INSTANCE\"")
buildConfigField("String", "SUPPORT_ACCOUNT_URL", "\"$SUPPORT_ACCOUNT_URL\"")
buildConfigField("String", "REGISTER_ACCOUNT_URL", "\"$REGISTER_ACCOUNT_URL\"")
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles 'proguard-rules.pro'
}
}
flavorDimensions += "color"
productFlavors {
blue {}
green {
resValue "string", "app_name", APP_NAME + " Test"
applicationIdSuffix ".test"
versionNameSuffix "-" + gitSha
}
}
lint {
lintConfig file("lint.xml")
// Regenerate by deleting app/lint-baseline.xml, then run:
// ./gradlew lintBlueDebug
baseline = file("lint-baseline.xml")
}
buildFeatures {
buildConfig true
resValues true
viewBinding true
}
testOptions {
unitTests {
returnDefaultValues = true
includeAndroidResources = true
}
unitTests.all {
systemProperty 'robolectric.logging.enabled', 'true'
systemProperty 'robolectric.lazyload', 'ON'
}
}
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
// Exclude unneeded files added by libraries
packagingOptions.resources.excludes += [
'LICENSE_OFL',
'LICENSE_UNICODE',
]
bundle {
language {
// bundle all languages in every apk so the dynamic language switching works
enableSplit = false
}
}
dependenciesInfo {
includeInApk false
includeInBundle false
}
// Can remove this once https://issuetracker.google.com/issues/260059413 is fixed.
// https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "Tusky_${variant.versionName}_${variant.versionCode}_${gitSha}_" +
"${variant.flavorName}_${buildType.name}.apk"
}
}
}
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
}
configurations {
// JNI-only libraries don't play nicely with Robolectric
// see https://github.com/tuskyapp/Tusky/pull/3367
testImplementation.exclude group: "org.conscrypt", module: "conscrypt-android"
testRuntime.exclude group: "org.conscrypt", module: "conscrypt-android"
}
// library versions are in PROJECT_ROOT/gradle/libs.versions.toml
dependencies {
implementation libs.kotlinx.coroutines.android
implementation libs.kotlinx.coroutines.rx3
implementation libs.bundles.androidx
implementation libs.bundles.room
ksp libs.androidx.room.compiler
implementation libs.android.material
implementation libs.gson
implementation libs.bundles.retrofit
implementation libs.networkresult.calladapter
implementation libs.bundles.okhttp
implementation libs.conscrypt.android
implementation libs.bundles.glide
kapt libs.glide.compiler
implementation libs.bundles.rxjava3
implementation libs.bundles.autodispose
implementation libs.bundles.dagger
kapt libs.bundles.dagger.processors
implementation libs.sparkbutton
implementation libs.photoview
implementation libs.bundles.material.drawer
implementation libs.material.typeface
implementation libs.image.cropper
implementation libs.bundles.filemojicompat
implementation libs.bouncycastle
implementation libs.unified.push
implementation libs.bundles.xmldiff
testImplementation libs.androidx.test.junit
testImplementation libs.robolectric
testImplementation libs.bundles.mockito
testImplementation libs.mockwebserver
testImplementation libs.androidx.core.testing
testImplementation libs.kotlinx.coroutines.test
testImplementation libs.androidx.work.testing
testImplementation libs.truth
testImplementation libs.turbine
androidTestImplementation libs.espresso.core
androidTestImplementation libs.androidx.room.testing
androidTestImplementation libs.androidx.test.junit
}