From 7e1ca1e21124d036fbafc65150362d6a63a42abb Mon Sep 17 00:00:00 2001 From: Tule Simon <58936865+TuleSimon@users.noreply.github.com> Date: Sun, 16 Apr 2023 19:39:15 +0100 Subject: [PATCH] Migrated dependencies and plugins to version catalog (#1497) --- app/build.gradle | 108 ++++++++++++++--------------- appthemehelper/build.gradle | 6 +- build.gradle | 18 ++--- gradle/libs.versions.toml | 131 ++++++++++++++++++++++++++++++++++++ 4 files changed, 190 insertions(+), 73 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/app/build.gradle b/app/build.gradle index d476684ca..47b03cabd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -100,81 +100,75 @@ static def getProperty(Properties properties, String name) { dependencies { implementation project(':appthemehelper') - implementation "androidx.gridlayout:gridlayout:1.0.0" + implementation libs.gridLayout - implementation "androidx.appcompat:appcompat:$appcompat_version" - implementation 'androidx.annotation:annotation:1.6.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'androidx.recyclerview:recyclerview:1.3.0' - implementation "androidx.preference:preference-ktx:$preference_version" - implementation "androidx.core:core-ktx:$core_version" - implementation 'androidx.palette:palette-ktx:1.0.0' + implementation libs.androidx.appcompat + implementation libs.androidx.annotation + implementation libs.androidx.constraintLayout + implementation libs.androidx.recyclerview + implementation libs.androidx.preference.ktx + implementation libs.androidx.core.ktx + implementation libs.androidx.palette.ktx - implementation 'androidx.mediarouter:mediarouter:1.3.1' + implementation libs.androidx.mediarouter //Cast Dependencies - normalImplementation 'com.google.android.gms:play-services-cast-framework:21.3.0' + normalImplementation libs.google.play.services.cast.framework //WebServer by NanoHttpd - normalImplementation "org.nanohttpd:nanohttpd:2.3.1" + normalImplementation libs.nanohttpd - implementation "androidx.navigation:navigation-runtime-ktx:$navigation_version" - implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version" - implementation "androidx.navigation:navigation-ui-ktx:$navigation_version" + implementation libs.androidx.navigation.runtime.ktx + implementation libs.androidx.navigation.fragment.ktx + implementation libs.androidx.navigation.ui.ktx - def room_version = '2.5.1' - implementation "androidx.room:room-runtime:$room_version" - implementation "androidx.room:room-ktx:$room_version" - ksp "androidx.room:room-compiler:$room_version" + implementation libs.androidx.room.runtime + implementation libs.androidx.room.ktx + ksp libs.androidx.room.compiler - implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" - implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" - implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" + implementation libs.androidx.lifecycle.viewmodel.ktx + implementation libs.androidx.lifecycle.livedata.ktx + implementation libs.androidx.lifecycle.common.java8 - implementation "androidx.core:core-splashscreen:1.0.0" + implementation libs.androidx.core.splashscreen - normalImplementation 'com.google.android.play:feature-delivery:2.0.1' - normalImplementation 'com.google.android.play:review:2.0.1' + normalImplementation libs.google.feature.delivery + normalImplementation libs.google.play.review - implementation "com.google.android.material:material:$mdc_version" + implementation libs.android.material - def retrofit_version = '2.9.0' - implementation "com.squareup.retrofit2:retrofit:$retrofit_version" - implementation "com.squareup.retrofit2:converter-gson:$retrofit_version" - implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.9' + implementation libs.retrofit + implementation libs.retrofit.converter.gson + implementation libs.okhttp3.logging.interceptor - def material_dialog_version = "3.3.0" - implementation "com.afollestad.material-dialogs:core:$material_dialog_version" - implementation "com.afollestad.material-dialogs:input:$material_dialog_version" - implementation "com.afollestad.material-dialogs:color:$material_dialog_version" + implementation libs.afollestad.material.dialogs.core + implementation libs.afollestad.material.dialogs.input + implementation libs.afollestad.material.dialogs.color + implementation libs.afollestad.material.cab - implementation 'com.afollestad:material-cab:2.0.1' + implementation libs.kotlinx.coroutines.android - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" + implementation libs.koin.core + implementation libs.koin.android - def koin_version = '3.4.0' - implementation "io.insert-koin:koin-core:$koin_version" - implementation "io.insert-koin:koin-android:$koin_version" + implementation libs.glide + ksp libs.glide.ksp + implementation libs.glide.okhttp3.integration - def glide_version = '4.15.1' - implementation "com.github.bumptech.glide:glide:$glide_version" - ksp "com.github.bumptech.glide:ksp:$glide_version" - implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version" + implementation libs.advrecyclerview - implementation 'com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:1.0.0' + implementation libs.fadingedgelayout - implementation 'com.github.bosphere.android-fadingedgelayout:fadingedgelayout:1.0.0' + implementation libs.keyboardvisibilityevent + implementation libs.jetradarmobile.android.snowfall - implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:3.0.0-RC3' - implementation 'com.github.jetradarmobile:android-snowfall:1.2.1' + implementation libs.chrisbanes.insetter - implementation "dev.chrisbanes.insetter:insetter:0.6.1" - - implementation 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5' - implementation 'com.github.Adonai:jaudiotagger:2.3.15' - normalImplementation 'com.anjlab.android.iab.v3:library:2.0.3' - implementation 'com.r0adkll:slidableactivity:2.1.0' - implementation 'com.heinrichreimersoftware:material-intro:2.0.0' - implementation 'com.github.dhaval2404:imagepicker:2.1' - implementation 'me.zhanghai.android.fastscroll:library:1.2.0' - implementation 'cat.ereza:customactivityoncrash:2.4.0' - implementation 'me.tankery.lib:circularSeekBar:1.4.2' + implementation libs.org.eclipse.egit.github.core + implementation libs.jaudiotagger + normalImplementation libs.android.lab.library + implementation libs.slidableactivity + implementation libs.material.intro + implementation libs.dhaval2404.imagepicker + implementation libs.fastscroll.library + implementation libs.customactivityoncrash + implementation libs.tankery.circularSeekBar } \ No newline at end of file diff --git a/appthemehelper/build.gradle b/appthemehelper/build.gradle index 2a5e0f50d..775ae3229 100644 --- a/appthemehelper/build.gradle +++ b/appthemehelper/build.gradle @@ -24,7 +24,7 @@ android { } dependencies { - implementation "androidx.appcompat:appcompat:$appcompat_version" - implementation "com.google.android.material:material:$mdc_version" - implementation "androidx.preference:preference-ktx:$preference_version" + implementation libs.androidx.appcompat + implementation libs.android.material + implementation libs.androidx.preference.ktx } diff --git a/build.gradle b/build.gradle index 057d58791..8f90db5b4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,28 +1,20 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext { - lifecycle_version = '2.6.1' - navigation_version = '2.5.3' - mdc_version = '1.9.0-beta01' - preference_version = '1.2.0' - appcompat_version = '1.6.1' - core_version = '1.10.0-rc01' - } repositories { mavenCentral() google() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10" - classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version" + classpath libs.gradle + classpath libs.kotlin.gradle.plugin + classpath libs.androidx.navigation.safeargs.plugin } } plugins { - id "com.github.ben-manes.versions" version "0.46.0" - id 'com.google.devtools.ksp' version '1.8.10-1.0.9' apply false + alias libs.plugins.github.ben.manes + alias libs.plugins.google.devtools.ksp apply false } tasks.register('clean', Delete) { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..67ef6aff5 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,131 @@ +[versions] +#buildscripts dependencies +advrecyclerview = "1.0.0" +jetradarmobile_androidSnowfall_version = "1.2.1" +tankery_circularSeekBar_version = "1.4.2" +retrofit_version = "2.9.0" +afollestad_dialog_version = "3.3.0" +coreSplashscreen = "1.0.0" +customactivityoncrash = "2.4.0" +fadingedgelayout = "1.0.0" +google_featureDelivery_version = "2.0.1" +gradle = "7.4.2" +dhaval2404_imagepicker_version = "2.1" +chrisbanes_insetter_version = "0.6.1" +jaudiotagger = "2.3.15" +yslibrary_keyboardvisibilityevent_version = "3.0.0-RC3" +koinAndroid = "3.4.0" +kotlinGradlePlugin = "1.8.10" + +kotlinxCoroutinesAndroid = "1.6.4" +android_tab_library_version = "2.0.3" +fast_scroll_libraryVersion = "1.2.0" +lifecycle_version = "2.6.1" +okhttp3_loggingInterceptor_version = "5.0.0-alpha.9" +afollestad_materialCab_version = "2.0.1" +materialIntro = "2.0.0" +mediarouter = "1.3.1" +nanohttpd = "2.3.1" +navigation_version = "2.5.3" +mdc_version = "1.9.0-beta01" +glide_version = "4.15.1" +orgEclipseEgitGithubCore = "2.1.5" +playServicesCastFramework = "21.3.0" +preference_version = "1.2.0" +appcompat_version = "1.6.1" +google_play_review_version = "2.0.1" +room_version = "2.5.1" +core_version = "1.10.0-rc01" + +#plugins +devTools_ksp_version = "1.8.10-1.0.9" +ben_manes_versoin = "0.46.0" +slidableactivity = "2.1.0" + + +[libraries] +#dependencies +#navigation +androidx-navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation_version" } +androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation_version" } +androidx-navigation-runtime-ktx = { module = "androidx.navigation:navigation-runtime-ktx", version.ref = "navigation_version" } + +#lifecycle +androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "lifecycle_version" } +androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle_version" } +androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle_version" } + +#room +androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room_version" } +androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room_version" } +androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room_version" } + +#google_play +google-feature-delivery = { module = "com.google.android.play:feature-delivery", version.ref = "google_featureDelivery_version" } +google-play-services-cast-framework = { module = "com.google.android.gms:play-services-cast-framework", version.ref = "playServicesCastFramework" } +google-play-review = { module = "com.google.android.play:review", version.ref = "google_play_review_version" } + +#glide +glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide_version" } +glide-ksp = { module = "com.github.bumptech.glide:ksp", version.ref = "glide_version" } +glide-okhttp3-integration = { module = "com.github.bumptech.glide:okhttp3-integration", version.ref = "glide_version" } + + +#koin +koin-android = { module = "io.insert-koin:koin-android", version.ref = "koinAndroid" } +koin-core = { module = "io.insert-koin:koin-core", version.ref = "koinAndroid" } + + +#material dialog +afollestad-material-dialogs-color = { module = "com.afollestad.material-dialogs:color", version.ref = "afollestad_dialog_version" } +afollestad-material-dialogs-core = { module = "com.afollestad.material-dialogs:core", version.ref = "afollestad_dialog_version" } +afollestad-material-dialogs-input = { module = "com.afollestad.material-dialogs:input", version.ref = "afollestad_dialog_version" } +afollestad-material-cab = { module = "com.afollestad:material-cab", version.ref = "afollestad_materialCab_version" } + +#Retrofit and apos +retrofit-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit_version" } +okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp3_loggingInterceptor_version" } +retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit_version" } + +#misc +gridLayout = { group = "androidx.gridlayout", name = "gridlayout", version = "1.0.0" } +android-material = { module = "com.google.android.material:material", version.ref = "mdc_version" } +kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesAndroid" } +advrecyclerview = { module = "com.h6ah4i.android.widget.advrecyclerview:advrecyclerview", version.ref = "advrecyclerview" } +fadingedgelayout = { module = "com.github.bosphere.android-fadingedgelayout:fadingedgelayout", version.ref = "fadingedgelayout" } +keyboardvisibilityevent = { module = "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent", version.ref = "yslibrary_keyboardvisibilityevent_version" } +jetradarmobile-android-snowfall = { module = "com.github.jetradarmobile:android-snowfall", version.ref = "jetradarmobile_androidSnowfall_version" } +chrisbanes-insetter = { module = "dev.chrisbanes.insetter:insetter", version.ref = "chrisbanes_insetter_version" } +org-eclipse-egit-github-core = { module = "org.eclipse.mylyn.github:org.eclipse.egit.github.core", version.ref = "orgEclipseEgitGithubCore" } +jaudiotagger = { module = "com.github.Adonai:jaudiotagger", version.ref = "jaudiotagger" } +android-lab-library = { module = "com.anjlab.android.iab.v3:library", version.ref = "android_tab_library_version" } +slidableactivity = { module = "com.r0adkll:slidableactivity", version.ref = "slidableactivity" } +material-intro = { module = "com.heinrichreimersoftware:material-intro", version.ref = "materialIntro" } +dhaval2404-imagepicker = { module = "com.github.dhaval2404:imagepicker", version.ref = "dhaval2404_imagepicker_version" } +fastscroll-library = { module = "me.zhanghai.android.fastscroll:library", version.ref = "fast_scroll_libraryVersion" } +customactivityoncrash = { module = "cat.ereza:customactivityoncrash", version.ref = "customactivityoncrash" } +tankery-circularSeekBar = { module = "me.tankery.lib:circularSeekBar", version.ref = "tankery_circularSeekBar_version" } +androidx-mediarouter = { group = "androidx.mediarouter", name = "mediarouter", version.ref = "mediarouter" } +nanohttpd = { group = "org.nanohttpd", name = "nanohttpd", version.ref = "nanohttpd" } + + +#androidx +androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat_version" } +androidx-annotation = { group = "androidx.annotation", name = "annotation", version = "1.6.0" } +androidx-constraintLayout = { group = "androidx.constraintlayout", name = "constraintlayout", version = "2.1.4" } +androidx-recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version = "1.3.0" } +androidx-preference-ktx = { group = "androidx.preference", name = "preference-ktx", version.ref = "preference_version" } +androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core_version" } +androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" } +androidx-palette-ktx = { group = "androidx.palette", name = "palette-ktx", version = "1.0.0" } + + + +#buildscripts dependencies +gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" } +androidx-navigation-safeargs-plugin = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation_version" } +kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinGradlePlugin" } + +[plugins] +github-ben-manes = { id = "com.github.ben-manes.versions", version.ref = "ben_manes_versoin" } +google-devtools-ksp = { id = "com.google.devtools.ksp", version.ref = "devTools_ksp_version" } \ No newline at end of file