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

Plugin not found when using the new Plugin DSL notation in build.gradle #36

Closed
thugcee opened this issue Aug 27, 2018 · 4 comments · Fixed by #80
Closed

Plugin not found when using the new Plugin DSL notation in build.gradle #36

thugcee opened this issue Aug 27, 2018 · 4 comments · Fixed by #80

Comments

@thugcee
Copy link

thugcee commented Aug 27, 2018

Plugin configuration:

settings.gradle:

pluginManagement {
  repositories {
      gradlePluginPortal()
      maven { url = uri("https://jitpack.io") }
  }
}

build.gradle:

plugins {
    [...]
    id 'com.epages.restdocs-openapi' version '0.2.1'
}

Generated urls are different for classic configuration using buildscript and a new one with plugins:

https://jitpack.io/com/github/epages-de/restdocs-openapi/restdocs-openapi-gradle-plugin/0.2.1/restdocs-openapi-gradle-plugin-0.2.1.pom
https://jitpack.io/com/epages/restdocs-openapi/com.epages.restdocs-openapi.gradle.plugin/0.2.1/com.epages.restdocs-openapi.gradle.plugin-0.2.1.pom

The first one is from buildscript and works.

@mduesterhoeft
Copy link
Contributor

Currently we are not publishing the plugin to the gradle plugin portal, but only to jitpack. The jitpack convention for groupname and artifact id is a little odd.

You could try to add a custom resolutionStrategy like explained here - https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_resolution_rules

@thugcee
Copy link
Author

thugcee commented Aug 28, 2018

hmm... Then maybe I should create an issue in jitpack's tracker.

Some info which can be useful for you:
https://vkuzel.com/publishing-gradle-plugin-plugins-dsl-on-jitpack-io (Publishing Gradle plugin (plugins DSL) on JitPack.io)
And it works for this plugin https://github.com/vkuzel/Quantum-Leap-Gradle-Plugin

@mduesterhoeft
Copy link
Contributor

Ok than it might be also enough to change the plugin id. I will try this out.

@chadlwilson
Copy link
Contributor

chadlwilson commented Mar 17, 2019

Hello @klieber @mduesterhoeft - with the removal of Jitpack; does that make it easier to get this plugin published to plugins.gradle.org? Would be great to get rid of need for buildscript blocks. This is the only plugin of 11 that we use that requires use of buildscript.

Edit: I'm intending to submit a PR for this; just waiting for my test publish to be approved so I can validate it's working fine.

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 a pull request may close this issue.

3 participants