Vladyslav Sitalo
09/16/2018, 2:28 PMmaven(url = "<https://jitpack.io>")
• The plugin is published on the gradle plugin portal.
When I’m trying to use the plugin though I’m facing several problems:
• If I just use the plugin via id("org.stvad.kask") version "0.1.1"
entry in plugins
section, the project fails initial configuration, with the following error (basically gradle is looking for dependency in the wrong place and not finding it):
Could not find com.github.Stvad:kask:-SNAPSHOT.
Searched in the following locations:
- file:/Users/sitalov/.gradle/caches/4.10/embedded-kotlin-repo-1.2.60-2/repo/com/github/Stvad/kask/-SNAPSHOT/maven-metadata.xml
- file:/Users/sitalov/.gradle/caches/4.10/embedded-kotlin-repo-1.2.60-2/repo/com/github/Stvad/kask/-SNAPSHOT/kask--SNAPSHOT.jar
- <https://plugins.gradle.org/m2/com/github/Stvad/kask/-SNAPSHOT/maven-metadata.xml>
- <https://plugins.gradle.org/m2/com/github/Stvad/kask/-SNAPSHOT/kask--SNAPSHOT.pom>
- <https://plugins.gradle.org/m2/com/github/Stvad/kask/-SNAPSHOT/kask--SNAPSHOT.jar>
Required by:
project : > org.stvad.kask:org.stvad.kask.gradle.plugin:0.1.1 > org.stvad:kask-gradle-plugin:0.1.1
I can work around that problem by adding the following configuration in the project settings:
kotlin
pluginManagement {
repositories {
gradlePluginPortal()
maven(url = "<https://jitpack.io>")
}
}
Which, works, I guess =/, but I’m surprised I have to do this.
But after that I have more troubles - my understanding was that plugin dependencies should be transitively available to the project using that plugin. But it does not seem to work for me - in order to make the aforementioned library usable from the project that is applying the plugin, I had to explicitly declare repository and dependency configurations.
Which means that to use the plugin properly user would have to: 1) apply it; 2) change plugin repo configuration; 3) add new repo to the project; 4) add explicit library dependency to the project. Which seems rather cumbersome.
What I want to achieve is situation when a user of a plugin just needs to apply it and does not have to worry about dependency any dependency declarations. I’d appreciate your advice on how I can achieve that!Nikky
09/16/2018, 2:43 PMVladyslav Sitalo
09/16/2018, 3:06 PMgradle-plugin repoit’s already there =\
Vladyslav Sitalo
09/16/2018, 3:11 PMVladyslav Sitalo
09/17/2018, 9:08 AM