# Conflicts: # README.md # app/build.gradle # app/src/main/java/com/keylesspalace/tusky/ListsActivity.kt # app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java # app/src/main/java/com/keylesspalace/tusky/components/account/AccountActivity.kt # app/src/main/java/com/keylesspalace/tusky/components/account/media/AccountMediaFragment.kt # app/src/main/java/com/keylesspalace/tusky/components/accountlist/AccountListFragment.kt # app/src/main/java/com/keylesspalace/tusky/components/announcements/AnnouncementsActivity.kt # app/src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt # app/src/main/java/com/keylesspalace/tusky/components/compose/view/ProgressImageView.kt # app/src/main/java/com/keylesspalace/tusky/components/conversation/ConversationsFragment.kt # app/src/main/java/com/keylesspalace/tusky/components/filters/FiltersActivity.kt # app/src/main/java/com/keylesspalace/tusky/components/login/LoginActivity.kt # app/src/main/java/com/keylesspalace/tusky/components/report/fragments/ReportStatusesFragment.kt # app/src/main/java/com/keylesspalace/tusky/components/scheduled/ScheduledStatusActivity.kt # app/src/main/java/com/keylesspalace/tusky/components/search/fragments/SearchFragment.kt # app/src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt # app/src/main/java/com/keylesspalace/tusky/components/trending/TrendingTagsFragment.kt # app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadFragment.kt # app/src/main/java/com/keylesspalace/tusky/components/viewthread/edits/ViewEditsFragment.kt # app/src/main/java/com/keylesspalace/tusky/view/GraphView.kt # app/src/main/res/color/compound_button_color.xml # app/src/main/res/color/text_input_layout_box_stroke_color.xml # app/src/main/res/drawable/ic_check_circle.xml # app/src/main/res/drawable/ic_flag_24dp.xml # app/src/main/res/drawable/ic_person_add_24dp.xml # app/src/main/res/drawable/ic_play_indicator.xml # app/src/main/res/drawable/ic_poll_24dp.xml # app/src/main/res/drawable/ic_reblog_active_24dp.xml # app/src/main/res/drawable/ic_reblog_private_active_24dp.xml # app/src/main/res/drawable/report_success_background.xml # app/src/main/res/layout-land/item_trending_cell.xml # app/src/main/res/layout/activity_account.xml # app/src/main/res/layout/activity_edit_filter.xml # app/src/main/res/layout/card_license.xml # app/src/main/res/layout/item_announcement.xml # app/src/main/res/layout/item_status.xml # app/src/main/res/layout/item_status_detailed.xml # app/src/main/res/layout/item_tab_preference.xml # app/src/main/res/layout/item_trending_cell.xml # app/src/main/res/values-cs/strings.xml # app/src/main/res/values-de/strings.xml # app/src/main/res/values-es/strings.xml # app/src/main/res/values-eu/strings.xml # app/src/main/res/values-fr/strings.xml # app/src/main/res/values-kab/strings.xml # app/src/main/res/values-lv/strings.xml # app/src/main/res/values-nb-rNO/strings.xml # app/src/main/res/values-night/theme_colors.xml # app/src/main/res/values/colors.xml # app/src/main/res/values/strings.xml # app/src/main/res/values/styles.xml # app/src/main/res/values/theme_colors.xml
201 lines
6 KiB
Groovy
201 lines
6 KiB
Groovy
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.google.ksp)
|
|
alias(libs.plugins.hilt.android)
|
|
alias(libs.plugins.kotlin.android)
|
|
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 = "https://static.chinwag.net.au/chinwag-logo-simple.svg"
|
|
// 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 35
|
|
namespace "com.keylesspalace.tusky"
|
|
defaultConfig {
|
|
applicationId APP_ID
|
|
namespace "com.keylesspalace.tusky"
|
|
minSdk 24
|
|
targetSdk 35
|
|
versionCode 94
|
|
versionName "28.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 {
|
|
debug {
|
|
isDefault true
|
|
}
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles 'proguard-rules.pro'
|
|
|
|
kotlinOptions {
|
|
freeCompilerArgs = [
|
|
"-Xno-param-assertions",
|
|
"-Xno-call-assertions",
|
|
"-Xno-receiver-assertions"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
flavorDimensions += "color"
|
|
productFlavors {
|
|
blue {}
|
|
green {
|
|
resValue "string", "app_name", APP_NAME + " Test"
|
|
applicationIdSuffix ".test"
|
|
versionNameSuffix "-" + gitSha
|
|
isDefault true
|
|
}
|
|
}
|
|
|
|
lint {
|
|
lintConfig file("lint.xml")
|
|
// Regenerate by deleting the file and running `./gradlew app:lintGreenDebug`
|
|
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 {
|
|
// workaround to have migrations available in unit tests
|
|
// https://github.com/robolectric/robolectric/issues/3928#issuecomment-395309991
|
|
debug.assets.srcDirs += files("$projectDir/schemas".toString())
|
|
}
|
|
|
|
// Exclude unneeded files added by libraries
|
|
packagingOptions.resources.excludes += [
|
|
'LICENSE_OFL',
|
|
'LICENSE_UNICODE',
|
|
]
|
|
|
|
packagingOptions {
|
|
jniLibs {
|
|
useLegacyPackaging true
|
|
}
|
|
}
|
|
|
|
bundle {
|
|
language {
|
|
// bundle all languages in every apk so the dynamic language switching works
|
|
enableSplit = false
|
|
}
|
|
}
|
|
dependenciesInfo {
|
|
includeInApk false
|
|
includeInBundle false
|
|
}
|
|
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.generateKotlin", "true")
|
|
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.bundles.androidx
|
|
implementation libs.bundles.room
|
|
ksp libs.androidx.room.compiler
|
|
|
|
implementation libs.android.material
|
|
|
|
implementation libs.bundles.moshi
|
|
ksp libs.moshi.kotlin.codegen
|
|
|
|
implementation libs.bundles.retrofit
|
|
implementation libs.networkresult.calladapter
|
|
|
|
implementation libs.bundles.okhttp
|
|
implementation libs.okio
|
|
|
|
implementation libs.conscrypt.android
|
|
|
|
implementation libs.bundles.glide
|
|
ksp libs.glide.compiler
|
|
|
|
implementation libs.hilt.android
|
|
ksp libs.hilt.compiler
|
|
implementation libs.androidx.hilt.work
|
|
ksp libs.androidx.hilt.compiler
|
|
|
|
implementation libs.sparkbutton
|
|
|
|
implementation libs.touchimageview
|
|
|
|
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.androidx.room.testing
|
|
testImplementation libs.kotlinx.coroutines.test
|
|
testImplementation libs.androidx.work.testing
|
|
testImplementation libs.turbine
|
|
}
|