From 45a113823bff6116ae6cec95872342826b3a2e54 Mon Sep 17 00:00:00 2001 From: Philip Cohn-Cort Date: Fri, 19 Oct 2018 17:01:51 -0400 Subject: [PATCH 1/7] [Gradle] - Create a new `:content_listing` module This is intended for use primarily by the `All` fragments. --- content_listing/.gitignore | 1 + content_listing/build.gradle | 21 ++++++++++++++++++++ content_listing/proguard-rules.pro | 21 ++++++++++++++++++++ content_listing/src/main/AndroidManifest.xml | 2 ++ settings.gradle | 3 ++- 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 content_listing/.gitignore create mode 100644 content_listing/build.gradle create mode 100644 content_listing/proguard-rules.pro create mode 100644 content_listing/src/main/AndroidManifest.xml diff --git a/content_listing/.gitignore b/content_listing/.gitignore new file mode 100644 index 000000000..796b96d1c --- /dev/null +++ b/content_listing/.gitignore @@ -0,0 +1 @@ +/build diff --git a/content_listing/build.gradle b/content_listing/build.gradle new file mode 100644 index 000000000..cc9152538 --- /dev/null +++ b/content_listing/build.gradle @@ -0,0 +1,21 @@ +apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-kapt' + +dependencies { + kapt libs.dagger_compiler + kapt libs.dagger_android_compiler + kapt libs.glide_compiler + + api libs.design_support + implementation libs.glide + implementation libs.threeten + implementation project(':base') + implementation libs.constraint_layout + implementation project(':ui') + implementation project(':db') + implementation project(':viewmodel') + implementation project(':base') + implementation project(':adapter') + implementation project(':image') + implementation project(':details') +} diff --git a/content_listing/proguard-rules.pro b/content_listing/proguard-rules.pro new file mode 100644 index 000000000..f1b424510 --- /dev/null +++ b/content_listing/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/content_listing/src/main/AndroidManifest.xml b/content_listing/src/main/AndroidManifest.xml new file mode 100644 index 000000000..1bfb75be4 --- /dev/null +++ b/content_listing/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 3da975646..b851bc479 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,10 +1,10 @@ include ':adapter', - ':membership', ':access_card', ':analytics', ':app', ':audio', ':base', + ':content_listing', ':db', ':details', ':events', @@ -18,6 +18,7 @@ include ':adapter', ':map', ':media', ':media_ui', + ':membership', ':navigation', ':search', ':splash', From b764b2c68986f2653ad07529a9b1893394de2f5c Mon Sep 17 00:00:00 2001 From: Philip Cohn-Cort Date: Fri, 19 Oct 2018 17:04:25 -0400 Subject: [PATCH 2/7] [Layout] - Create common layout for the `All` fragments --- .../src/main/res/layout/fragment_view_all.xml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 content_listing/src/main/res/layout/fragment_view_all.xml diff --git a/content_listing/src/main/res/layout/fragment_view_all.xml b/content_listing/src/main/res/layout/fragment_view_all.xml new file mode 100644 index 000000000..1862e6227 --- /dev/null +++ b/content_listing/src/main/res/layout/fragment_view_all.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + \ No newline at end of file From cfed0a526514bcd6b2b134103fc2d5a6f9b50a16 Mon Sep 17 00:00:00 2001 From: Philip Cohn-Cort Date: Fri, 19 Oct 2018 17:06:37 -0400 Subject: [PATCH 3/7] [Refactor] - Delete 3 now-obsolete menu resource files --- events/src/main/res/menu/menu_all_events.xml | 10 ---------- exhibitions/src/main/res/menu/menu_all_exhibitions.xml | 10 ---------- tours/src/main/res/menu/menu_all_tours.xml | 10 ---------- 3 files changed, 30 deletions(-) delete mode 100644 events/src/main/res/menu/menu_all_events.xml delete mode 100644 exhibitions/src/main/res/menu/menu_all_exhibitions.xml delete mode 100644 tours/src/main/res/menu/menu_all_tours.xml diff --git a/events/src/main/res/menu/menu_all_events.xml b/events/src/main/res/menu/menu_all_events.xml deleted file mode 100644 index e3c99d270..000000000 --- a/events/src/main/res/menu/menu_all_events.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - \ No newline at end of file diff --git a/exhibitions/src/main/res/menu/menu_all_exhibitions.xml b/exhibitions/src/main/res/menu/menu_all_exhibitions.xml deleted file mode 100644 index 593acd764..000000000 --- a/exhibitions/src/main/res/menu/menu_all_exhibitions.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - \ No newline at end of file diff --git a/tours/src/main/res/menu/menu_all_tours.xml b/tours/src/main/res/menu/menu_all_tours.xml deleted file mode 100644 index 593acd764..000000000 --- a/tours/src/main/res/menu/menu_all_tours.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - \ No newline at end of file From 56c656c6ac13bfdd359359384df060d0766cbd17 Mon Sep 17 00:00:00 2001 From: Philip Cohn-Cort Date: Fri, 19 Oct 2018 17:27:19 -0400 Subject: [PATCH 4/7] [Gradle] - Refactor: move content of `:tours` module to `:content_listing` --- app/build.gradle | 2 +- .../kotlin/edu/artic/tours/AllToursAdapter.kt | 1 + .../edu/artic/tours/AllToursFragment.kt | 1 + .../edu/artic/tours/AllToursViewModel.kt | 0 .../kotlin/edu/artic/tours/ToursModule.kt | 0 .../recyclerview/AllToursItemDecoration.kt | 2 +- .../tour_detail_tour_stop_divider.xml | 0 .../main/res/layout/cell_all_tours_intro.xml | 0 .../main/res/layout/cell_all_tours_layout.xml | 0 .../main/res/layout/fragment_all_tours.xml | 0 .../navigation/all_tours_navigation_graph.xml | 0 .../tour_details_navigation_graph.xml | 0 .../src/main/res/values/dimens.xml | 8 ++++++ settings.gradle | 1 - tours/.gitignore | 1 - tours/build.gradle | 27 ------------------- tours/proguard-rules.pro | 21 --------------- tours/src/main/AndroidManifest.xml | 2 -- tours/src/main/res/values/dimens.xml | 5 ---- welcome/build.gradle | 2 +- 20 files changed, 13 insertions(+), 60 deletions(-) rename {tours => content_listing}/src/main/kotlin/edu/artic/tours/AllToursAdapter.kt (98%) rename {tours => content_listing}/src/main/kotlin/edu/artic/tours/AllToursFragment.kt (99%) rename {tours => content_listing}/src/main/kotlin/edu/artic/tours/AllToursViewModel.kt (100%) rename {tours => content_listing}/src/main/kotlin/edu/artic/tours/ToursModule.kt (100%) rename {tours => content_listing}/src/main/kotlin/edu/artic/tours/recyclerview/AllToursItemDecoration.kt (98%) rename {tours => content_listing}/src/main/res/drawable/tour_detail_tour_stop_divider.xml (100%) rename {tours => content_listing}/src/main/res/layout/cell_all_tours_intro.xml (100%) rename {tours => content_listing}/src/main/res/layout/cell_all_tours_layout.xml (100%) rename {tours => content_listing}/src/main/res/layout/fragment_all_tours.xml (100%) rename {tours => content_listing}/src/main/res/navigation/all_tours_navigation_graph.xml (100%) rename {tours => content_listing}/src/main/res/navigation/tour_details_navigation_graph.xml (100%) create mode 100644 content_listing/src/main/res/values/dimens.xml delete mode 100644 tours/.gitignore delete mode 100644 tours/build.gradle delete mode 100644 tours/proguard-rules.pro delete mode 100644 tours/src/main/AndroidManifest.xml delete mode 100644 tours/src/main/res/values/dimens.xml diff --git a/app/build.gradle b/app/build.gradle index 774d0db25..affee5b8a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -73,7 +73,7 @@ dependencies { implementation project(':base') implementation project(':splash') implementation project(':welcome') - implementation project(':tours') + implementation project(':content_listing') implementation project(':tour_manager') implementation project(':info') implementation project(':audio') diff --git a/tours/src/main/kotlin/edu/artic/tours/AllToursAdapter.kt b/content_listing/src/main/kotlin/edu/artic/tours/AllToursAdapter.kt similarity index 98% rename from tours/src/main/kotlin/edu/artic/tours/AllToursAdapter.kt rename to content_listing/src/main/kotlin/edu/artic/tours/AllToursAdapter.kt index 70a8a6411..018ec3e8f 100644 --- a/tours/src/main/kotlin/edu/artic/tours/AllToursAdapter.kt +++ b/content_listing/src/main/kotlin/edu/artic/tours/AllToursAdapter.kt @@ -8,6 +8,7 @@ import com.fuzz.rx.disposedBy import com.jakewharton.rxbinding2.widget.text import edu.artic.adapter.AutoHolderRecyclerViewAdapter import edu.artic.adapter.BaseViewHolder +import edu.artic.content.listing.R import io.reactivex.subjects.Subject import edu.artic.image.GlideApp import kotlinx.android.synthetic.main.cell_all_tours_intro.view.* diff --git a/tours/src/main/kotlin/edu/artic/tours/AllToursFragment.kt b/content_listing/src/main/kotlin/edu/artic/tours/AllToursFragment.kt similarity index 99% rename from tours/src/main/kotlin/edu/artic/tours/AllToursFragment.kt rename to content_listing/src/main/kotlin/edu/artic/tours/AllToursFragment.kt index 11e0af19d..45468f460 100644 --- a/tours/src/main/kotlin/edu/artic/tours/AllToursFragment.kt +++ b/content_listing/src/main/kotlin/edu/artic/tours/AllToursFragment.kt @@ -13,6 +13,7 @@ import edu.artic.adapter.itemChanges import edu.artic.adapter.itemClicksWithPosition import edu.artic.analytics.ScreenName import edu.artic.base.utils.asDeepLinkIntent +import edu.artic.content.listing.R import edu.artic.navigation.NavigationConstants import edu.artic.tours.recyclerview.AllToursItemDecoration import edu.artic.viewmodel.BaseViewModelFragment diff --git a/tours/src/main/kotlin/edu/artic/tours/AllToursViewModel.kt b/content_listing/src/main/kotlin/edu/artic/tours/AllToursViewModel.kt similarity index 100% rename from tours/src/main/kotlin/edu/artic/tours/AllToursViewModel.kt rename to content_listing/src/main/kotlin/edu/artic/tours/AllToursViewModel.kt diff --git a/tours/src/main/kotlin/edu/artic/tours/ToursModule.kt b/content_listing/src/main/kotlin/edu/artic/tours/ToursModule.kt similarity index 100% rename from tours/src/main/kotlin/edu/artic/tours/ToursModule.kt rename to content_listing/src/main/kotlin/edu/artic/tours/ToursModule.kt diff --git a/tours/src/main/kotlin/edu/artic/tours/recyclerview/AllToursItemDecoration.kt b/content_listing/src/main/kotlin/edu/artic/tours/recyclerview/AllToursItemDecoration.kt similarity index 98% rename from tours/src/main/kotlin/edu/artic/tours/recyclerview/AllToursItemDecoration.kt rename to content_listing/src/main/kotlin/edu/artic/tours/recyclerview/AllToursItemDecoration.kt index dc6e1d191..435b1d588 100644 --- a/tours/src/main/kotlin/edu/artic/tours/recyclerview/AllToursItemDecoration.kt +++ b/content_listing/src/main/kotlin/edu/artic/tours/recyclerview/AllToursItemDecoration.kt @@ -4,7 +4,7 @@ import android.content.Context import android.graphics.Rect import android.support.v7.widget.RecyclerView import android.view.View -import edu.artic.tours.R +import edu.artic.content.listing.R class AllToursItemDecoration( context: Context, diff --git a/tours/src/main/res/drawable/tour_detail_tour_stop_divider.xml b/content_listing/src/main/res/drawable/tour_detail_tour_stop_divider.xml similarity index 100% rename from tours/src/main/res/drawable/tour_detail_tour_stop_divider.xml rename to content_listing/src/main/res/drawable/tour_detail_tour_stop_divider.xml diff --git a/tours/src/main/res/layout/cell_all_tours_intro.xml b/content_listing/src/main/res/layout/cell_all_tours_intro.xml similarity index 100% rename from tours/src/main/res/layout/cell_all_tours_intro.xml rename to content_listing/src/main/res/layout/cell_all_tours_intro.xml diff --git a/tours/src/main/res/layout/cell_all_tours_layout.xml b/content_listing/src/main/res/layout/cell_all_tours_layout.xml similarity index 100% rename from tours/src/main/res/layout/cell_all_tours_layout.xml rename to content_listing/src/main/res/layout/cell_all_tours_layout.xml diff --git a/tours/src/main/res/layout/fragment_all_tours.xml b/content_listing/src/main/res/layout/fragment_all_tours.xml similarity index 100% rename from tours/src/main/res/layout/fragment_all_tours.xml rename to content_listing/src/main/res/layout/fragment_all_tours.xml diff --git a/tours/src/main/res/navigation/all_tours_navigation_graph.xml b/content_listing/src/main/res/navigation/all_tours_navigation_graph.xml similarity index 100% rename from tours/src/main/res/navigation/all_tours_navigation_graph.xml rename to content_listing/src/main/res/navigation/all_tours_navigation_graph.xml diff --git a/tours/src/main/res/navigation/tour_details_navigation_graph.xml b/content_listing/src/main/res/navigation/tour_details_navigation_graph.xml similarity index 100% rename from tours/src/main/res/navigation/tour_details_navigation_graph.xml rename to content_listing/src/main/res/navigation/tour_details_navigation_graph.xml diff --git a/content_listing/src/main/res/values/dimens.xml b/content_listing/src/main/res/values/dimens.xml new file mode 100644 index 000000000..7b262189b --- /dev/null +++ b/content_listing/src/main/res/values/dimens.xml @@ -0,0 +1,8 @@ + + + + 23dp + @dimen/marginDouble + 16dp + + \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index b851bc479..3712044a1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -22,7 +22,6 @@ include ':adapter', ':navigation', ':search', ':splash', - ':tours', ':tour_manager', ':ui', ':viewmodel', diff --git a/tours/.gitignore b/tours/.gitignore deleted file mode 100644 index 796b96d1c..000000000 --- a/tours/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/tours/build.gradle b/tours/build.gradle deleted file mode 100644 index 741ecded8..000000000 --- a/tours/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -apply plugin: 'kotlin-android-extensions' -apply plugin: 'kotlin-kapt' - -dependencies { - kapt libs.dagger_compiler - kapt libs.dagger_android_compiler - kapt libs.glide_compiler - - api libs.design_support - implementation libs.glide - implementation libs.arch_navigation - implementation libs.arch_navigation_ui - implementation project(':base') - implementation libs.constraint_layout - implementation project(':ui') - implementation project(':db') - implementation project(':viewmodel') - implementation project(':base') - implementation project(':adapter') - implementation project(':media') - implementation project(':media_ui') - implementation project(':map') - implementation project(':navigation') - implementation project(':image') - implementation project(':localization') - implementation project(':details') -} diff --git a/tours/proguard-rules.pro b/tours/proguard-rules.pro deleted file mode 100644 index f1b424510..000000000 --- a/tours/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/tours/src/main/AndroidManifest.xml b/tours/src/main/AndroidManifest.xml deleted file mode 100644 index 8279d9146..000000000 --- a/tours/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/tours/src/main/res/values/dimens.xml b/tours/src/main/res/values/dimens.xml deleted file mode 100644 index bcf09a268..000000000 --- a/tours/src/main/res/values/dimens.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 23dp - 16dp - \ No newline at end of file diff --git a/welcome/build.gradle b/welcome/build.gradle index 0dffa24f7..626d992df 100644 --- a/welcome/build.gradle +++ b/welcome/build.gradle @@ -15,7 +15,7 @@ dependencies { implementation project(':base') implementation project(':media_ui') implementation project(':adapter') - implementation project(':tours') + implementation project(':content_listing') implementation project(':exhibitions') implementation project(':events') implementation project(':navigation') From f68c525a0a4cac08bf27747977923d6ba8fde30c Mon Sep 17 00:00:00 2001 From: Philip Cohn-Cort Date: Fri, 19 Oct 2018 17:50:02 -0400 Subject: [PATCH 5/7] [Gradle] - Refactor: move content of `:exhibitions` module to `:content_listing` --- app/build.gradle | 1 - .../exhibitions/AllExhibitionsAdapter.kt | 1 + .../exhibitions/AllExhibitionsFragment.kt | 1 + .../exhibitions/AllExhibitionsViewModel.kt | 0 .../artic/exhibitions/ExhibitionsModule.kt | 0 .../recyclerview/AllToursItemDecoration.kt | 2 +- .../layout/cell_all_exhibitions_layout.xml | 0 .../res/layout/fragment_all_exhibitions.xml | 0 .../exhibition_details_navigation_graph.xml | 0 .../exhibition_navigation_graph.xml | 0 .../src/main/res/values/dimens.xml | 3 +++ exhibitions/.gitignore | 1 - exhibitions/build.gradle | 21 ------------------- exhibitions/proguard-rules.pro | 21 ------------------- exhibitions/src/main/AndroidManifest.xml | 2 -- exhibitions/src/main/res/values/dimens.xml | 5 ----- settings.gradle | 1 - welcome/build.gradle | 1 - 18 files changed, 6 insertions(+), 54 deletions(-) rename {exhibitions => content_listing}/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsAdapter.kt (97%) rename {exhibitions => content_listing}/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt (99%) rename {exhibitions => content_listing}/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsViewModel.kt (100%) rename {exhibitions => content_listing}/src/main/kotlin/edu/artic/exhibitions/ExhibitionsModule.kt (100%) rename {exhibitions => content_listing}/src/main/kotlin/edu/artic/exhibitions/recyclerview/AllToursItemDecoration.kt (98%) rename {exhibitions => content_listing}/src/main/res/layout/cell_all_exhibitions_layout.xml (100%) rename {exhibitions => content_listing}/src/main/res/layout/fragment_all_exhibitions.xml (100%) rename {exhibitions => content_listing}/src/main/res/navigation/exhibition_details_navigation_graph.xml (100%) rename {exhibitions => content_listing}/src/main/res/navigation/exhibition_navigation_graph.xml (100%) delete mode 100644 exhibitions/.gitignore delete mode 100644 exhibitions/build.gradle delete mode 100644 exhibitions/proguard-rules.pro delete mode 100644 exhibitions/src/main/AndroidManifest.xml delete mode 100644 exhibitions/src/main/res/values/dimens.xml diff --git a/app/build.gradle b/app/build.gradle index affee5b8a..314935b0d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -78,7 +78,6 @@ dependencies { implementation project(':info') implementation project(':audio') implementation project(':map') - implementation project(':exhibitions') implementation project(':events') implementation project(':analytics') implementation project(':media') diff --git a/exhibitions/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsAdapter.kt b/content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsAdapter.kt similarity index 97% rename from exhibitions/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsAdapter.kt rename to content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsAdapter.kt index e8052d41e..6d0b52a45 100644 --- a/exhibitions/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsAdapter.kt +++ b/content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsAdapter.kt @@ -6,6 +6,7 @@ import com.fuzz.rx.disposedBy import com.jakewharton.rxbinding2.widget.text import edu.artic.adapter.AutoHolderRecyclerViewAdapter import edu.artic.adapter.BaseViewHolder +import edu.artic.content.listing.R import edu.artic.image.GlideApp import kotlinx.android.synthetic.main.cell_all_exhibitions_layout.view.* diff --git a/exhibitions/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt b/content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt similarity index 99% rename from exhibitions/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt rename to content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt index 90e66b262..db056e259 100644 --- a/exhibitions/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt +++ b/content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt @@ -12,6 +12,7 @@ import edu.artic.adapter.itemChanges import edu.artic.adapter.itemClicksWithPosition import edu.artic.analytics.ScreenName import edu.artic.base.utils.asDeepLinkIntent +import edu.artic.content.listing.R import edu.artic.exhibitions.recyclerview.AllExhibitionsItemDecoration import edu.artic.navigation.NavigationConstants import edu.artic.viewmodel.BaseViewModelFragment diff --git a/exhibitions/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsViewModel.kt b/content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsViewModel.kt similarity index 100% rename from exhibitions/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsViewModel.kt rename to content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsViewModel.kt diff --git a/exhibitions/src/main/kotlin/edu/artic/exhibitions/ExhibitionsModule.kt b/content_listing/src/main/kotlin/edu/artic/exhibitions/ExhibitionsModule.kt similarity index 100% rename from exhibitions/src/main/kotlin/edu/artic/exhibitions/ExhibitionsModule.kt rename to content_listing/src/main/kotlin/edu/artic/exhibitions/ExhibitionsModule.kt diff --git a/exhibitions/src/main/kotlin/edu/artic/exhibitions/recyclerview/AllToursItemDecoration.kt b/content_listing/src/main/kotlin/edu/artic/exhibitions/recyclerview/AllToursItemDecoration.kt similarity index 98% rename from exhibitions/src/main/kotlin/edu/artic/exhibitions/recyclerview/AllToursItemDecoration.kt rename to content_listing/src/main/kotlin/edu/artic/exhibitions/recyclerview/AllToursItemDecoration.kt index 7c72e325a..99e843477 100644 --- a/exhibitions/src/main/kotlin/edu/artic/exhibitions/recyclerview/AllToursItemDecoration.kt +++ b/content_listing/src/main/kotlin/edu/artic/exhibitions/recyclerview/AllToursItemDecoration.kt @@ -4,7 +4,7 @@ import android.content.Context import android.graphics.Rect import android.support.v7.widget.RecyclerView import android.view.View -import edu.artic.exhibitions.R +import edu.artic.content.listing.R class AllExhibitionsItemDecoration( context: Context, diff --git a/exhibitions/src/main/res/layout/cell_all_exhibitions_layout.xml b/content_listing/src/main/res/layout/cell_all_exhibitions_layout.xml similarity index 100% rename from exhibitions/src/main/res/layout/cell_all_exhibitions_layout.xml rename to content_listing/src/main/res/layout/cell_all_exhibitions_layout.xml diff --git a/exhibitions/src/main/res/layout/fragment_all_exhibitions.xml b/content_listing/src/main/res/layout/fragment_all_exhibitions.xml similarity index 100% rename from exhibitions/src/main/res/layout/fragment_all_exhibitions.xml rename to content_listing/src/main/res/layout/fragment_all_exhibitions.xml diff --git a/exhibitions/src/main/res/navigation/exhibition_details_navigation_graph.xml b/content_listing/src/main/res/navigation/exhibition_details_navigation_graph.xml similarity index 100% rename from exhibitions/src/main/res/navigation/exhibition_details_navigation_graph.xml rename to content_listing/src/main/res/navigation/exhibition_details_navigation_graph.xml diff --git a/exhibitions/src/main/res/navigation/exhibition_navigation_graph.xml b/content_listing/src/main/res/navigation/exhibition_navigation_graph.xml similarity index 100% rename from exhibitions/src/main/res/navigation/exhibition_navigation_graph.xml rename to content_listing/src/main/res/navigation/exhibition_navigation_graph.xml diff --git a/content_listing/src/main/res/values/dimens.xml b/content_listing/src/main/res/values/dimens.xml index 7b262189b..43ede1ebe 100644 --- a/content_listing/src/main/res/values/dimens.xml +++ b/content_listing/src/main/res/values/dimens.xml @@ -5,4 +5,7 @@ @dimen/marginDouble 16dp + 18dp + 16dp + \ No newline at end of file diff --git a/exhibitions/.gitignore b/exhibitions/.gitignore deleted file mode 100644 index 796b96d1c..000000000 --- a/exhibitions/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/exhibitions/build.gradle b/exhibitions/build.gradle deleted file mode 100644 index cc9152538..000000000 --- a/exhibitions/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -apply plugin: 'kotlin-android-extensions' -apply plugin: 'kotlin-kapt' - -dependencies { - kapt libs.dagger_compiler - kapt libs.dagger_android_compiler - kapt libs.glide_compiler - - api libs.design_support - implementation libs.glide - implementation libs.threeten - implementation project(':base') - implementation libs.constraint_layout - implementation project(':ui') - implementation project(':db') - implementation project(':viewmodel') - implementation project(':base') - implementation project(':adapter') - implementation project(':image') - implementation project(':details') -} diff --git a/exhibitions/proguard-rules.pro b/exhibitions/proguard-rules.pro deleted file mode 100644 index f1b424510..000000000 --- a/exhibitions/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/exhibitions/src/main/AndroidManifest.xml b/exhibitions/src/main/AndroidManifest.xml deleted file mode 100644 index e1a692e51..000000000 --- a/exhibitions/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/exhibitions/src/main/res/values/dimens.xml b/exhibitions/src/main/res/values/dimens.xml deleted file mode 100644 index 657afdef2..000000000 --- a/exhibitions/src/main/res/values/dimens.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 18dp - 16dp - \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 3712044a1..edc171f3d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -8,7 +8,6 @@ include ':adapter', ':db', ':details', ':events', - ':exhibitions', ':image', ':info', ':localization', diff --git a/welcome/build.gradle b/welcome/build.gradle index 626d992df..3c177273e 100644 --- a/welcome/build.gradle +++ b/welcome/build.gradle @@ -16,7 +16,6 @@ dependencies { implementation project(':media_ui') implementation project(':adapter') implementation project(':content_listing') - implementation project(':exhibitions') implementation project(':events') implementation project(':navigation') implementation project(':media') From d167c4f7e322de4505f3f924fdc04f8fff2cc137 Mon Sep 17 00:00:00 2001 From: Philip Cohn-Cort Date: Fri, 19 Oct 2018 18:03:42 -0400 Subject: [PATCH 6/7] [Gradle] - Refactor: move content of `:events` module to `:content_listing` --- app/build.gradle | 1 - .../edu/artic/events/AllEventsAdapter.kt | 1 + .../edu/artic/events/AllEventsFragment.kt | 1 + .../edu/artic/events/AllEventsViewModel.kt | 0 .../kotlin/edu/artic/events/EventsModule.kt | 0 .../recyclerview/AllEventsItemDecoration.kt | 2 +- .../src/main/res/drawable/shadow.xml | 0 .../res/layout/cell_all_events_layout.xml | 0 .../main/res/layout/fragment_all_events.xml | 0 .../all_events_navigation_graph.xml | 0 .../event_details_navigation_graph.xml | 0 events/.gitignore | 1 - events/build.gradle | 21 ------------------- events/proguard-rules.pro | 21 ------------------- events/src/main/AndroidManifest.xml | 2 -- events/src/main/res/values/dimens.xml | 6 ------ settings.gradle | 1 - welcome/build.gradle | 1 - 18 files changed, 3 insertions(+), 55 deletions(-) rename {events => content_listing}/src/main/kotlin/edu/artic/events/AllEventsAdapter.kt (98%) rename {events => content_listing}/src/main/kotlin/edu/artic/events/AllEventsFragment.kt (99%) rename {events => content_listing}/src/main/kotlin/edu/artic/events/AllEventsViewModel.kt (100%) rename {events => content_listing}/src/main/kotlin/edu/artic/events/EventsModule.kt (100%) rename {events => content_listing}/src/main/kotlin/edu/artic/events/recyclerview/AllEventsItemDecoration.kt (98%) rename {events => content_listing}/src/main/res/drawable/shadow.xml (100%) rename {events => content_listing}/src/main/res/layout/cell_all_events_layout.xml (100%) rename {events => content_listing}/src/main/res/layout/fragment_all_events.xml (100%) rename {events => content_listing}/src/main/res/navigation/all_events_navigation_graph.xml (100%) rename {events => content_listing}/src/main/res/navigation/event_details_navigation_graph.xml (100%) delete mode 100644 events/.gitignore delete mode 100644 events/build.gradle delete mode 100644 events/proguard-rules.pro delete mode 100644 events/src/main/AndroidManifest.xml delete mode 100644 events/src/main/res/values/dimens.xml diff --git a/app/build.gradle b/app/build.gradle index 314935b0d..033b72ba9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -78,7 +78,6 @@ dependencies { implementation project(':info') implementation project(':audio') implementation project(':map') - implementation project(':events') implementation project(':analytics') implementation project(':media') implementation project(':media_ui') diff --git a/events/src/main/kotlin/edu/artic/events/AllEventsAdapter.kt b/content_listing/src/main/kotlin/edu/artic/events/AllEventsAdapter.kt similarity index 98% rename from events/src/main/kotlin/edu/artic/events/AllEventsAdapter.kt rename to content_listing/src/main/kotlin/edu/artic/events/AllEventsAdapter.kt index 4bc217f52..092b858a2 100644 --- a/events/src/main/kotlin/edu/artic/events/AllEventsAdapter.kt +++ b/content_listing/src/main/kotlin/edu/artic/events/AllEventsAdapter.kt @@ -6,6 +6,7 @@ import com.fuzz.rx.disposedBy import com.jakewharton.rxbinding2.widget.text import edu.artic.adapter.AutoHolderRecyclerViewAdapter import edu.artic.adapter.BaseViewHolder +import edu.artic.content.listing.R import edu.artic.image.GlideApp import kotlinx.android.synthetic.main.cell_all_events_layout.view.* diff --git a/events/src/main/kotlin/edu/artic/events/AllEventsFragment.kt b/content_listing/src/main/kotlin/edu/artic/events/AllEventsFragment.kt similarity index 99% rename from events/src/main/kotlin/edu/artic/events/AllEventsFragment.kt rename to content_listing/src/main/kotlin/edu/artic/events/AllEventsFragment.kt index 044a8a973..1469b121e 100644 --- a/events/src/main/kotlin/edu/artic/events/AllEventsFragment.kt +++ b/content_listing/src/main/kotlin/edu/artic/events/AllEventsFragment.kt @@ -12,6 +12,7 @@ import edu.artic.adapter.itemChanges import edu.artic.adapter.itemClicksWithPosition import edu.artic.analytics.ScreenName import edu.artic.base.utils.asDeepLinkIntent +import edu.artic.content.listing.R import edu.artic.events.recyclerview.AllEventsItemDecoration import edu.artic.navigation.NavigationConstants import edu.artic.viewmodel.BaseViewModelFragment diff --git a/events/src/main/kotlin/edu/artic/events/AllEventsViewModel.kt b/content_listing/src/main/kotlin/edu/artic/events/AllEventsViewModel.kt similarity index 100% rename from events/src/main/kotlin/edu/artic/events/AllEventsViewModel.kt rename to content_listing/src/main/kotlin/edu/artic/events/AllEventsViewModel.kt diff --git a/events/src/main/kotlin/edu/artic/events/EventsModule.kt b/content_listing/src/main/kotlin/edu/artic/events/EventsModule.kt similarity index 100% rename from events/src/main/kotlin/edu/artic/events/EventsModule.kt rename to content_listing/src/main/kotlin/edu/artic/events/EventsModule.kt diff --git a/events/src/main/kotlin/edu/artic/events/recyclerview/AllEventsItemDecoration.kt b/content_listing/src/main/kotlin/edu/artic/events/recyclerview/AllEventsItemDecoration.kt similarity index 98% rename from events/src/main/kotlin/edu/artic/events/recyclerview/AllEventsItemDecoration.kt rename to content_listing/src/main/kotlin/edu/artic/events/recyclerview/AllEventsItemDecoration.kt index 086d6d948..d98b0c944 100644 --- a/events/src/main/kotlin/edu/artic/events/recyclerview/AllEventsItemDecoration.kt +++ b/content_listing/src/main/kotlin/edu/artic/events/recyclerview/AllEventsItemDecoration.kt @@ -4,10 +4,10 @@ import android.content.Context import android.graphics.Rect import android.support.v7.widget.RecyclerView import android.view.View +import edu.artic.content.listing.R import edu.artic.events.AllEventsAdapter import edu.artic.events.AllEventsCellHeaderViewModel import edu.artic.events.AllEventsCellViewModel -import edu.artic.events.R class AllEventsItemDecoration( context: Context, diff --git a/events/src/main/res/drawable/shadow.xml b/content_listing/src/main/res/drawable/shadow.xml similarity index 100% rename from events/src/main/res/drawable/shadow.xml rename to content_listing/src/main/res/drawable/shadow.xml diff --git a/events/src/main/res/layout/cell_all_events_layout.xml b/content_listing/src/main/res/layout/cell_all_events_layout.xml similarity index 100% rename from events/src/main/res/layout/cell_all_events_layout.xml rename to content_listing/src/main/res/layout/cell_all_events_layout.xml diff --git a/events/src/main/res/layout/fragment_all_events.xml b/content_listing/src/main/res/layout/fragment_all_events.xml similarity index 100% rename from events/src/main/res/layout/fragment_all_events.xml rename to content_listing/src/main/res/layout/fragment_all_events.xml diff --git a/events/src/main/res/navigation/all_events_navigation_graph.xml b/content_listing/src/main/res/navigation/all_events_navigation_graph.xml similarity index 100% rename from events/src/main/res/navigation/all_events_navigation_graph.xml rename to content_listing/src/main/res/navigation/all_events_navigation_graph.xml diff --git a/events/src/main/res/navigation/event_details_navigation_graph.xml b/content_listing/src/main/res/navigation/event_details_navigation_graph.xml similarity index 100% rename from events/src/main/res/navigation/event_details_navigation_graph.xml rename to content_listing/src/main/res/navigation/event_details_navigation_graph.xml diff --git a/events/.gitignore b/events/.gitignore deleted file mode 100644 index 796b96d1c..000000000 --- a/events/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/events/build.gradle b/events/build.gradle deleted file mode 100644 index cc9152538..000000000 --- a/events/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -apply plugin: 'kotlin-android-extensions' -apply plugin: 'kotlin-kapt' - -dependencies { - kapt libs.dagger_compiler - kapt libs.dagger_android_compiler - kapt libs.glide_compiler - - api libs.design_support - implementation libs.glide - implementation libs.threeten - implementation project(':base') - implementation libs.constraint_layout - implementation project(':ui') - implementation project(':db') - implementation project(':viewmodel') - implementation project(':base') - implementation project(':adapter') - implementation project(':image') - implementation project(':details') -} diff --git a/events/proguard-rules.pro b/events/proguard-rules.pro deleted file mode 100644 index f1b424510..000000000 --- a/events/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/events/src/main/AndroidManifest.xml b/events/src/main/AndroidManifest.xml deleted file mode 100644 index b23eec4a3..000000000 --- a/events/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/events/src/main/res/values/dimens.xml b/events/src/main/res/values/dimens.xml deleted file mode 100644 index 7571f04e4..000000000 --- a/events/src/main/res/values/dimens.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 23dp - @dimen/marginDouble - 16dp - \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index edc171f3d..de385155a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,7 +7,6 @@ include ':adapter', ':content_listing', ':db', ':details', - ':events', ':image', ':info', ':localization', diff --git a/welcome/build.gradle b/welcome/build.gradle index 3c177273e..6c15f0020 100644 --- a/welcome/build.gradle +++ b/welcome/build.gradle @@ -16,7 +16,6 @@ dependencies { implementation project(':media_ui') implementation project(':adapter') implementation project(':content_listing') - implementation project(':events') implementation project(':navigation') implementation project(':media') implementation project(':image') From b9c1793c2bcec6730ff99bbefc5267d88c7dc751 Mon Sep 17 00:00:00 2001 From: Philip Cohn-Cort Date: Fri, 19 Oct 2018 18:09:16 -0400 Subject: [PATCH 7/7] [Layout] - Refactor: use same layout for all of the content listing fragments --- .../edu/artic/events/AllEventsFragment.kt | 4 +- .../exhibitions/AllExhibitionsFragment.kt | 4 +- .../edu/artic/tours/AllToursFragment.kt | 4 +- .../main/res/layout/fragment_all_events.xml | 40 ------------------- .../res/layout/fragment_all_exhibitions.xml | 40 ------------------- .../main/res/layout/fragment_all_tours.xml | 40 ------------------- 6 files changed, 6 insertions(+), 126 deletions(-) delete mode 100644 content_listing/src/main/res/layout/fragment_all_events.xml delete mode 100644 content_listing/src/main/res/layout/fragment_all_exhibitions.xml delete mode 100644 content_listing/src/main/res/layout/fragment_all_tours.xml diff --git a/content_listing/src/main/kotlin/edu/artic/events/AllEventsFragment.kt b/content_listing/src/main/kotlin/edu/artic/events/AllEventsFragment.kt index 1469b121e..710119622 100644 --- a/content_listing/src/main/kotlin/edu/artic/events/AllEventsFragment.kt +++ b/content_listing/src/main/kotlin/edu/artic/events/AllEventsFragment.kt @@ -18,7 +18,7 @@ import edu.artic.navigation.NavigationConstants import edu.artic.viewmodel.BaseViewModelFragment import edu.artic.viewmodel.Navigate import io.reactivex.rxkotlin.subscribeBy -import kotlinx.android.synthetic.main.fragment_all_events.* +import kotlinx.android.synthetic.main.fragment_view_all.* import kotlin.reflect.KClass class AllEventsFragment : BaseViewModelFragment() { @@ -29,7 +29,7 @@ class AllEventsFragment : BaseViewModelFragment() { override val viewModelClass: KClass get() = AllEventsViewModel::class override val layoutResId: Int - get() = R.layout.fragment_all_events + get() = R.layout.fragment_view_all override val title = R.string.events diff --git a/content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt b/content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt index db056e259..7310bcf1d 100644 --- a/content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt +++ b/content_listing/src/main/kotlin/edu/artic/exhibitions/AllExhibitionsFragment.kt @@ -19,7 +19,7 @@ import edu.artic.viewmodel.BaseViewModelFragment import edu.artic.viewmodel.Navigate import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.rxkotlin.subscribeBy -import kotlinx.android.synthetic.main.fragment_all_exhibitions.* +import kotlinx.android.synthetic.main.fragment_view_all.* import kotlin.reflect.KClass class AllExhibitionsFragment : BaseViewModelFragment() { @@ -30,7 +30,7 @@ class AllExhibitionsFragment : BaseViewModelFragment() override val viewModelClass: KClass get() = AllExhibitionsViewModel::class override val layoutResId: Int - get() = R.layout.fragment_all_exhibitions + get() = R.layout.fragment_view_all override val title = R.string.onView diff --git a/content_listing/src/main/kotlin/edu/artic/tours/AllToursFragment.kt b/content_listing/src/main/kotlin/edu/artic/tours/AllToursFragment.kt index 45468f460..64e9c79fb 100644 --- a/content_listing/src/main/kotlin/edu/artic/tours/AllToursFragment.kt +++ b/content_listing/src/main/kotlin/edu/artic/tours/AllToursFragment.kt @@ -20,7 +20,7 @@ import edu.artic.viewmodel.BaseViewModelFragment import edu.artic.viewmodel.Navigate import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.rxkotlin.subscribeBy -import kotlinx.android.synthetic.main.fragment_all_tours.* +import kotlinx.android.synthetic.main.fragment_view_all.* import kotlin.reflect.KClass class AllToursFragment : BaseViewModelFragment() { @@ -31,7 +31,7 @@ class AllToursFragment : BaseViewModelFragment() { override val viewModelClass: KClass get() = AllToursViewModel::class override val layoutResId: Int - get() = R.layout.fragment_all_tours + get() = R.layout.fragment_view_all override val title = R.string.tours diff --git a/content_listing/src/main/res/layout/fragment_all_events.xml b/content_listing/src/main/res/layout/fragment_all_events.xml deleted file mode 100644 index 7aa568c87..000000000 --- a/content_listing/src/main/res/layout/fragment_all_events.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/content_listing/src/main/res/layout/fragment_all_exhibitions.xml b/content_listing/src/main/res/layout/fragment_all_exhibitions.xml deleted file mode 100644 index ca7709478..000000000 --- a/content_listing/src/main/res/layout/fragment_all_exhibitions.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/content_listing/src/main/res/layout/fragment_all_tours.xml b/content_listing/src/main/res/layout/fragment_all_tours.xml deleted file mode 100644 index 920469462..000000000 --- a/content_listing/src/main/res/layout/fragment_all_tours.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file