Modernize a bit (#3171)
* Remove redundant ignore file * Add .gitattributes * Generate new wrapper * Apply plugins in `plugins` * Adopt new dsl * Enable stable config cache * Ignore all build folders * Enable build scan * Disable buildFeatures flags by default * Migrate to nonTransitive R class * Tweak flags * Bump AGP to 7.4.0 * Bump deps * Run `ktlintFormat` * Add an icon for IDEA to display * Revert "Bump deps" This reverts commit bc0d5b69d59f70289d5d5c4887a85e6af23cc662. * Revert "Enable build scan" This reverts commit 1568e5e84f1ee51064b3f426b1da0cf35fb67856. * Remove com.android.library * Enable Gradle cache * Enable room incremental build * Cleanups * Cleanups * Add .editorconfig * Defer clean task * Migrate `flavorDimensions` * Merge instance-build.gradle into app's build.gradle * Declare compileOptions & kotlinOptions * Bump jvmTarget to 17 * Fix conflicts * Xmx4g * Rename output apks * Revert "Bump jvmTarget to 17" This reverts commit e4d1543bda65b6d2979ae0712bceee33fa8298a6.
This commit is contained in:
parent
be935655a5
commit
3592318dc1
28 changed files with 241 additions and 215 deletions
11
.editorconfig
Normal file
11
.editorconfig
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_size = 2
|
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
* text=auto eol=lf
|
||||||
|
|
||||||
|
*.bat text eol=crlf
|
||||||
|
*.jar binary
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -3,7 +3,8 @@
|
||||||
/local.properties
|
/local.properties
|
||||||
/.idea
|
/.idea
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/build
|
build
|
||||||
/captures
|
/captures
|
||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
app/release
|
app/release
|
||||||
|
app-release.apk
|
BIN
.idea/icon.png
Normal file
BIN
.idea/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
2
app/.gitignore
vendored
2
app/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
/build
|
|
||||||
app-release.apk
|
|
|
@ -1,30 +1,33 @@
|
||||||
apply plugin: 'com.android.application'
|
plugins {
|
||||||
apply plugin: 'kotlin-android'
|
alias(libs.plugins.android.application)
|
||||||
apply plugin: 'kotlin-kapt'
|
alias(libs.plugins.kotlin.android)
|
||||||
apply plugin: 'kotlin-parcelize'
|
alias(libs.plugins.kotlin.kapt)
|
||||||
|
alias(libs.plugins.kotlin.parcelize)
|
||||||
apply from: "../instance-build.gradle"
|
|
||||||
|
|
||||||
def getGitSha = {
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
try {
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
return "unknown"
|
|
||||||
}
|
|
||||||
return stdout.toString().trim()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final def gitSha = providers.exec {
|
||||||
|
commandLine('git', 'rev-parse', '--short=7', 'HEAD')
|
||||||
|
}.standardOutput.asText.get().trim()
|
||||||
|
|
||||||
|
// The app name
|
||||||
|
final def APP_NAME = "Tusky"
|
||||||
|
// The application id. Must be unique, e.g. based on your domain
|
||||||
|
final def APP_ID = "com.keylesspalace.tusky"
|
||||||
|
// 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 = ""
|
||||||
|
// link to your support account. Will be linked on the about page when not empty.
|
||||||
|
final def SUPPORT_ACCOUNT_URL = "https://mastodon.social/@Tusky"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 33
|
compileSdk 33
|
||||||
|
namespace "com.keylesspalace.tusky"
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId APP_ID
|
applicationId APP_ID
|
||||||
namespace "com.keylesspalace.tusky"
|
namespace "com.keylesspalace.tusky"
|
||||||
minSdkVersion 23
|
minSdk 23
|
||||||
targetSdkVersion 33
|
targetSdk 33
|
||||||
versionCode 100
|
versionCode 100
|
||||||
versionName "21.0"
|
versionName "21.0"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
@ -35,12 +38,6 @@ android {
|
||||||
buildConfigField("String", "CUSTOM_LOGO_URL", "\"$CUSTOM_LOGO_URL\"")
|
buildConfigField("String", "CUSTOM_LOGO_URL", "\"$CUSTOM_LOGO_URL\"")
|
||||||
buildConfigField("String", "CUSTOM_INSTANCE", "\"$CUSTOM_INSTANCE\"")
|
buildConfigField("String", "CUSTOM_INSTANCE", "\"$CUSTOM_INSTANCE\"")
|
||||||
buildConfigField("String", "SUPPORT_ACCOUNT_URL", "\"$SUPPORT_ACCOUNT_URL\"")
|
buildConfigField("String", "SUPPORT_ACCOUNT_URL", "\"$SUPPORT_ACCOUNT_URL\"")
|
||||||
|
|
||||||
kapt {
|
|
||||||
arguments {
|
|
||||||
arg("room.schemaLocation", "$projectDir/schemas")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
@ -51,20 +48,22 @@ android {
|
||||||
debug {}
|
debug {}
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "color"
|
flavorDimensions += "color"
|
||||||
productFlavors {
|
productFlavors {
|
||||||
blue {}
|
blue {}
|
||||||
green {
|
green {
|
||||||
resValue "string", "app_name", APP_NAME + " Test"
|
resValue "string", "app_name", APP_NAME + " Test"
|
||||||
applicationIdSuffix ".test"
|
applicationIdSuffix ".test"
|
||||||
versionNameSuffix "-" + getGitSha()
|
versionNameSuffix "-" + gitSha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
lint {
|
||||||
disable 'MissingTranslation'
|
disable 'MissingTranslation'
|
||||||
}
|
}
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
|
buildConfig true
|
||||||
|
resValues true
|
||||||
viewBinding true
|
viewBinding true
|
||||||
}
|
}
|
||||||
testOptions {
|
testOptions {
|
||||||
|
@ -80,11 +79,12 @@ android {
|
||||||
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
|
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
packagingOptions {
|
// Exclude unneeded files added by libraries
|
||||||
// Exclude unneeded files added by libraries
|
packagingOptions.resources.excludes += [
|
||||||
exclude 'LICENSE_OFL'
|
'LICENSE_OFL',
|
||||||
exclude 'LICENSE_UNICODE'
|
'LICENSE_UNICODE',
|
||||||
}
|
]
|
||||||
|
|
||||||
bundle {
|
bundle {
|
||||||
language {
|
language {
|
||||||
// bundle all languages in every apk so the dynamic language switching works
|
// bundle all languages in every apk so the dynamic language switching works
|
||||||
|
@ -95,6 +95,26 @@ android {
|
||||||
includeInApk false
|
includeInApk false
|
||||||
includeInBundle false
|
includeInBundle false
|
||||||
}
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
applicationVariants.configureEach { variant ->
|
||||||
|
variant.outputs.configureEach {
|
||||||
|
outputFileName = "Tusky_${variant.versionName}_${variant.versionCode}_${gitSha}_" +
|
||||||
|
"${variant.flavorName}_${buildType.name}.apk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
kapt {
|
||||||
|
arguments {
|
||||||
|
arg("room.schemaLocation", "$projectDir/schemas")
|
||||||
|
arg("room.incremental", "true")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// library versions are in PROJECT_ROOT/gradle/libs.versions.toml
|
// library versions are in PROJECT_ROOT/gradle/libs.versions.toml
|
||||||
|
@ -132,11 +152,7 @@ dependencies {
|
||||||
implementation libs.photoview
|
implementation libs.photoview
|
||||||
|
|
||||||
implementation libs.bundles.material.drawer
|
implementation libs.bundles.material.drawer
|
||||||
implementation libs.material.typeface, {
|
implementation libs.material.typeface
|
||||||
artifact {
|
|
||||||
type = "aar"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
implementation libs.image.cropper
|
implementation libs.image.cropper
|
||||||
|
|
||||||
|
@ -156,5 +172,4 @@ dependencies {
|
||||||
androidTestImplementation libs.espresso.core
|
androidTestImplementation libs.espresso.core
|
||||||
androidTestImplementation libs.androidx.room.testing
|
androidTestImplementation libs.androidx.room.testing
|
||||||
androidTestImplementation libs.androidx.test.junit
|
androidTestImplementation libs.androidx.test.junit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
|
||||||
/* set the taskdescription programmatically, the theme would turn it blue */
|
/* set the taskdescription programmatically, the theme would turn it blue */
|
||||||
String appName = getString(R.string.app_name);
|
String appName = getString(R.string.app_name);
|
||||||
Bitmap appIcon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
|
Bitmap appIcon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
|
||||||
int recentsBackgroundColor = MaterialColors.getColor(this, R.attr.colorSurface, Color.BLACK);
|
int recentsBackgroundColor = MaterialColors.getColor(this, com.google.android.material.R.attr.colorSurface, Color.BLACK);
|
||||||
|
|
||||||
setTaskDescription(new ActivityManager.TaskDescription(appName, appIcon, recentsBackgroundColor));
|
setTaskDescription(new ActivityManager.TaskDescription(appName, appIcon, recentsBackgroundColor));
|
||||||
|
|
||||||
|
|
|
@ -519,8 +519,8 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
||||||
startActivityWithSlideInAnimation(AnnouncementsActivity.newIntent(context))
|
startActivityWithSlideInAnimation(AnnouncementsActivity.newIntent(context))
|
||||||
}
|
}
|
||||||
badgeStyle = BadgeStyle().apply {
|
badgeStyle = BadgeStyle().apply {
|
||||||
textColor = ColorHolder.fromColor(MaterialColors.getColor(binding.mainDrawer, R.attr.colorOnPrimary))
|
textColor = ColorHolder.fromColor(MaterialColors.getColor(binding.mainDrawer, com.google.android.material.R.attr.colorOnPrimary))
|
||||||
color = ColorHolder.fromColor(MaterialColors.getColor(binding.mainDrawer, R.attr.colorPrimary))
|
color = ColorHolder.fromColor(MaterialColors.getColor(binding.mainDrawer, androidx.appcompat.R.attr.colorPrimary))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DividerDrawerItem(),
|
DividerDrawerItem(),
|
||||||
|
@ -618,7 +618,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
||||||
|
|
||||||
private fun setupTabs(selectNotificationTab: Boolean) {
|
private fun setupTabs(selectNotificationTab: Boolean) {
|
||||||
val activeTabLayout = if (preferences.getString("mainNavPosition", "top") == "bottom") {
|
val activeTabLayout = if (preferences.getString("mainNavPosition", "top") == "bottom") {
|
||||||
val actionBarSize = getDimension(this, R.attr.actionBarSize)
|
val actionBarSize = getDimension(this, androidx.appcompat.R.attr.actionBarSize)
|
||||||
val fabMargin = resources.getDimensionPixelSize(R.dimen.fabMargin)
|
val fabMargin = resources.getDimensionPixelSize(R.dimen.fabMargin)
|
||||||
(binding.composeButton.layoutParams as CoordinatorLayout.LayoutParams).bottomMargin = actionBarSize + fabMargin
|
(binding.composeButton.layoutParams as CoordinatorLayout.LayoutParams).bottomMargin = actionBarSize + fabMargin
|
||||||
binding.topNav.hide()
|
binding.topNav.hide()
|
||||||
|
|
|
@ -178,9 +178,9 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidI
|
||||||
* Load colors and dimensions from resources
|
* Load colors and dimensions from resources
|
||||||
*/
|
*/
|
||||||
private fun loadResources() {
|
private fun loadResources() {
|
||||||
toolbarColor = MaterialColors.getColor(this, R.attr.colorSurface, Color.BLACK)
|
toolbarColor = MaterialColors.getColor(this, com.google.android.material.R.attr.colorSurface, Color.BLACK)
|
||||||
statusBarColorTransparent = getColor(R.color.transparent_statusbar_background)
|
statusBarColorTransparent = getColor(R.color.transparent_statusbar_background)
|
||||||
statusBarColorOpaque = MaterialColors.getColor(this, R.attr.colorPrimaryDark, Color.BLACK)
|
statusBarColorOpaque = MaterialColors.getColor(this, androidx.appcompat.R.attr.colorPrimaryDark, Color.BLACK)
|
||||||
avatarSize = resources.getDimension(R.dimen.account_activity_avatar_size)
|
avatarSize = resources.getDimension(R.dimen.account_activity_avatar_size)
|
||||||
titleVisibleHeight = resources.getDimensionPixelSize(R.dimen.account_activity_scroll_title_visible_height)
|
titleVisibleHeight = resources.getDimensionPixelSize(R.dimen.account_activity_scroll_title_visible_height)
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ class AccountMediaGridAdapter(
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
|
||||||
private val baseItemBackgroundColor = MaterialColors.getColor(context, R.attr.colorSurface, Color.BLACK)
|
private val baseItemBackgroundColor = MaterialColors.getColor(context, com.google.android.material.R.attr.colorSurface, Color.BLACK)
|
||||||
private val videoIndicator = AppCompatResources.getDrawable(context, R.drawable.ic_play_indicator)
|
private val videoIndicator = AppCompatResources.getDrawable(context, R.drawable.ic_play_indicator)
|
||||||
private val mediaHiddenDrawable = AppCompatResources.getDrawable(context, R.drawable.ic_hide_media_24dp)
|
private val mediaHiddenDrawable = AppCompatResources.getDrawable(context, R.drawable.ic_hide_media_24dp)
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import com.keylesspalace.tusky.network.MastodonApi
|
||||||
import com.keylesspalace.tusky.viewdata.AttachmentViewData
|
import com.keylesspalace.tusky.viewdata.AttachmentViewData
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class AccountMediaViewModel @Inject constructor (
|
class AccountMediaViewModel @Inject constructor(
|
||||||
api: MastodonApi
|
api: MastodonApi
|
||||||
) : ViewModel() {
|
) : ViewModel() {
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ class AnnouncementAdapter(
|
||||||
item.reactions.forEachIndexed { i, reaction ->
|
item.reactions.forEachIndexed { i, reaction ->
|
||||||
(
|
(
|
||||||
chips.getChildAt(i)?.takeUnless { it.id == R.id.addReactionChip } as Chip?
|
chips.getChildAt(i)?.takeUnless { it.id == R.id.addReactionChip } as Chip?
|
||||||
?: Chip(ContextThemeWrapper(chips.context, R.style.Widget_MaterialComponents_Chip_Choice)).apply {
|
?: Chip(ContextThemeWrapper(chips.context, com.google.android.material.R.style.Widget_MaterialComponents_Chip_Choice)).apply {
|
||||||
isCheckable = true
|
isCheckable = true
|
||||||
checkedIcon = null
|
checkedIcon = null
|
||||||
chips.addView(this, i)
|
chips.addView(this, i)
|
||||||
|
|
|
@ -569,7 +569,7 @@ class ComposeActivity :
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupAvatar(activeAccount: AccountEntity) {
|
private fun setupAvatar(activeAccount: AccountEntity) {
|
||||||
val actionBarSizeAttr = intArrayOf(R.attr.actionBarSize)
|
val actionBarSizeAttr = intArrayOf(androidx.appcompat.R.attr.actionBarSize)
|
||||||
val a = obtainStyledAttributes(null, actionBarSizeAttr)
|
val a = obtainStyledAttributes(null, actionBarSizeAttr)
|
||||||
val avatarSize = a.getDimensionPixelSize(0, 1)
|
val avatarSize = a.getDimensionPixelSize(0, 1)
|
||||||
a.recycle()
|
a.recycle()
|
||||||
|
|
|
@ -63,7 +63,7 @@ fun showAddPollDialog(
|
||||||
var durations = context.resources.getIntArray(R.array.poll_duration_values).toList()
|
var durations = context.resources.getIntArray(R.array.poll_duration_values).toList()
|
||||||
val durationLabels = context.resources.getStringArray(R.array.poll_duration_names).filterIndexed { index, _ -> durations[index] in minDuration..maxDuration }
|
val durationLabels = context.resources.getStringArray(R.array.poll_duration_names).filterIndexed { index, _ -> durations[index] in minDuration..maxDuration }
|
||||||
binding.pollDurationSpinner.adapter = ArrayAdapter(context, android.R.layout.simple_spinner_item, durationLabels).apply {
|
binding.pollDurationSpinner.adapter = ArrayAdapter(context, android.R.layout.simple_spinner_item, durationLabels).apply {
|
||||||
setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item)
|
setDropDownViewResource(androidx.appcompat.R.layout.support_simple_spinner_dropdown_item)
|
||||||
}
|
}
|
||||||
durations = durations.filter { it in minDuration..maxDuration }
|
durations = durations.filter { it in minDuration..maxDuration }
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.keylesspalace.tusky.entity.HashTag
|
||||||
import com.keylesspalace.tusky.network.MastodonApi
|
import com.keylesspalace.tusky.network.MastodonApi
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class FollowedTagsViewModel @Inject constructor (
|
class FollowedTagsViewModel @Inject constructor(
|
||||||
api: MastodonApi
|
api: MastodonApi
|
||||||
) : ViewModel(), Injectable {
|
) : ViewModel(), Injectable {
|
||||||
val tags: MutableList<HashTag> = mutableListOf()
|
val tags: MutableList<HashTag> = mutableListOf()
|
||||||
|
|
|
@ -36,7 +36,7 @@ import javax.inject.Singleton
|
||||||
|
|
||||||
@ProvidedTypeConverter
|
@ProvidedTypeConverter
|
||||||
@Singleton
|
@Singleton
|
||||||
class Converters @Inject constructor (
|
class Converters @Inject constructor(
|
||||||
private val gson: Gson
|
private val gson: Gson
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,7 @@ private fun openLinkInBrowser(uri: Uri?, context: Context) {
|
||||||
* @param context context
|
* @param context context
|
||||||
*/
|
*/
|
||||||
fun openLinkInCustomTab(uri: Uri, context: Context) {
|
fun openLinkInCustomTab(uri: Uri, context: Context) {
|
||||||
val toolbarColor = MaterialColors.getColor(context, R.attr.colorSurface, Color.BLACK)
|
val toolbarColor = MaterialColors.getColor(context, com.google.android.material.R.attr.colorSurface, Color.BLACK)
|
||||||
val navigationbarColor = MaterialColors.getColor(context, android.R.attr.navigationBarColor, Color.BLACK)
|
val navigationbarColor = MaterialColors.getColor(context, android.R.attr.navigationBarColor, Color.BLACK)
|
||||||
val navigationbarDividerColor = MaterialColors.getColor(context, R.attr.dividerColor, Color.BLACK)
|
val navigationbarDividerColor = MaterialColors.getColor(context, R.attr.dividerColor, Color.BLACK)
|
||||||
val colorSchemeParams = CustomTabColorSchemeParams.Builder()
|
val colorSchemeParams = CustomTabColorSchemeParams.Builder()
|
||||||
|
|
|
@ -36,7 +36,7 @@ class LicenseCard
|
||||||
init {
|
init {
|
||||||
val binding = CardLicenseBinding.inflate(LayoutInflater.from(context), this)
|
val binding = CardLicenseBinding.inflate(LayoutInflater.from(context), this)
|
||||||
|
|
||||||
setCardBackgroundColor(MaterialColors.getColor(context, R.attr.colorSurface, Color.BLACK))
|
setCardBackgroundColor(MaterialColors.getColor(context, com.google.android.material.R.attr.colorSurface, Color.BLACK))
|
||||||
|
|
||||||
val a = context.theme.obtainStyledAttributes(attrs, R.styleable.LicenseCard, 0, 0)
|
val a = context.theme.obtainStyledAttributes(attrs, R.styleable.LicenseCard, 0, 0)
|
||||||
|
|
||||||
|
|
26
build.gradle
26
build.gradle
|
@ -1,25 +1,15 @@
|
||||||
buildscript {
|
plugins {
|
||||||
repositories {
|
alias(libs.plugins.android.application) apply false
|
||||||
google()
|
alias(libs.plugins.kotlin.android) apply false
|
||||||
mavenCentral()
|
alias(libs.plugins.kotlin.kapt) apply false
|
||||||
gradlePluginPortal()
|
alias(libs.plugins.kotlin.parcelize) apply false
|
||||||
}
|
alias(libs.plugins.ktlint) apply false
|
||||||
dependencies {
|
|
||||||
classpath libs.android.gradle.plugin
|
|
||||||
classpath libs.kotlin.gradle.plugin
|
|
||||||
classpath libs.ktlint.gradle
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: "org.jlleitschuh.gradle.ktlint"
|
apply plugin: libs.plugins.ktlint.get().pluginId
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
maven { url "https://jitpack.io" }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register('clean') {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
# Project-wide Gradle settings.
|
org.gradle.caching=true
|
||||||
|
org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
|
||||||
# IDE (e.g. Android Studio) users:
|
|
||||||
# Gradle settings configured through the IDE *will override*
|
|
||||||
# any settings specified in this file.
|
|
||||||
|
|
||||||
# For more details on how to configure your build environment visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
||||||
|
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx4096m
|
|
||||||
|
|
||||||
# use parallel execution
|
# use parallel execution
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
# https://docs.gradle.org/7.6/userguide/configuration_cache.html
|
||||||
|
org.gradle.unsafe.configuration-cache=true
|
||||||
|
|
||||||
|
# https://blog.jetbrains.com/kotlin/2022/07/a-new-approach-to-incremental-compilation-in-kotlin/
|
||||||
|
kotlin.incremental.useClasspathSnapshot=true
|
||||||
|
|
||||||
|
# Disable buildFeatures flags by default
|
||||||
|
android.defaults.buildfeatures.aidl=false
|
||||||
|
android.defaults.buildfeatures.buildconfig=false
|
||||||
|
android.defaults.buildfeatures.renderscript=false
|
||||||
|
android.defaults.buildfeatures.resvalues=false
|
||||||
|
android.defaults.buildfeatures.shaders=false
|
||||||
android.enableR8.fullMode=true
|
android.enableR8.fullMode=true
|
||||||
|
android.nonTransitiveRClass=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[versions]
|
[versions]
|
||||||
agp = "7.3.1"
|
agp = "7.4.0"
|
||||||
androidx-activity = "1.6.0"
|
androidx-activity = "1.6.0"
|
||||||
androidx-appcompat = "1.6.0-rc01"
|
androidx-appcompat = "1.6.0-rc01"
|
||||||
androidx-browser = "1.4.0"
|
androidx-browser = "1.4.0"
|
||||||
|
@ -30,7 +30,6 @@ glide = "4.13.2"
|
||||||
glide-animation-plugin = "2.23.0"
|
glide-animation-plugin = "2.23.0"
|
||||||
gson = "2.9.0"
|
gson = "2.9.0"
|
||||||
kotlin = "1.7.10"
|
kotlin = "1.7.10"
|
||||||
ktlint = "10.2.1"
|
|
||||||
image-cropper = "4.3.1"
|
image-cropper = "4.3.1"
|
||||||
lifecycle = "2.5.1"
|
lifecycle = "2.5.1"
|
||||||
material = "1.6.1"
|
material = "1.6.1"
|
||||||
|
@ -50,8 +49,14 @@ photoview = "2.3.0"
|
||||||
sparkbutton = "4.1.0"
|
sparkbutton = "4.1.0"
|
||||||
unified-push = "2.0.1"
|
unified-push = "2.0.1"
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||||
|
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
|
||||||
|
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
|
||||||
|
ktlint = "org.jlleitschuh.gradle.ktlint:11.0.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "agp" }
|
|
||||||
android-material = { module = "com.google.android.material:material", version.ref = "material" }
|
android-material = { module = "com.google.android.material:material", version.ref = "material" }
|
||||||
androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity" }
|
androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity" }
|
||||||
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
|
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
|
||||||
|
@ -105,7 +110,6 @@ kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", v
|
||||||
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
|
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
|
||||||
kotlinx-coroutines-rx3 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-rx3", version.ref = "coroutines" }
|
kotlinx-coroutines-rx3 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-rx3", version.ref = "coroutines" }
|
||||||
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
|
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
|
||||||
ktlint-gradle = { module = "org.jlleitschuh.gradle:ktlint-gradle", version.ref = "ktlint" }
|
|
||||||
image-cropper = { module = "com.github.CanHub:Android-Image-Cropper", version.ref = "image-cropper" }
|
image-cropper = { module = "com.github.CanHub:Android-Image-Cropper", version.ref = "image-cropper" }
|
||||||
material-drawer-core = { module = "com.mikepenz:materialdrawer", version.ref = "material-drawer" }
|
material-drawer-core = { module = "com.mikepenz:materialdrawer", version.ref = "material-drawer" }
|
||||||
material-drawer-iconics = { module = "com.mikepenz:materialdrawer-iconics", version.ref = "material-drawer" }
|
material-drawer-iconics = { module = "com.mikepenz:materialdrawer-iconics", version.ref = "material-drawer" }
|
||||||
|
@ -145,5 +149,3 @@ okhttp = ["okhttp-core", "okhttp-logging-interceptor"]
|
||||||
retrofit = ["retrofit-core", "retrofit-converter-gson", "retrofit-adapter-rxjava3"]
|
retrofit = ["retrofit-core", "retrofit-converter-gson", "retrofit-adapter-rxjava3"]
|
||||||
room = ["androidx-room-ktx", "androidx-room-paging"]
|
room = ["androidx-room-ktx", "androidx-room-paging"]
|
||||||
rxjava3 = ["rxjava3-core", "rxjava3-android", "rxjava3-kotlin"]
|
rxjava3 = ["rxjava3-core", "rxjava3-android", "rxjava3-kotlin"]
|
||||||
|
|
||||||
[plugins]
|
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
12
gradlew
vendored
12
gradlew
vendored
|
@ -55,7 +55,7 @@
|
||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
@ -80,10 +80,10 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
APP_NAME="Gradle"
|
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
@ -143,12 +143,16 @@ fi
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
|
|
1
gradlew.bat
vendored
1
gradlew.bat
vendored
|
@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
/**
|
|
||||||
Edit this file to create a Tusky build that is customized for your Fediverse instance.
|
|
||||||
Note: Publishing a custom build on Google Play may violate the Google Play developer policy (Repetitive Content)
|
|
||||||
*/
|
|
||||||
|
|
||||||
// The app name
|
|
||||||
ext.APP_NAME = "Tusky"
|
|
||||||
|
|
||||||
// The application id. Must be unique, e.g. based on your domain
|
|
||||||
ext.APP_ID = "com.keylesspalace.tusky"
|
|
||||||
|
|
||||||
// url of a custom app logo. Recommended size at least 600x600. Keep empty to use the Tusky elephant friend.
|
|
||||||
ext.CUSTOM_LOGO_URL = ""
|
|
||||||
|
|
||||||
// e.g. mastodon.social. Keep empty to not suggest any instance on the signup screen
|
|
||||||
ext.CUSTOM_INSTANCE = ""
|
|
||||||
|
|
||||||
// link to your support account. Will be linked on the about page when not empty.
|
|
||||||
ext.SUPPORT_ACCOUNT_URL = "https://mastodon.social/@Tusky"
|
|
|
@ -1 +1,19 @@
|
||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencyResolutionManagement {
|
||||||
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
|
||||||
|
|
||||||
include ':app'
|
include ':app'
|
||||||
|
|
Loading…
Reference in a new issue