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

Documentation "Declaring Dependencies between Subprojects" is incorrect #19667

Open
LPalmerMSI opened this issue Jan 21, 2022 · 1 comment
Open
Labels
a:bug a:documentation Documentation content in:dependency-declarations variant notation attributes capability substitution

Comments

@LPalmerMSI
Copy link

The documentation located here is incorrect and will not produce a buildable project.

In order for this project to build an additional build.gradle file must also be created that contains the proper plugin for the buildScript project.

Expected Behavior

The documentation should detail steps to create a working multi project build with shared dependencies.

Current Behavior

Non working build.

@jbartok jbartok added in:dependency-declarations variant notation attributes capability substitution in:documentation and removed to-triage labels Jan 24, 2022
@jbartok jbartok added a:bug a:documentation Documentation content labels Jan 24, 2022
@dittos
Copy link

dittos commented Mar 4, 2022

(leaving error messages to be indexed by Google search and help somebody encountering this issue like me 😏)

I followed the Kotlin DSL example.

The error is something like this:

Build file '/Users/user/myproject/api/build.gradle.kts' line: 1

Plugin [id: 'myproject.java-conventions'] was not found in any of the following sources:

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'myproject.java-conventions'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
...

Creating buildSrc/build.gradle.kts with the following script resolved the error.

plugins {
    `kotlin-dsl`
}

repositories {
    // for kotlin-dsl plugin
    gradlePluginPortal()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug a:documentation Documentation content in:dependency-declarations variant notation attributes capability substitution
Projects
None yet
Development

No branches or pull requests

4 participants