Merge pull request #2967 from naveensingh/setup_composite_build

Include simple-commons locally using composite build
This commit is contained in:
Tibor Kaputa 2023-09-07 10:10:58 +02:00 committed by GitHub
commit 7d8de9e96f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 13 deletions

View File

@ -22,7 +22,7 @@ class ChangeSortingDialog(
init {
currSorting = if (isDirectorySorting) config.directorySorting else config.getFolderSorting(pathToUse)
binding = DialogChangeSortingBinding.inflate(activity.layoutInflater).apply {
useForThisFolderDivider.beVisibleIf(showFolderCheckbox || (currSorting and SORT_BY_NAME != 0 || currSorting and SORT_BY_PATH != 0))
sortingDialogOrderDivider.beVisibleIf(showFolderCheckbox || (currSorting and SORT_BY_NAME != 0 || currSorting and SORT_BY_PATH != 0))
sortingDialogNumericSorting.beVisibleIf(showFolderCheckbox && (currSorting and SORT_BY_NAME != 0 || currSorting and SORT_BY_PATH != 0))
sortingDialogNumericSorting.isChecked = currSorting and SORT_USE_NUMERIC_VALUE != 0
@ -46,14 +46,14 @@ class ChangeSortingDialog(
private fun setupSortRadio() {
val sortingRadio = binding.sortingDialogRadioSorting
sortingRadio.setOnCheckedChangeListener { group, checkedId ->
sortingRadio.setOnCheckedChangeListener { _, checkedId ->
val isSortingByNameOrPath = checkedId == binding.sortingDialogRadioName.id || checkedId == binding.sortingDialogRadioPath.id
binding.sortingDialogNumericSorting.beVisibleIf(isSortingByNameOrPath)
binding.useForThisFolderDivider.beVisibleIf(binding.sortingDialogNumericSorting.isVisible() || binding.sortingDialogUseForThisFolder.isVisible())
binding.sortingDialogOrderDivider.beVisibleIf(binding.sortingDialogNumericSorting.isVisible() || binding.sortingDialogUseForThisFolder.isVisible())
val hideSortOrder = checkedId == binding.sortingDialogRadioCustom.id || checkedId == binding.sortingDialogRadioRandom.id
binding.sortingDialogRadioOrder.beGoneIf(hideSortOrder)
binding.sortingDialogOrderDivider.beGoneIf(hideSortOrder)
binding.sortingDialogSortingDivider.beGoneIf(hideSortOrder)
}
val sortBtn = when {

View File

@ -63,9 +63,12 @@
</RadioGroup>
<include
android:id="@+id/sorting_dialog_order_divider"
layout="@layout/divider" />
<ImageView
android:id="@+id/sorting_dialog_sorting_divider"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="@color/divider_grey"
android:importantForAccessibility="no" />
<RadioGroup
android:id="@+id/sorting_dialog_radio_order"
@ -87,9 +90,12 @@
android:text="@string/descending" />
</RadioGroup>
<include
android:id="@+id/use_for_this_folder_divider"
layout="@layout/divider" />
<ImageView
android:id="@+id/sorting_dialog_order_divider"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="@color/divider_grey"
android:importantForAccessibility="no" />
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
android:id="@+id/sorting_dialog_numeric_sorting"

View File

@ -1,4 +1,4 @@
android.enableJetifier=true
android.nonTransitiveRClass=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx8192m

View File

@ -13,9 +13,9 @@ exif = "1.0.1"
#Room
room = "2.6.0-beta01"
#Simple tools
simple-commons = "7c1e5b5777"
simple-commons = "73d78e5cd3"
#Gradle
gradlePlugins-agp = "8.1.0"
gradlePlugins-agp = "8.1.1"
#Other
androidGifDrawable = "1.2.25"
androidImageCropper = "4.5.0"

View File

@ -17,4 +17,14 @@ dependencyResolutionManagement {
maven(url = "https://artifactory.img.ly/artifactory/imgly")
}
}
rootProject.name = "Simple-Gallery"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
include(":app")
// TODO: This will be deprecated in future. Migrate to the newer `pluginManagement { includeBuild() }` mechanism instead of explicitly substituting dependency.
/*includeBuild("../Simple-Commons") {
dependencySubstitution {
substitute(module("com.github.SimpleMobileTools:Simple-Commons")).using(project(":commons"))
}
}*/