Skip to content
Permalink
Browse files

Extract trending and popular to modules

  • Loading branch information...
chrisbanes committed Jul 29, 2019
1 parent 6581244 commit c753e12383b224b66355bb42e6427f963111bf2c
@@ -29,7 +29,9 @@
<option value="$PROJECT_DIR$/ui-discover" />
<option value="$PROJECT_DIR$/ui-episodedetails" />
<option value="$PROJECT_DIR$/ui-followed" />
<option value="$PROJECT_DIR$/ui-popular" />
<option value="$PROJECT_DIR$/ui-showdetails" />
<option value="$PROJECT_DIR$/ui-trending" />
<option value="$PROJECT_DIR$/ui-watched" />
</set>
</option>
@@ -23,7 +23,9 @@
<module fileurl="file://$PROJECT_DIR$/ui-discover/ui-discover.iml" filepath="$PROJECT_DIR$/ui-discover/ui-discover.iml" />
<module fileurl="file://$PROJECT_DIR$/ui-episodedetails/ui-episodedetails.iml" filepath="$PROJECT_DIR$/ui-episodedetails/ui-episodedetails.iml" />
<module fileurl="file://$PROJECT_DIR$/ui-followed/ui-followed.iml" filepath="$PROJECT_DIR$/ui-followed/ui-followed.iml" />
<module fileurl="file://$PROJECT_DIR$/ui-popular/ui-popular.iml" filepath="$PROJECT_DIR$/ui-popular/ui-popular.iml" />
<module fileurl="file://$PROJECT_DIR$/ui-showdetails/ui-showdetails.iml" filepath="$PROJECT_DIR$/ui-showdetails/ui-showdetails.iml" />
<module fileurl="file://$PROJECT_DIR$/ui-trending/ui-trending.iml" filepath="$PROJECT_DIR$/ui-trending/ui-trending.iml" />
<module fileurl="file://$PROJECT_DIR$/ui-watched/ui-watched.iml" filepath="$PROJECT_DIR$/ui-watched/ui-watched.iml" />
</modules>
</component>
@@ -178,6 +178,8 @@ dependencies {
implementation project(":ui-episodedetails")
implementation project(":ui-followed")
implementation project(":ui-watched")
implementation project(":ui-popular")
implementation project(":ui-trending")

implementation Libs.AndroidX.Lifecycle.extensions
implementation Libs.AndroidX.Lifecycle.reactive
@@ -35,4 +35,6 @@ include ':ui-showdetails'
include ':ui-episodedetails'
include ':ui-followed'
include ':ui-watched'
include ':ui-trending'
include ':ui-popular'
include ':app'
@@ -0,0 +1,111 @@
/*
* Copyright 2018 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

import app.tivi.buildsrc.Libs

apply plugin: 'com.android.library'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-kapt'
kapt {
correctErrorTypes = true
useBuildCache = true
}

apply plugin: 'kotlin-android-extensions'
androidExtensions {
experimental = true
}

android {
compileSdkVersion buildConfig.compileSdk

defaultConfig {
minSdkVersion buildConfig.minSdk
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation project(":base")
implementation project(":base-android")
implementation project(':interactors')
implementation project(":trakt-auth")
implementation project(":common-ui")
implementation project(":common-epoxy")
implementation project(":common-layouts")
implementation project(":common-glide")
implementation project(":common-databinding")
implementation project(":common-entrygrid")

implementation Libs.AndroidX.Lifecycle.extensions
implementation Libs.AndroidX.Lifecycle.reactive
implementation Libs.AndroidX.Lifecycle.viewmodel
kapt Libs.AndroidX.Lifecycle.compiler

implementation Libs.AndroidX.Paging.runtime
implementation Libs.AndroidX.Paging.rxjava2

implementation Libs.AndroidX.appcompat
implementation Libs.AndroidX.browser
implementation Libs.AndroidX.palette
implementation Libs.AndroidX.recyclerview
implementation Libs.AndroidX.emoji
implementation Libs.AndroidX.preference
implementation Libs.AndroidX.constraintlayout
implementation Libs.AndroidX.coreKtx
implementation Libs.AndroidX.Fragment.fragment
implementation Libs.AndroidX.Fragment.fragmentKtx
implementation Libs.AndroidX.Navigation.fragment
implementation Libs.AndroidX.Navigation.ui

implementation Libs.Google.material

implementation Libs.RxJava.rxJava
implementation Libs.RxJava.rxKotlin
implementation Libs.RxJava.rxAndroid

implementation Libs.Kotlin.stdlib
implementation Libs.Kotlin.reflect

implementation Libs.Coroutines.core
implementation Libs.Coroutines.rx2
implementation Libs.Coroutines.android

implementation Libs.Dagger.androidSupport
kapt Libs.Dagger.compiler
kapt Libs.Dagger.androidProcessor

compileOnly Libs.AssistedInject.annotationDagger2
kapt Libs.AssistedInject.processorDagger2

implementation Libs.mvRx

implementation Libs.Epoxy.epoxy
implementation Libs.Epoxy.paging
implementation Libs.Epoxy.dataBinding
kapt Libs.Epoxy.processor

implementation Libs.gravitySnapHelper

debugImplementation Libs.rxLint
}
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2018 Google, Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.tivi.home.popular">

</manifest>
@@ -24,7 +24,7 @@ import dagger.android.ContributesAndroidInjector
import dagger.multibindings.IntoMap

@Module
internal abstract class PopularBuilder {
abstract class PopularBuilder {
@ContributesAndroidInjector
internal abstract fun popularShowsFragment(): PopularShowsFragment

@@ -19,7 +19,6 @@ package app.tivi.home.popular
import android.view.View
import androidx.core.os.bundleOf
import androidx.navigation.fragment.findNavController
import app.tivi.R
import app.tivi.SharedElementHelper
import app.tivi.common.layouts.PosterGridItemBindingModel_
import app.tivi.data.entities.findHighestRatedPoster
@@ -37,7 +36,7 @@ class PopularShowsFragment : EntryGridFragment<PopularEntryWithShow, PopularShow
}

findNavController().navigate(
app.tivi.home.followed.R.id.activity_show_details,
R.id.activity_show_details,
bundleOf("show_id" to item.show.id),
null,
sharedElements.toActivityNavigatorExtras(requireActivity())
@@ -0,0 +1,111 @@
/*
* Copyright 2018 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

import app.tivi.buildsrc.Libs

apply plugin: 'com.android.library'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-kapt'
kapt {
correctErrorTypes = true
useBuildCache = true
}

apply plugin: 'kotlin-android-extensions'
androidExtensions {
experimental = true
}

android {
compileSdkVersion buildConfig.compileSdk

defaultConfig {
minSdkVersion buildConfig.minSdk
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation project(":base")
implementation project(":base-android")
implementation project(':interactors')
implementation project(":trakt-auth")
implementation project(":common-ui")
implementation project(":common-epoxy")
implementation project(":common-layouts")
implementation project(":common-glide")
implementation project(":common-databinding")
implementation project(":common-entrygrid")

implementation Libs.AndroidX.Lifecycle.extensions
implementation Libs.AndroidX.Lifecycle.reactive
implementation Libs.AndroidX.Lifecycle.viewmodel
kapt Libs.AndroidX.Lifecycle.compiler

implementation Libs.AndroidX.Paging.runtime
implementation Libs.AndroidX.Paging.rxjava2

implementation Libs.AndroidX.appcompat
implementation Libs.AndroidX.browser
implementation Libs.AndroidX.palette
implementation Libs.AndroidX.recyclerview
implementation Libs.AndroidX.emoji
implementation Libs.AndroidX.preference
implementation Libs.AndroidX.constraintlayout
implementation Libs.AndroidX.coreKtx
implementation Libs.AndroidX.Fragment.fragment
implementation Libs.AndroidX.Fragment.fragmentKtx
implementation Libs.AndroidX.Navigation.fragment
implementation Libs.AndroidX.Navigation.ui

implementation Libs.Google.material

implementation Libs.RxJava.rxJava
implementation Libs.RxJava.rxKotlin
implementation Libs.RxJava.rxAndroid

implementation Libs.Kotlin.stdlib
implementation Libs.Kotlin.reflect

implementation Libs.Coroutines.core
implementation Libs.Coroutines.rx2
implementation Libs.Coroutines.android

implementation Libs.Dagger.androidSupport
kapt Libs.Dagger.compiler
kapt Libs.Dagger.androidProcessor

compileOnly Libs.AssistedInject.annotationDagger2
kapt Libs.AssistedInject.processorDagger2

implementation Libs.mvRx

implementation Libs.Epoxy.epoxy
implementation Libs.Epoxy.paging
implementation Libs.Epoxy.dataBinding
kapt Libs.Epoxy.processor

implementation Libs.gravitySnapHelper

debugImplementation Libs.rxLint
}
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2018 Google, Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.tivi.home.trending">

</manifest>
@@ -24,7 +24,7 @@ import dagger.android.ContributesAndroidInjector
import dagger.multibindings.IntoMap

@Module
internal abstract class TrendingBuilder {
abstract class TrendingBuilder {
@ContributesAndroidInjector
internal abstract fun trendingShowsFragment(): TrendingShowsFragment

@@ -19,7 +19,6 @@ package app.tivi.home.trending
import android.view.View
import androidx.core.os.bundleOf
import androidx.navigation.fragment.findNavController
import app.tivi.R
import app.tivi.SharedElementHelper
import app.tivi.common.layouts.TrendingPosterGridItemBindingModel_
import app.tivi.data.entities.findHighestRatedPoster

0 comments on commit c753e12

Please sign in to comment.
You can’t perform that action at this time.