I have built a Gradle plugin and published it to the local maven repository. I can see it in my ~/.m2/repository. However, when I run a Gradle project to use this plugin, it
I think you need to add below URL in buildscript > repositories > maven inside the build.gradle for the project module. See below code for adding the URL for the same:
buildscript {
repositories {
maven {
url = "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
Then you are done.
Hope this will help you :)
All the best.
I think that specifying a custom plugin repository looks promising: this feature lets you configure the plugins{} DSL to resolve from other repositories in addition to the gradle plugin portal. I think you'd want to update your settings.gradle with configuration something along the lines of:
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
}
}
(Note that this code block needs to appear at the top of settings.gradle).