git - Custom Gradle Task Fails - Can't Find GitPush -
i'm trying push remote git repo in gradle task. best way i've found use plugin gradle-git found here: https://github.com/ajoberstar/gradle-git
i'm trying able run push task , go there configuring used in project.
here's build.gradle script looks like.
apply plugin: 'eclipse' apply plugin: 'groovy' apply plugin: 'maven' apply plugin: 'base' import org.ajoberstar.gradle.git.tasks.* repositories { mavencentral() maven { url "[my custom repository repo]" } } dependencies { compile 'org.ajoberstar:gradle-git:0.4.0' } task push(type: gitpush) { println "test" }
and error is
failure: build failed exception. * where: build file '[my_path]\build.gradle' line: 19 * went wrong: problem occurred evaluating root project 'name'. > not find property 'gitpush' on root project 'name'. * try: run --stacktrace option stack trace. run --info or --debug option more log output. build failed
and running --stacktrace produces exception logs here: http://pastebin.com/uqjf5u5k
you haven't followed instructions on plugin site
to add build itself, need have buildscript
block
buildscript { repositories { mavencentral() } dependencies { classpath 'org.ajoberstar:gradle-git:0.4.0' } }
Comments
Post a Comment