android / android/architecture-templates

The Kotlin Gradle plugin was loaded multiple times

Open
#140 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
3.2k
Forks
384
PR merge metrics
No merged PRs in 30d

Description

Getting this warning when building the project:

```
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal.
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.
If the parent project does not need the plugin, add 'apply false' to the plugin line.
See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl
The Kotlin plugin was loaded in the following projects: ':app', ':core-data', ':core-database'

```

Is it something that needs to be fixed?

Edit: Using the sub-modules with Version Catalog

Contributor guide

Open the contributing guide

Research direction

Review the Gradle plugin declarations for :app, :core-data, and :core-database, starting with the shared or root project configuration and the version-catalog setup mentioned in the edit. Reproduce the build warning, then verify that the Kotlin Gradle plugin is loaded only once and the warning is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.