The plugin hasn't been updated for quite some time and it currently
breaks the build and apk publishing. This PR removes it along its
configuration and any additional setup code.
The plugin was already removed from the publishing process as it
didn't work anymore. See https://github.com/ankidroid/Anki-Android/issues/14161
* version catalog conflict
solve
* implementing version catalog for stable versioning between modules
* implementing version catalog for stable versioning between modules
---------
Co-authored-by: abdelrahmanesam <abdelrahmanesam>
Ideally we would use
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) to enforce
the repositories declared in settings.gradle.kts but it currently
conflicts with a local maven repository declared in
robolectricDownloader.gradle.
The repositories lambda wasn't deleted from the AnkiDroid module as
the build failed in relation to "com.android.tools:desugar_jdk_libs"(
most likely and issue with the dependency itself) with the error:
Could not resolve all dependencies for configuration ':AnkiDroid:coreLibraryDesugaring'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.1.1/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
Could not find com.android.tools:desugar_jdk_libs:2.0.3.
Searched in the following locations:
- file:/home/*/.m2/repository/com/android/tools/desugar_jdk_libs/2.0.3/desugar_jdk_libs-2.0.3.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :AnkiDroid
See https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block
The plugins that are to be used in different modules are added in the
top level build file with apply "false"(doesn't make sense to apply
them on the root project). Then the project modules, from the plugins
already available on the classpath, actually apply the ones they need.
Ktlint plugin was applied directly to all subprojects(initially it
was added through allprojects {} but it doesn't make sense to add it
to the root project as it doesn't contain source code, so
subprojects{} was used instead).
The amazonappstorepublisher plugin also required some custom
configuration as we need the latest versions which are not available
in mavenCentral() but can be fetched from jitpack.io.