I created a simple gradle plugin inside project. According to the doc it should be fine but when I try to use it I get Plugin with id 'show-date-plugin' not found.
Doc I'm referring to:
https://docs.gradle.org/current/userguide/custom_plugins.html
You can put the source for the plugin in the rootProjectDir/buildSrc/src/main/groovy directory. Gradle will take care of compiling and testing the plugin and making it available on the classpath of the build script. The plugin is visible to every build script used by the build. However, it is not visible outside the build, and so you cannot reuse the plugin outside the build it is defined in.
This is my build.gradle
plugins {
id 'java'
id 'groovy'
}
group 'info.garagesalesapp'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.12'
compile gradleApi()
compile localGroovy()
compile project(':json-display')
testCompile group: 'junit', name: 'junit', version: '4.12'
}
apply plugin: 'project-report'
apply plugin: 'show-date-plugin'
This is pluging location in project:
So what am I doing wrong?