[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) -- Migrating Build.Gradle to Version Catlog #21029

Draft
wants to merge 81 commits into
base: trunk
Choose a base branch
from

Conversation

neeldoshii
Copy link
Contributor
@neeldoshii neeldoshii commented Jul 3, 2024

Description

This PR focuses currently on migrating our gradle files to newly introduced version catlog. Currently this PR is WIP the plugin are yet to be migrated as well some dependency.

I have relied on and trusting everything working fine by performing unit test. Trusting CI ATM.

Checklist [TODO]

  • Reorder the versions in alphabetical order.
  • Ensure every version is defined in camel-case format.
  • Drop the “Version” suffix from every version definition.
  • Reorder the libraries in alphabetical order.
  • Change the libraries from camel-case format to dash-case.
  • Keep the versions and libraries ordered alphabetically without any logical grouping. Optimize later.

@neeldoshii neeldoshii changed the title Migrated Dependency to Version Catlog (WIP) -- Migrated Dependency to Version Catlog Jul 3, 2024
build.gradle Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
@@ -390,143 +390,146 @@ dependencies {
}
}

implementation ("com.automattic:rest:$automatticRestVersion") {
implementation (libs.automatticRest) {
exclude group: 'com.mcxiaoke.volley'
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what exclude type of dependency working is it over here?

For this I have used version catlog declaration as usual group , name, version no

automatticRest = { group = "com.automattic", name = "rest", version.ref = "automatticRestVersion" }

But at some place its requiring Module Declaration and why is that so I didnt found much of it online.

For example at Line No 458, for using ucrop normal version catlog declaration it was giving error it required me to used module. So my main question is when to use modules?

ucrop = { module = "com.github.yalantis:ucrop", version.ref = "uCropVersion" }
    implementation (libs.ucrop) {
        exclude group: 'androidx.core', module: 'core'
        exclude group: 'androidx.constraintlayout', module: 'constraintlayout'
        exclude group: 'androidx.appcompat', module: 'appcompat'
    }
    

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @neeldoshii , please don't worry about these, all this dependency configuration shouldn't affect your work with version catalogs. As such, just like you did with libs.ucrop, I suggest updating the dependency to version catalogs but keeping the extra configuration unchanged.

FYI: The exclude group vs. group + module diff is just that:

  • When using exclude group only, then you instruct the dependency to exclude all dependencies from the specified group, regardless of the module name. Think multiple dependencies with the same group name.
  • When using exclude group + module, then you instruct the dependency to exclude only the specific module of that specific group.

I hope that helps? 🙏

@neeldoshii neeldoshii marked this pull request as draft July 3, 2024 14:45
@neeldoshii neeldoshii changed the title (WIP) -- Migrated Dependency to Version Catlog (WIP) -- Migrating Build.Gradle to Version Catlog Jul 3, 2024
@neeldoshii
Copy link
Contributor Author

Patch

Subject: [PATCH] Plugin Migration Throws Error
---
Index: gradle/libs.versions.toml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
--- a/gradle/libs.versions.toml	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/gradle/libs.versions.toml	(date 1720040180034)
@@ -68,6 +68,7 @@
 androidxViewpager2Version = '1.0.0'
 squareupKotlinPoetVersion = '1.16.0'
 
+agpVersion = '8.1.0'
 
 [libraries]
 androidxWebkit = { group = "androidx.webkit", name = "webkit", version.ref = "webkit" }
@@ -217,4 +218,6 @@
 
 
 [plugins]
+androidApplication = { id = "com.android.application", version.ref = "agpVersion"}
+androidLibrary = { id = "com.android.library", version.ref = "agpVersion"}
 
Index: settings.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/settings.gradle b/settings.gradle
--- a/settings.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/settings.gradle	(date 1720037125923)
@@ -1,7 +1,7 @@
 pluginManagement {
     gradle.ext.kotlinVersion = '1.9.22'
     gradle.ext.kspVersion = '1.9.22-1.0.17'
-    gradle.ext.agpVersion = '8.1.0'
+    //gradle.ext.agpVersion = '8.1.0'
     gradle.ext.googleServicesVersion = '4.3.15'
     gradle.ext.navigationVersion = '2.7.7'
     gradle.ext.sentryVersion = '4.3.1'
@@ -18,8 +18,8 @@
         id "org.jetbrains.kotlin.plugin.serialization" version gradle.ext.kotlinVersion
         id "org.jetbrains.kotlin.plugin.parcelize" version gradle.ext.kotlinVersion
         id "org.jetbrains.kotlin.plugin.allopen" version gradle.ext.kotlinVersion
-        id "com.android.application" version gradle.ext.agpVersion
-        id "com.android.library" version gradle.ext.agpVersion
+        alias(libs.plugins.androidApplication)
+        alias(libs.plugins.androidLibrary)
         id 'com.google.gms.google-services' version gradle.ext.googleServicesVersion
         id "androidx.navigation.safeargs.kotlin" version gradle.ext.navigationVersion
         id "io.sentry.android.gradle" version gradle.ext.sentryVersion

Error :

A problem occurred evaluating settings 'WordPress-Android'.

Could not get unknown property 'libs' for object of type org.gradle.plugin.management.internal.DefaultPluginManagementSpec$PluginDependenciesSpecImpl.

I am little confused over why is plugins throwing error. Its my first time working on module gradle builds.

Copy link
Contributor
@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @neeldoshii and thanks for this contribution!

I have reviewed this draft and also tried to make the plugins libs working, timeboxing my efforts for now, here my advise to you:

  1. Suggestion (💡): Let's focus on introducing Version Catalogs for libraries only. I think that migrating plugins to Version Catalogs might require some additional effort and extra Gradle build knowledge as this repo and its Gradle configuration is not that straightforward*.
  2. Warning (⚠️): First, try and study first this nowinandroid and other such open-source repositories, that is, their Version Catalogs configuration. You will notice a few patterns there. I want us to bring these patterns into this repo as well. For example:
    • Notice that every version there is defined in an alphabetical order, you need to reorder ours.
    • Notice that every version there is defined in camel-case format, you did that, great! ✅
    • Notice that every version there is defined without the Version suffix, you can drop it too.
    • Notice that every library these is defined in an alphabetical order, you need to reorder ours.
    • Notice that every library these is defined in dash-case, you need to change the camel-case format to dash-case.
    • Finally, there is no need to group version or libraries in some kind of logical way, let's keep it simple for now and optimize later, just order them alphabetical.
  3. Suggestion (💡): You did it all in a single commit, this makes it a bit difficult for a reviewer to verify that everything was done appropriately and nothing got slipped in or out. As such, please consider moving each dependency into Version Catalogs on a separate commit. Take this work here as an example, you should probably try a similar strategy. I am suggesting that because looking at diffs like this doesn't make it easy for a reviewer, each line doesn't correspond to a specific migration change, thus it is quite easy to make mistakes, both during development and while reviewing.

I hope the above will help guide you with this migration effort, one step at a time. I am here to support you all the way! 🙏

(*): I quickly tried migrating plugins too but got stuck on this exception below and couldn't progress any further:

Error resolving plugin [id: 'com.android.application', version: '8.1.0']
> The request for this plugin could not be satisfied because the plugin is already on the classpath with an unknown version, so compatibility cannot be checked.

@ParaskP7
Copy link
Contributor
ParaskP7 commented Jul 4, 2024

I am little confused over why is plugins throwing error. Its my first time working on module gradle builds.

Btw @neeldoshii , this patch that you shared wouldn't work. With Version Catalogs you don't need this pluginManagement { plugins { ... } } block anymore and can instead use alias(libs.plugins.android.application) directly where needed. Also, you should probably utilize the dependencyResolutionManagement { ... } block too.

As per my review comment above please try looking at how other projects have dealt with this migration and see if you can move forward. 🤞

@ParaskP7
Copy link
Contributor
ParaskP7 commented Jul 4, 2024

@neeldoshii btw, with help from @wzieba (🙇) I managed to make plugins compile, see patch below:

Expand to Patch
Subject: [PATCH] Working Plugins Migration
---
Index: libs/processors/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/processors/build.gradle b/libs/processors/build.gradle
--- a/libs/processors/build.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/libs/processors/build.gradle	(date 1720098732780)
@@ -1,6 +1,6 @@
 plugins {
-    id "org.jetbrains.kotlin.jvm"
-    id "org.jetbrains.kotlinx.kover"
+    alias(libs.plugins.kotlin.jvm)
+    alias(libs.plugins.kover)
 }
 
 sourceCompatibility = JavaVersion.VERSION_1_8
@@ -11,12 +11,12 @@
 
     implementation libs.squareupKotlinPoet
     implementation libs.squareupKotlinPoetKsp
-    implementation "com.google.devtools.ksp:symbol-processing-api:$gradle.ext.kspVersion"
+    implementation libs.ksp.sympol.processing.api
 
     def kctVersion = "1.5.0"
     testImplementation "com.github.tschuchortdev:kotlin-compile-testing:$kctVersion"
     testImplementation "com.github.tschuchortdev:kotlin-compile-testing-ksp:$kctVersion"
     testImplementation libs.junit
     testImplementation libs.assertj
-    testImplementation "org.jetbrains.kotlin:kotlin-reflect:$gradle.ext.kotlinVersion"
+    testImplementation libs.kotlin.reflect
 }
Index: libs/networking/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/networking/build.gradle b/libs/networking/build.gradle
--- a/libs/networking/build.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/libs/networking/build.gradle	(date 1720097537135)
@@ -1,5 +1,5 @@
 plugins {
-    id "com.android.library"
+    alias(libs.plugins.android.library)
 }
 
 android {
Index: settings.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/settings.gradle b/settings.gradle
--- a/settings.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/settings.gradle	(date 1720098074784)
@@ -1,36 +1,4 @@
 pluginManagement {
-    gradle.ext.kotlinVersion = '1.9.22'
-    gradle.ext.kspVersion = '1.9.22-1.0.17'
-    gradle.ext.agpVersion = '8.1.0'
-    gradle.ext.googleServicesVersion = '4.3.15'
-    gradle.ext.navigationVersion = '2.7.7'
-    gradle.ext.sentryVersion = '4.3.1'
-    gradle.ext.daggerVersion = "2.50"
-    gradle.ext.detektVersion = '1.23.0'
-    gradle.ext.violationCommentsVersion = '1.70.0'
-    gradle.ext.measureBuildsVersion = '2.1.2'
-    gradle.ext.koverVersion = '0.7.5'
-    gradle.ext.dependencyAnalysisVersion = '1.28.0'
-
-    plugins {
-        id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
-        id "org.jetbrains.kotlin.jvm" version gradle.ext.kotlinVersion
-        id "org.jetbrains.kotlin.plugin.serialization" version gradle.ext.kotlinVersion
-        id "org.jetbrains.kotlin.plugin.parcelize" version gradle.ext.kotlinVersion
-        id "org.jetbrains.kotlin.plugin.allopen" version gradle.ext.kotlinVersion
-        id "com.android.application" version gradle.ext.agpVersion
-        id "com.android.library" version gradle.ext.agpVersion
-        id 'com.google.gms.google-services' version gradle.ext.googleServicesVersion
-        id "androidx.navigation.safeargs.kotlin" version gradle.ext.navigationVersion
-        id "io.sentry.android.gradle" version gradle.ext.sentryVersion
-        id "io.gitlab.arturbosch.detekt" version gradle.ext.detektVersion
-        id "se.bjurr.violations.violation-comments-to-github-gradle-plugin" version gradle.ext.violationCommentsVersion
-        id 'com.automattic.android.measure-builds' version gradle.ext.measureBuildsVersion
-        id "org.jetbrains.kotlinx.kover" version gradle.ext.koverVersion
-        id "com.google.dagger.hilt.android" version gradle.ext.daggerVersion
-        id "com.google.devtools.ksp" version gradle.ext.kspVersion
-        id "com.autonomousapps.dependency-analysis" version gradle.ext.dependencyAnalysisVersion
-    }
     repositories {
         maven {
             url 'https://a8c-libs.s3.amazonaws.com/android'
Index: WordPress/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/WordPress/build.gradle b/WordPress/build.gradle
--- a/WordPress/build.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/WordPress/build.gradle	(date 1720098452773)
@@ -3,16 +3,16 @@
 import se.bjurr.violations.lib.model.SEVERITY
 
 plugins {
-    id "com.android.application"
-    id "org.jetbrains.kotlin.android"
-    id "org.jetbrains.kotlin.plugin.parcelize"
-    id "org.jetbrains.kotlin.plugin.allopen"
-    id "io.sentry.android.gradle"
-    id "se.bjurr.violations.violation-comments-to-github-gradle-plugin"
-    id "com.google.gms.google-services"
-    id "com.google.dagger.hilt.android"
-    id "org.jetbrains.kotlinx.kover"
-    id "com.google.devtools.ksp"
+    alias(libs.plugins.android.application)
+    alias(libs.plugins.kotlin.android)
+    alias(libs.plugins.kotlin.parcelize)
+    alias(libs.plugins.kotlin.allopen)
+    alias(libs.plugins.sentry)
+    alias(libs.plugins.violation.comments)
+    alias(libs.plugins.google.services)
+    alias(libs.plugins.dagger)
+    alias(libs.plugins.kover)
+    alias(libs.plugins.ksp)
 }
 
 sentry {
@@ -474,10 +474,10 @@
     implementation (libs.googleExoPlayer) {
         exclude group: 'com.android.support', module: 'support-annotations'
     }
-    implementation "com.google.dagger:dagger-android-support:$gradle.ext.daggerVersion"
-    ksp "com.google.dagger:dagger-android-processor:$gradle.ext.daggerVersion"
-    implementation "com.google.dagger:hilt-android:$gradle.ext.daggerVersion"
-    ksp "com.google.dagger:hilt-compiler:$gradle.ext.daggerVersion"
+    implementation libs.dagger.android.support
+    ksp libs.dagger.android.processor
+    implementation libs.dagger.hilt.android
+    ksp libs.dagger.hilt.compiler
 
     testImplementation(libs.androidxCoreTesting, {
         exclude group: 'com.android.support', module: 'support-compat'
@@ -486,7 +486,7 @@
     })
     testImplementation libs.junit
     testImplementation libs.mockitoKotlin
-    testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$gradle.ext.kotlinVersion"
+    testImplementation libs.kotlin.test.junit
     testImplementation libs.assertj
     testImplementation libs.kotlinxCoroutinesTest
 
@@ -530,8 +530,8 @@
     }
     androidTestImplementation (name:'cloudtestingscreenshotter_lib', ext:'aar') // Screenshots on Firebase Cloud Testing
     androidTestImplementation libs.androidxWorkManagerTesting
-    androidTestImplementation "com.google.dagger:hilt-android-testing:$gradle.ext.daggerVersion"
-    kspAndroidTest "com.google.dagger:hilt-android-compiler:$gradle.ext.daggerVersion"
+    androidTestImplementation libs.dagger.hilt.android.testing
+    kspAndroidTest libs.dagger.hilt.android.compiler
     // Enables Java 8+ API desugaring support
     coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$androidDesugarVersion"
     lintChecks "org.wordpress:lint:$wordPressLintVersion"
Index: libs/annotations/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/annotations/build.gradle b/libs/annotations/build.gradle
--- a/libs/annotations/build.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/libs/annotations/build.gradle	(date 1720097537133)
@@ -1,5 +1,5 @@
 plugins {
-    id "org.jetbrains.kotlin.jvm"
+    alias(libs.plugins.kotlin.jvm)
 }
 
 sourceCompatibility = JavaVersion.VERSION_1_8
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle b/build.gradle
--- a/build.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/build.gradle	(date 1720099117001)
@@ -2,15 +2,18 @@
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 plugins {
-    id "io.gitlab.arturbosch.detekt"
-    id 'com.automattic.android.measure-builds'
-    id "org.jetbrains.kotlinx.kover"
-    id "com.autonomousapps.dependency-analysis"
-    id "androidx.navigation.safeargs.kotlin" apply false
-    id "com.android.library" apply false
-    id 'com.google.gms.google-services' apply false
-    id "org.jetbrains.kotlin.plugin.parcelize" apply false
-    id "com.google.devtools.ksp" apply false
+    alias(libs.plugins.detekt)
+    alias(libs.plugins.measure.builds)
+    alias(libs.plugins.kover)
+    alias(libs.plugins.dependency.analysis)
+    alias(libs.plugins.navigation.safeargs).apply(false)
+    alias(libs.plugins.android.application).apply(false)
+    alias(libs.plugins.android.library).apply(false)
+    alias(libs.plugins.google.services).apply(false)
+    alias(libs.plugins.kotlin.android).apply(false)
+    alias(libs.plugins.kotlin.jvm).apply(false)
+    alias(libs.plugins.kotlin.parcelize).apply(false)
+    alias(libs.plugins.ksp).apply(false)
 }
 
 ext {
@@ -95,7 +98,7 @@
     }
 
     detekt {
-        toolVersion = gradle.ext.detektVersion
+//        toolVersion = gradle.ext.detektVersion
         baseline = file("${project.rootDir}/config/detekt/baseline.xml")
         config = files("${project.rootDir}/config/detekt/detekt.yml")
         autoCorrect = false
@@ -185,7 +188,7 @@
 }
 
 dependencies {
-    detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:$gradle.ext.detektVersion"
+    detektPlugins libs.detekt.formatting
 }
 
 apply from: './config/gradle/code_coverage.gradle'
Index: libs/analytics/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/analytics/build.gradle b/libs/analytics/build.gradle
--- a/libs/analytics/build.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/libs/analytics/build.gradle	(date 1720097537133)
@@ -1,5 +1,5 @@
 plugins {
-    id "com.android.library"
+    alias(libs.plugins.android.library)
 }
 
 repositories {
Index: libs/image-editor/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/image-editor/build.gradle b/libs/image-editor/build.gradle
--- a/libs/image-editor/build.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/libs/image-editor/build.gradle	(date 1720098586091)
@@ -1,9 +1,9 @@
 plugins {
-    id "com.android.library"
-    id "org.jetbrains.kotlin.android"
-    id "org.jetbrains.kotlin.plugin.parcelize"
-    id "androidx.navigation.safeargs.kotlin"
-    id "org.jetbrains.kotlinx.kover"
+    alias(libs.plugins.android.library)
+    alias(libs.plugins.kotlin.android)
+    alias(libs.plugins.kotlin.parcelize)
+    alias(libs.plugins.navigation.safeargs)
+    alias(libs.plugins.kover)
 }
 
 android {
@@ -56,8 +56,8 @@
     implementation libs.androidxConstraintLayout
     implementation libs.androidxViewpager2
     implementation libs.googleMaterial
-    implementation "androidx.navigation:navigation-fragment:$gradle.ext.navigationVersion"
-    implementation "androidx.navigation:navigation-ui:$gradle.ext.navigationVersion"
+    implementation libs.navigation.fragment
+    implementation libs.navigation.ui
     implementation libs.lifecycleCommon
     implementation libs.lifecycleRuntime
     implementation libs.lifecycleViewmodel
Index: gradle/libs.versions.toml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
--- a/gradle/libs.versions.toml	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/gradle/libs.versions.toml	(date 1720099054787)
@@ -1,4 +1,17 @@
 [versions]
+agp = "8.1.0"
+dagger = "2.50"
+dependencyAnalysis = "1.28.0"
+detekt = "1.23.0"
+googleServices = "4.3.15"
+kotlin = "1.9.22"
+kover = "0.7.5"
+ksp = "1.9.22-1.0.17"
+measureBuilds = "2.1.2"
+navigation = "2.7.7"
+sentry = "4.3.1"
+violationComments = "1.70.0"
+
 #libs
 webkit = '1.11.0'
 androidxComposeNavigationVersion = '2.7.6'
@@ -70,6 +83,19 @@
 
 
 [libraries]
+dagger-android-support = { group = "com.google.dagger", name = "dagger-android-support", version.ref = "dagger" }
+dagger-android-processor = { group = "com.google.dagger", name = "dagger-android-processor", version.ref = "dagger" }
+dagger-hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "dagger" }
+dagger-hilt-android-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "dagger" }
+dagger-hilt-android-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "dagger" }
+dagger-hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "dagger" }
+detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" }
+kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
+kotlin-test-junit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin" }
+ksp-sympol-processing-api = { group = "com.google.devtools.ksp", name = "symbol-processing-api", version.ref = "ksp" }
+navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigation" }
+navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "navigation" }
+
 androidxWebkit = { group = "androidx.webkit", name = "webkit", version.ref = "webkit" }
 androidxNavigation = { group = "androidx.navigation", name = "navigation-compose", version.ref = "androidxComposeNavigationVersion" }
 automatticRest = { group = "com.automattic", name = "rest", version.ref = "automatticRestVersion" }
@@ -203,18 +229,20 @@
 squareupKotlinPoet = { group = "com.squareup", name = "kotlinpoet", version.ref ="squareupKotlinPoetVersion" }
 squareupKotlinPoetKsp = { group = "com.squareup", name = "kotlinpoet-ksp", version.ref ="squareupKotlinPoetVersion" }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 [plugins]
-
+android-application = { id = "com.android.application", version.ref = "agp" }
+android-library = { id = "com.android.library", version.ref = "agp" }
+dagger = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
+dependency-analysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" }
+detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
+google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
+kotlin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin" }
+kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
+kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
+kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
+ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
+measure-builds = { id = "com.automattic.android.measure-builds", version.ref = "measureBuilds" }
+navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "navigation" }
+sentry = { id = "io.sentry.android.gradle", version.ref = "sentry" }
+violation-comments = { id = "se.bjurr.violations.violation-comments-to-github-gradle-plugin", version.ref = "violationComments" }
Index: libs/editor/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/editor/build.gradle b/libs/editor/build.gradle
--- a/libs/editor/build.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/libs/editor/build.gradle	(date 1720097537134)
@@ -1,8 +1,8 @@
 plugins {
-    id "com.android.library"
-    id "org.jetbrains.kotlin.android"
-    id "org.jetbrains.kotlin.plugin.parcelize"
-    id "org.jetbrains.kotlinx.kover"
+    alias(libs.plugins.android.library)
+    alias(libs.plugins.kotlin.android)
+    alias(libs.plugins.kotlin.parcelize)
+    alias(libs.plugins.kover)
 }
 
 repositories {
Index: libs/mocks/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/mocks/build.gradle b/libs/mocks/build.gradle
--- a/libs/mocks/build.gradle	(revision 549f6797d154f7958ec8a14c25923fb144f04d22)
+++ b/libs/mocks/build.gradle	(date 1720097537134)
@@ -1,5 +1,5 @@
 plugins {
-    id "com.android.library"
+    alias(libs.plugins.android.library)
 }
 
 android {

FYI: This is just as an FYI on how you can make this work and maybe help you unblock.

PS: It seems that the org.jetbrains.kotlin.plugin.serialization plugin is actually unused too.

@neeldoshii
Copy link
Contributor Author

Hi @ParaskP7 👋

Suggestion (💡): You did it all in a single commit, this makes it a bit difficult for a reviewer to verify that everything was done appropriately and nothing got slipped in or out. As such, please consider moving each dependency into Version Catalogs on a separate commit.

  1. Thank for the suggestion! I know this was more for suggestion (💡) but I think it would be more ideal to restructure commit strategy and convert the commits to single commit as either way I need to restructure naming convention. Though, it will take a little rework to me but it will be much better for code review and unwanted mistake and thus save developer code review time.

Notice that every version there is defined in an alphabetical order, you need to reorder ours.
Notice that every version there is defined in camel-case format, you did that, great! ✅
Notice that every version there is defined without the Version suffix, you can drop it too.
Notice that every library these is defined in an alphabetical order, you need to reorder ours.
Notice that every library these is defined in dash-case, you need to change the camel-case format to dash-case.
Finally, there is no need to group version or libraries in some kind of logical way, let's keep it simple for now and optimize later, just order them alphabetical.

  1. Adding this into the description as a task list for myself as a TODO.

@neeldoshii btw, with help from @wzieba (🙇) I managed to make plugins compile, see patch below:

  1. Thank you Petreos & Wojciech for the patch! Should I implement the patch in a single commit as its already review or single one plugin one commit? Wdyt?

neeldoshii and others added 19 commits July 6, 2024 09:21
Co-Authored-By: Petros Paraskevopoulos <9729923+ParaskP7@users.noreply.github.com>
Co-Authored-By: Wojciech Zięba <wojciech.zieba@protonmail.com>
Co-Authored-By: Petros Paraskevopoulos <9729923+ParaskP7@users.noreply.github.com>
Co-Authored-By: Wojciech Zięba <wojciech.zieba@protonmail.com>
@neeldoshii neeldoshii force-pushed the converting-build.gradle-to-version-catlog branch from dd635da to 69ca4aa Compare July 6, 2024 06:09
neeldoshii and others added 7 commits July 6, 2024 15:27
Co-Authored-By: Petros Paraskevopoulos <9729923+ParaskP7@users.noreply.github.com>
Co-Authored-By: Wojciech Zięba <wojciech.zieba@protonmail.com>
Co-Authored-By: Petros Paraskevopoulos <9729923+ParaskP7@users.noreply.github.com>
Co-Authored-By: Wojciech Zięba <wojciech.zieba@protonmail.com>
Co-Authored-By: Petros Paraskevopoulos <9729923+ParaskP7@users.noreply.github.com>
Co-Authored-By: Wojciech Zięba <wojciech.zieba@protonmail.com>
Co-Authored-By: Petros Paraskevopoulos <9729923+ParaskP7@users.noreply.github.com>
Co-Authored-By: Wojciech Zięba <wojciech.zieba@protonmail.com>
Co-Authored-By: Petros Paraskevopoulos <9729923+ParaskP7@users.noreply.github.com>
Co-Authored-By: Wojciech Zięba <wojciech.zieba@protonmail.com>
Co-Authored-By: Petros Paraskevopoulos <9729923+ParaskP7@users.noreply.github.com>
Co-Authored-By: Wojciech Zięba <wojciech.zieba@protonmail.com>
Co-Authored-By: Petros Paraskevopoulos <9729923+ParaskP7@users.noreply.github.com>
Co-Authored-By: Wojciech Zięba <wojciech.zieba@protonmail.com>
@neeldoshii
Copy link
Contributor Author
neeldoshii commented Jul 7, 2024

Almost done with the migration. Same error which you mentioned above is blocking the plugin migration of kotlin and AFP to be completed.

Kotlin Plugin Error

Kotlin Error Log
Error resolving plugin [id: 'org.jetbrains.kotlin.android', version: '1.9.22']
> The request for this plugin could not be satisfied because the plugin is already on the classpath with an unknown version, 
so compatibility cannot be checked.

Patch:

Kotlin Patch
Subject: [PATCH] Kotlin Plugin Error
---
Index: WordPress/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/WordPress/build.gradle b/WordPress/build.gradle
--- a/WordPress/build.gradle	(revision f9371b604d4df2b355cd598ac88638059c084c6f)
+++ b/WordPress/build.gradle	(date 1720295395127)
@@ -4,9 +4,9 @@
 
 plugins {
     id "com.android.application"
-    id "org.jetbrains.kotlin.android"
-    id "org.jetbrains.kotlin.plugin.parcelize"
-    id "org.jetbrains.kotlin.plugin.allopen"
+    alias(libs.plugins.kotlin.android)
+    alias(libs.plugins.kotlin.parcelize)
+    alias(libs.plugins.kotlin.allopen)
     alias(libs.plugins.sentry)
     alias(libs.plugins.violation.comments)
     id "com.google.gms.google-services"
@@ -482,7 +482,7 @@
     })
     testImplementation libs.junit
     testImplementation libs.mockito.kotlin
-    testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$gradle.ext.kotlinVersion"
+    testImplementation libs.kotlin.test
     testImplementation libs.assertj.core
     testImplementation libs.kotlinx.coroutines.test
 
Index: gradle/libs.versions.toml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
--- a/gradle/libs.versions.toml	(revision f9371b604d4df2b355cd598ac88638059c084c6f)
+++ b/gradle/libs.versions.toml	(date 1720295095545)
@@ -53,6 +53,7 @@
 indexosMediaForMobile = '43a9026f0973a2f0a74fa813132f6a16f7499c3a'
 jsoup = '1.16.2'
 junit = '4.13.2'
+kotlin = '1.9.22'
 kotlinxCoroutines = '1.7.3'
 kover = "0.7.5"
 ksp = "1.9.22-1.0.17"
@@ -205,11 +206,18 @@
 wiremock-httpclient-android = { group = "org.apache.httpcomponents", name = "httpclient-android", version.ref ="wiremockHttpClient" }
 wordPress-persistentEditText = { group = "org.wordpress", name = "persistentedittext", version.ref = "wordPressPersistentEditText" }
 zendesk = { group = "com.zendesk", name = "support", version.ref ="zendesk" }
+kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
+kotlin-test-junit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin" }
+
 
 [plugins]
 dagger = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
 dependency-analysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" }
 detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
+kotlin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin" }
+kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
+kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
 kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
 ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
 measure-builds = { id = "com.automattic.android.measure-builds", version.ref = "measureBuilds" }
Index: libs/processors/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/processors/build.gradle b/libs/processors/build.gradle
--- a/libs/processors/build.gradle	(revision f9371b604d4df2b355cd598ac88638059c084c6f)
+++ b/libs/processors/build.gradle	(date 1720294963020)
@@ -1,5 +1,5 @@
 plugins {
-    id "org.jetbrains.kotlin.jvm"
+    alias(libs.plugins.kotlin.jvm)
     alias(libs.plugins.kover)
 }
 
@@ -18,5 +18,5 @@
     testImplementation "com.github.tschuchortdev:kotlin-compile-testing-ksp:$kctVersion"
     testImplementation libs.junit
     testImplementation libs.assertj.core
-    testImplementation "org.jetbrains.kotlin:kotlin-reflect:$gradle.ext.kotlinVersion"
+    testImplementation libs.kotlin.reflect
 }
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle b/build.gradle
--- a/build.gradle	(revision f9371b604d4df2b355cd598ac88638059c084c6f)
+++ b/build.gradle	(date 1720295440359)
@@ -9,7 +9,7 @@
     alias(libs.plugins.navigation.safeargs).apply(false)
     id "com.android.library" apply false
     id 'com.google.gms.google-services' apply false
-    id "org.jetbrains.kotlin.plugin.parcelize" apply false
+    alias(libs.plugins.kotlin.parcelize).apply(false)
     alias(libs.plugins.ksp).apply(false)
 }
 
Index: libs/annotations/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/annotations/build.gradle b/libs/annotations/build.gradle
--- a/libs/annotations/build.gradle	(revision f9371b604d4df2b355cd598ac88638059c084c6f)
+++ b/libs/annotations/build.gradle	(date 1720294724011)
@@ -1,5 +1,5 @@
 plugins {
-    id "org.jetbrains.kotlin.jvm"
+    alias(libs.plugins.kotlin.jvm)
 }
 
 sourceCompatibility = JavaVersion.VERSION_1_8
Index: settings.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/settings.gradle b/settings.gradle
--- a/settings.gradle	(revision f9371b604d4df2b355cd598ac88638059c084c6f)
+++ b/settings.gradle	(date 1720294724007)
@@ -1,14 +1,8 @@
 pluginManagement {
-    gradle.ext.kotlinVersion = '1.9.22'
     gradle.ext.agpVersion = '8.1.0'
     gradle.ext.googleServicesVersion = '4.3.15'
 
     plugins {
-        id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
-        id "org.jetbrains.kotlin.jvm" version gradle.ext.kotlinVersion
-        id "org.jetbrains.kotlin.plugin.serialization" version gradle.ext.kotlinVersion
-        id "org.jetbrains.kotlin.plugin.parcelize" version gradle.ext.kotlinVersion
-        id "org.jetbrains.kotlin.plugin.allopen" version gradle.ext.kotlinVersion
         id "com.android.application" version gradle.ext.agpVersion
         id "com.android.library" version gradle.ext.agpVersion
         id 'com.google.gms.google-services' version gradle.ext.googleServicesVersion
Index: libs/image-editor/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/image-editor/build.gradle b/libs/image-editor/build.gradle
--- a/libs/image-editor/build.gradle	(revision f9371b604d4df2b355cd598ac88638059c084c6f)
+++ b/libs/image-editor/build.gradle	(date 1720294724009)
@@ -1,7 +1,7 @@
 plugins {
     id "com.android.library"
-    id "org.jetbrains.kotlin.android"
-    id "org.jetbrains.kotlin.plugin.parcelize"
+    alias(libs.plugins.kotlin.android)
+    alias(libs.plugins.kotlin.parcelize)
     alias(libs.plugins.navigation.safeargs)
     alias(libs.plugins.kover)
 }
Index: libs/editor/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/editor/build.gradle b/libs/editor/build.gradle
--- a/libs/editor/build.gradle	(revision f9371b604d4df2b355cd598ac88638059c084c6f)
+++ b/libs/editor/build.gradle	(date 1720294724002)
@@ -1,7 +1,7 @@
 plugins {
     id "com.android.library"
-    id "org.jetbrains.kotlin.android"
-    id "org.jetbrains.kotlin.plugin.parcelize"
+    alias(libs.plugins.kotlin.android)
+    alias(libs.plugins.kotlin.parcelize)
     alias(libs.plugins.kover)
 }

AGP Error

AGP Error Log
Error resolving plugin [id: 'com.android.application', version: '8.1.0']
> The request for this plugin could not be satisfied because the plugin is already on the classpath with an unknown version, so compatibility cannot be checked.

Patch

Agp Patch
Subject: [PATCH] AGP Plugin Error
---
Index: WordPress/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/WordPress/build.gradle b/WordPress/build.gradle
--- a/WordPress/build.gradle	(revision fedc84d90abb47c0c7b19745af54953fb3744b4f)
+++ b/WordPress/build.gradle	(date 1720295975159)
@@ -3,7 +3,7 @@
 import se.bjurr.violations.lib.model.SEVERITY
 
 plugins {
-    id "com.android.application"
+    alias(libs.plugins.android.application)
     id "org.jetbrains.kotlin.android"
     id "org.jetbrains.kotlin.plugin.parcelize"
     id "org.jetbrains.kotlin.plugin.allopen"
Index: gradle/libs.versions.toml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
--- a/gradle/libs.versions.toml	(revision fedc84d90abb47c0c7b19745af54953fb3744b4f)
+++ b/gradle/libs.versions.toml	(date 1720295975161)
@@ -1,4 +1,5 @@
 [versions]
+agp = '8.1.0'
 androidInstallReferrer = '2.2'
 androidxActivity = '1.8.0'
 androidxAppcompat = '1.6.1'
@@ -208,6 +209,8 @@
 zendesk = { group = "com.zendesk", name = "support", version.ref ="zendesk" }
 
 [plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+android-library = { id = "com.android.library", version.ref = "agp" }
 dagger = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
 dependency-analysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" }
 detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle b/build.gradle
--- a/build.gradle	(revision fedc84d90abb47c0c7b19745af54953fb3744b4f)
+++ b/build.gradle	(date 1720296082286)
@@ -7,7 +7,7 @@
     alias(libs.plugins.kover)
     alias(libs.plugins.dependency.analysis)
     alias(libs.plugins.navigation.safeargs).apply(false)
-    id "com.android.library" apply false
+    alias(libs.plugins.android.library).apply(false)
     alias(libs.plugins.google.services).apply(false)
     id "org.jetbrains.kotlin.plugin.parcelize" apply false
     alias(libs.plugins.ksp).apply(false)
Index: libs/analytics/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/analytics/build.gradle b/libs/analytics/build.gradle
--- a/libs/analytics/build.gradle	(revision fedc84d90abb47c0c7b19745af54953fb3744b4f)
+++ b/libs/analytics/build.gradle	(date 1720296082280)
@@ -1,5 +1,5 @@
 plugins {
-    id "com.android.library"
+    alias(libs.plugins.android.library)
 }
 
 repositories {
Index: settings.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/settings.gradle b/settings.gradle
--- a/settings.gradle	(revision fedc84d90abb47c0c7b19745af54953fb3744b4f)
+++ b/settings.gradle	(date 1720296082287)
@@ -1,6 +1,6 @@
 pluginManagement {
     gradle.ext.kotlinVersion = '1.9.22'
-    gradle.ext.agpVersion = '8.1.0'
+//    gradle.ext.agpVersion = '8.1.0'
 
     plugins {
         id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
@@ -8,8 +8,6 @@
         id "org.jetbrains.kotlin.plugin.serialization" version gradle.ext.kotlinVersion
         id "org.jetbrains.kotlin.plugin.parcelize" version gradle.ext.kotlinVersion
         id "org.jetbrains.kotlin.plugin.allopen" version gradle.ext.kotlinVersion
-        id "com.android.application" version gradle.ext.agpVersion
-        id "com.android.library" version gradle.ext.agpVersion
     }
     repositories {
         maven {
Index: libs/image-editor/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/image-editor/build.gradle b/libs/image-editor/build.gradle
--- a/libs/image-editor/build.gradle	(revision fedc84d90abb47c0c7b19745af54953fb3744b4f)
+++ b/libs/image-editor/build.gradle	(date 1720296082288)
@@ -1,5 +1,5 @@
 plugins {
-    id "com.android.library"
+    alias(libs.plugins.android.library)
     id "org.jetbrains.kotlin.android"
     id "org.jetbrains.kotlin.plugin.parcelize"
     alias(libs.plugins.navigation.safeargs)
Index: libs/editor/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/editor/build.gradle b/libs/editor/build.gradle
--- a/libs/editor/build.gradle	(revision fedc84d90abb47c0c7b19745af54953fb3744b4f)
+++ b/libs/editor/build.gradle	(date 1720296082282)
@@ -1,5 +1,5 @@
 plugins {
-    id "com.android.library"
+    alias(libs.plugins.android.library)
     id "org.jetbrains.kotlin.android"
     id "org.jetbrains.kotlin.plugin.parcelize"
     alias(libs.plugins.kover)
Index: libs/networking/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/networking/build.gradle b/libs/networking/build.gradle
--- a/libs/networking/build.gradle	(revision fedc84d90abb47c0c7b19745af54953fb3744b4f)
+++ b/libs/networking/build.gradle	(date 1720296082284)
@@ -1,5 +1,5 @@
 plugins {
-    id "com.android.library"
+    alias(libs.plugins.android.library)
 }
 
 android {
Index: libs/mocks/build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/libs/mocks/build.gradle b/libs/mocks/build.gradle
--- a/libs/mocks/build.gradle	(revision fedc84d90abb47c0c7b19745af54953fb3744b4f)
+++ b/libs/mocks/build.gradle	(date 1720296082283)
@@ -1,5 +1,5 @@
 plugins {
-    id "com.android.library"
+    alias(libs.plugins.android.library)
 }
 
 android {

@neeldoshii
Copy link
Contributor Author
neeldoshii commented Jul 7, 2024

FollowUp TODO once the version catalog gets migrated.

  1. (💡) Now that the dependencies and plugins is migrated to version catalog from the android lint it seems we have around 46 outdated versions. something like this Dependency Updates #17551
  2. Android recommends to migrate from groovy to kts. It would be nice if we migrate to kts.
  3. (💡) These are the list of probability of unused dependencies, these will need a thorough lookup in the code as this might be used somewhere so we need to safely remove if not used without breaking the app. This will eventually make the app size smaller if they are unused.
    implementation "com.github.indexos.media-for-mobile:domain:$indexosMediaForMobileVersion"
    implementation "com.github.indexos.media-for-mobile:android:$indexosMediaForMobileVersion"
    implementation "com.github.PhilJay:MPAndroidChart:$philjayMpAndroidChartVersion"
    implementation "com.android.installreferrer:installreferrer:$androidInstallReferrerVersion"
    implementation "org.jsoup:jsoup:$jsoupVersion"
    
    // Firebase - Deprecated
    implementation "com.google.firebase:firebase-iid:$firebaseIidVersion"
  1. Ig we should deprecate our exo player usage and create a tech debt issue regarding migrating to media3. Google has officially deprecated exoplayer.

exoplayer library says

This project is deprecated. All users should migrate to AndroidX Media3. Please refer to our migration guide and script to move your codebase to the Media3 package names.

Wdyt?

@neeldoshii neeldoshii requested a review from ParaskP7 July 7, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants