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

Cannot apply plugin from another .gradle file #85

Closed
burdoto opened this issue Jan 11, 2019 · 4 comments
Closed

Cannot apply plugin from another .gradle file #85

burdoto opened this issue Jan 11, 2019 · 4 comments

Comments

@burdoto
Copy link

burdoto commented Jan 11, 2019

This is my buildscript:

buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.20.0"
    }
}

apply plugin: "io.codearte.nexus-staging"

It is copied 1:1 from the Gradle page, yet I get the following error:

FAILURE: Build failed with an exception.

* Where:
Script '...\gradle\publishing.gradle' line: 14

* What went wrong:
A problem occurred evaluating script.
> Plugin with id 'io.codearte.nexus-staging' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings

CONFIGURE FAILED in 0s
Plugin with id 'io.codearte.nexus-staging' not found.

and i am out of ideas

@szpak
Copy link
Member

szpak commented Jan 11, 2019

Do you have the buildscript {} in your build.gradle or in publishing.gradle? If the later, try to move it (just that block) to the main build.gradle. AFAIR, there is an open issue with the buildscript dependencies defined in other files.

@burdoto
Copy link
Author

burdoto commented Jan 11, 2019

Fixed my issue, thanks 👍

@burdoto burdoto closed this as completed Jan 11, 2019
@szpak
Copy link
Member

szpak commented Jan 11, 2019

Great to hear. You may want to subscribe to that issue to be informed when (if) it is fixed.

@szpak szpak changed the title Cannot implement plugin Cannot apply plugin from another .gradle file Jan 11, 2019
@burdoto
Copy link
Author

burdoto commented Jan 11, 2019

*hear ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants