diff --git a/app/build.gradle b/app/build.gradle index 8fc180bc..bdead103 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,9 +1,9 @@ plugins { - id 'com.android.application' - id 'com.google.gms.google-services' - id 'com.google.firebase.crashlytics' - id 'com.mikepenz.aboutlibraries.plugin' - id 'com.google.dagger.hilt.android' + alias(libs.plugins.androidApplication) + alias(libs.plugins.googleServices) + alias(libs.plugins.firebaseCrashlytics) + alias(libs.plugins.aboutLibraries) + alias(libs.plugins.hiltAndroid) } android { @@ -103,8 +103,5 @@ dependencies { // Testing - testImplementation libs.junit - testImplementation libs.androidx.core.testing - testImplementation libs.mockito.core - testImplementation libs.mockito.inline -} \ No newline at end of file + testImplementation libs.bundles.unitTest +} diff --git a/build.gradle b/build.gradle index 9d0bab0f..7363c4db 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,7 @@ plugins { - id 'com.android.application' version '8.13.0' apply false - id 'com.google.gms.google-services' version '4.4.3' apply false - id 'com.google.firebase.crashlytics' version '3.0.6' apply false - //noinspection NewerVersionAvailable - id 'com.mikepenz.aboutlibraries.plugin' version '11.3.0' apply true - id 'com.google.dagger.hilt.android' version '2.57.1' apply false + alias(libs.plugins.androidApplication) apply false + alias(libs.plugins.googleServices) apply false + alias(libs.plugins.firebaseCrashlytics) apply false + alias(libs.plugins.aboutLibraries) apply true + alias(libs.plugins.hiltAndroid) apply false } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f62cc9df..00666131 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,9 +1,11 @@ - [versions] +[versions] +agp = "8.13.0" +firebaseCrashlyticsPlugin = "3.0.6" +googleServices = "4.4.3" appcompat = "1.7.1" appUpdate = "2.1.0" billing = "8.0.0" constraintlayout = "2.2.1" -#noinspection NewerVersionAvailable,GradleDependency aboutlibraries = "11.3.0" coreSplashscreen = "1.0.1" core = "4.6.2" @@ -13,8 +15,8 @@ gridlayout = "1.1.0" junit = "4.13.2" library = "1.3.0" libraryVersion = "1.4.0" -lifecycle = "2.9.3" -lottie = "6.6.7" +lifecycle = "2.9.4" +lottie = "6.6.9" mockitoCore = "5.19.0" mockitoInline = "5.2.0" navigationUi = "2.9.4" @@ -28,48 +30,78 @@ playServicesAds = "24.6.0" codeview = "1.3.9" hilt = "2.57.1" room = "2.8.0" -glide = "5.0.4" +glide = "5.0.5" retrofit = "3.0.0" [libraries] -aboutlibraries = { module = "com.mikepenz:aboutlibraries", version.ref = "aboutlibraries" } +# AndroidX & Material androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } androidx-core = { module = "androidx.core:core", version.ref = "coreKtx" } androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" } -androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "coreTesting" } androidx-gridlayout = { module = "androidx.gridlayout:gridlayout", version.ref = "gridlayout" } -androidx-lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata", version.ref = "lifecycle" } -androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle" } -androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime", version.ref = "lifecycle" } -androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref = "lifecycle" } androidx-multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" } androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment", version.ref = "navigationUi" } androidx-preference = { module = "androidx.preference:preference", version.ref = "preference" } androidx-navigation-ui = { module = "androidx.navigation:navigation-ui", version.ref = "navigationUi" } -app-update = { module = "com.google.android.play:app-update", version.ref = "appUpdate" } -billing = { module = "com.android.billingclient:billing", version.ref = "billing" } +androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" } +androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" } +material = { module = "com.google.android.material:material", version.ref = "material" } +materialratingbar-library = { module = "me.zhanghai.android.materialratingbar:library", version.ref = "libraryVersion" } +library = { module = "me.zhanghai.android.fastscroll:library", version.ref = "library" } +codeview = { module = "io.github.amrdeveloper:codeview", version.ref = "codeview" } + +# Lifecycle +androidx-lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata", version.ref = "lifecycle" } +androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle" } +androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime", version.ref = "lifecycle" } +androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref = "lifecycle" } + +# Firebase & Play Services firebase-analytics = { module = "com.google.firebase:firebase-analytics" } firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBom" } firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics" } -core = { module = "io.noties.markwon:core", version.ref = "core" } google-firebase-perf = { module = "com.google.firebase:firebase-perf" } -junit = { module = "junit:junit", version.ref = "junit" } -library = { module = "me.zhanghai.android.fastscroll:library", version.ref = "library" } -lottie = { module = "com.airbnb.android:lottie", version.ref = "lottie" } -material = { module = "com.google.android.material:material", version.ref = "material" } -materialratingbar-library = { module = "me.zhanghai.android.materialratingbar:library", version.ref = "libraryVersion" } -mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoCore" } -mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockitoInline" } play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "playServicesAds" } -review = { module = "com.google.android.play:review", version.ref = "review" } -volley = { module = "com.android.volley:volley", version.ref = "volley" } -codeview = { module = "io.github.amrdeveloper:codeview", version.ref = "codeview" } + +# Networking (Retrofit) +retrofit2 = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } +retrofit2-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" } + +# DI (Hilt) hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } hilt-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" } -androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" } -androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" } + +# Utility +aboutlibraries = { module = "com.mikepenz:aboutlibraries", version.ref = "aboutlibraries" } +app-update = { module = "com.google.android.play:app-update", version.ref = "appUpdate" } +billing = { module = "com.android.billingclient:billing", version.ref = "billing" } +core = { module = "io.noties.markwon:core", version.ref = "core" } +lottie = { module = "com.airbnb.android:lottie", version.ref = "lottie" } +review = { module = "com.google.android.play:review", version.ref = "review" } +volley = { module = "com.android.volley:volley", version.ref = "volley" } glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" } -retrofit2 = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } -retrofit2-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" } + +# --- TESTING --- +# Unit Tests (test folder) +junit = { module = "junit:junit", version.ref = "junit" } +androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "coreTesting" } +mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoCore" } +mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockitoInline" } + +[plugins] +androidApplication = { id = "com.android.application", version.ref = "agp" } +googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } +firebaseCrashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsPlugin" } +aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutlibraries" } +hiltAndroid = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } + +[bundles] +# For local tests on the JVM (test sourceSet) +unitTest = [ + "junit", + "androidx-core-testing", + "mockito-core", + "mockito-inline", +]