I have a simple gradle plugin,
Can I deploy a gradle plugin on jitpack?
Can I deploy a gradle plugin on jitpack?
You can, but IMHO it doesn't make much sense, since Gradle plug-ins are supposed to be hosted on https://plugins.gradle.org/
Bringing this back, but do you have an example somewhere? Hosting plugins for jitpack is definitely useful if you'd like to keep everything inline with other dependencies. With one push, you'll be able to use the commit versions, assuming that is how it works.
Same question. I am working on a plugin that I don't want to publish yet but I want to test it already...
Same question. It is annoying for me to wait for gradle to manually approve my plugin.
Hi, any news on this?
Let the code explain:
apply plugin: 'java'
apply plugin: 'plugin-id'
buildscript() {
repositories {
maven {
url 'https://jitpack.io'
}
}
dependencies {
classpath 'com.github.User:Repo:Version'
}
}
Example:
apply plugin: 'java'
apply plugin: 'jamplate'
buildscript() {
repositories {
maven {
url 'https://jitpack.io'
}
}
dependencies {
//replace 'TAG' with the desired version
classpath 'com.github.cufyorg:jamplate-gradle-plugin:TAG'
}
}
Awesome, let me try
@LSafer
Did you try to make this work with the new plugins { } dsl?
@elect86 yes I did. But, it was a long time for me to remember the conclusion. I think it is not possible. But, It might work by playing around with plugin repositories.
@elect86 see the plugin I published https://github.com/cufyorg/jamplate-gradle-plugin for latest updates of my approaches to deliver it.
Gotcha!
build.gradle.kts:
plugins {
...
id("com.github.elect86.docs") version "5335fdf4"
}
settings.gradle.kts:
pluginManagement {
resolutionStrategy {
eachPlugin {
if(requested.id.toString() == "com.github.elect86.docs")
useModule("com.github.elect86:docs:5335fdf4")
}
}
repositories {
gradlePluginPortal()
maven("https://jitpack.io")
}
}
And make sure to set the id plugin as the annotation:
gradlePlugin {
// Define the plugin
val greeting by plugins.creating {
id = "com.github.elect86.docs"
implementationClass = "docs.DocsPlugin"
}
}
And you are good to rock!
Most helpful comment
Same question. It is annoying for me to wait for gradle to
manuallyapprove my plugin.