groovy - Apply gradle custom jar plugin -
i've created simple groovy-based plugin gradle.
in gradle.build file have following:
apply plugin: 'groovy' dependencies { compile gradleapi() compile localgroovy() }
everything works great, build directory , .jar generated in lib folder, guess standalone plugin.
now want know how register new plugin gradle instalation, can apply plugin: 'myplugin' i've done following:
- droped plugin plugin folder in installation
- created myplugin.properties file , included in meta-inf folder
- placed same properties file in meta-inf in src dir (act of desperation)
well after every step when try apply plugin error:
- plugin id 'myplugin' not found
how can right??
can state list of steps plugin working? (im new gradle+groovy)
thanks help
the chapter 58 of user guide has information need. in summary:
- put
myplugin.properties
inside project structure, in src/main/resources/meta-inf /gradle-plugins/ - build jar do
in script wish use plugin, add
buildscript
closure like:buildscript { repositories { flatdir dirs: "build/libs" } dependencies { classpath "your.group:your-plugin:1.0.0" } }
or whatever settings repositories
, dependencies
wish, need use classpath
configuration i've done here. don't think can (or should!) add jar plugin dir of gradle did.
Comments
Post a Comment