From f234b719322b8224a25ddbe44b820eb3e9da3f77 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2019 18:24:22 +0200 Subject: [PATCH] Bump dagger from 2.24 to 2.25.2 (#564) --- app/build.gradle | 2 +- .../java/io/github/wulkanowy/services/ServicesModule.kt | 6 ++---- .../io/github/wulkanowy/ui/modules/grade/GradeModule.kt | 5 ++--- .../io/github/wulkanowy/ui/modules/login/LoginModule.kt | 5 ++--- .../java/io/github/wulkanowy/ui/modules/main/MainModule.kt | 7 ++----- .../github/wulkanowy/ui/modules/message/MessageModule.kt | 5 ++--- .../modules/schoolandteachers/SchoolAndTeachersModule.kt | 5 ++--- 7 files changed, 13 insertions(+), 22 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cbd8dca3a..8f3ae958d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -112,7 +112,7 @@ play { ext { work_manager = "2.3.0-alpha03" room = "2.2.1" - dagger = "2.24" + dagger = "2.25.2" chucker = "2.0.4" mockk = "1.9.2" } diff --git a/app/src/main/java/io/github/wulkanowy/services/ServicesModule.kt b/app/src/main/java/io/github/wulkanowy/services/ServicesModule.kt index 7d1b223e5..78bdbd8c0 100644 --- a/app/src/main/java/io/github/wulkanowy/services/ServicesModule.kt +++ b/app/src/main/java/io/github/wulkanowy/services/ServicesModule.kt @@ -29,17 +29,15 @@ import javax.inject.Singleton @Suppress("unused") @AssistedModule -@Module(includes = [AssistedInject_ServicesModule::class]) +@Module(includes = [AssistedInject_ServicesModule::class, ServicesModule.Static::class]) abstract class ServicesModule { @Module - companion object { + object Static { - @JvmStatic @Provides fun provideWorkManager(context: Context) = WorkManager.getInstance(context) - @JvmStatic @Singleton @Provides fun provideNotificationManager(context: Context) = NotificationManagerCompat.from(context) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeModule.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeModule.kt index 52cf087bd..6e6ca2d63 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeModule.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeModule.kt @@ -11,13 +11,12 @@ import io.github.wulkanowy.ui.modules.grade.statistics.GradeStatisticsFragment import io.github.wulkanowy.ui.modules.grade.summary.GradeSummaryFragment @Suppress("unused") -@Module +@Module(includes = [GradeModule.Static::class]) abstract class GradeModule { @Module - companion object { + object Static { - @JvmStatic @PerFragment @Provides fun provideGradeAdapter(fragment: GradeFragment) = BaseFragmentPagerAdapter(fragment.childFragmentManager) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/LoginModule.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/LoginModule.kt index a0b98be72..8bcf042b5 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/LoginModule.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/LoginModule.kt @@ -11,13 +11,12 @@ import io.github.wulkanowy.ui.modules.login.studentselect.LoginStudentSelectFrag import io.github.wulkanowy.ui.modules.login.symbol.LoginSymbolFragment @Suppress("unused") -@Module +@Module(includes = [LoginModule.Static::class]) internal abstract class LoginModule { @Module - companion object { + object Static { - @JvmStatic @PerActivity @Provides fun provideLoginAdapter(activity: LoginActivity) = BaseFragmentPagerAdapter(activity.supportFragmentManager) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainModule.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainModule.kt index 095a320a3..bbaea51ce 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainModule.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/main/MainModule.kt @@ -29,25 +29,22 @@ import io.github.wulkanowy.ui.modules.note.NoteFragment import io.github.wulkanowy.ui.modules.schoolandteachers.SchoolAndTeachersFragment import io.github.wulkanowy.ui.modules.schoolandteachers.SchoolAndTeachersModule import io.github.wulkanowy.ui.modules.settings.SettingsFragment -import io.github.wulkanowy.ui.modules.schoolandteachers.teacher.TeacherFragment import io.github.wulkanowy.ui.modules.timetable.TimetableFragment import io.github.wulkanowy.ui.modules.timetable.completed.CompletedLessonsFragment @Suppress("unused") -@Module +@Module(includes = [MainModule.Static::class]) abstract class MainModule { @Module - companion object { + object Static { - @JvmStatic @Provides fun provideFragNavController(activity: MainActivity): FragNavController { return FragNavController(activity.supportFragmentManager, R.id.mainFragmentContainer) } //In activities must be injected as Lazy - @JvmStatic @Provides fun provideElevationOverlayProvider(activity: MainActivity) = ElevationOverlayProvider(activity) } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/message/MessageModule.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/message/MessageModule.kt index c772466fc..b25219025 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/message/MessageModule.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/message/MessageModule.kt @@ -9,13 +9,12 @@ import io.github.wulkanowy.ui.base.BaseFragmentPagerAdapter import io.github.wulkanowy.ui.modules.message.tab.MessageTabFragment @Suppress("unused") -@Module +@Module(includes = [MessageModule.Static::class]) abstract class MessageModule { @Module - companion object { + object Static { - @JvmStatic @PerFragment @Provides fun provideMessageAdapter(fragment: MessageFragment) = BaseFragmentPagerAdapter(fragment.childFragmentManager) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/schoolandteachers/SchoolAndTeachersModule.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/schoolandteachers/SchoolAndTeachersModule.kt index 1c083f8ac..62803a28c 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/schoolandteachers/SchoolAndTeachersModule.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/schoolandteachers/SchoolAndTeachersModule.kt @@ -10,13 +10,12 @@ import io.github.wulkanowy.ui.modules.schoolandteachers.school.SchoolFragment import io.github.wulkanowy.ui.modules.schoolandteachers.teacher.TeacherFragment @Suppress("unused") -@Module +@Module(includes = [SchoolAndTeachersModule.Static::class]) abstract class SchoolAndTeachersModule { @Module - companion object { + object Static { - @JvmStatic @PerFragment @Provides fun provideSchoolAndTeachersAdapter(fragment: SchoolAndTeachersFragment) = BaseFragmentPagerAdapter(fragment.childFragmentManager)