0
Gradle 작업에서 원격 git repo로 푸시하려고합니다. 내가 찾은 가장 좋은 방법은 여기 Gradle-Git이라는 플러그인을 사용하는 것입니다 : https://github.com/ajoberstar/gradle-git사용자 정의 Gradle Task가 실패합니다 - GitPush를 찾을 수 없습니다
기본적으로 푸시 작업을 실행할 수 있도록 시도하고 거기에서부터 프로젝트 구성에 사용하도록 구성하려고합니다. .
다음은 내 build.gradle 스크립트의 모양입니다.
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"
}
내 오류가
FAILURE: Build failed with an exception.
* Where:
Build file '[my_path]\build.gradle' line: 19
* What went wrong:
A problem occurred evaluating root project 'Name'.
> Could not find property 'GitPush' on root project 'Name'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
하고 --stacktrace 실행 여기에 예외 로그를 생성합니다 http://pastebin.com/uqjf5U5k
감사합니다. 완벽하게 작동합니다. 나는 이미 별도의 buildscript 블록을 만드는 대신 해당 섹션에 라인을 추가 할 수있는 리포지토리 및 종속성 블록을 이미 가지고 있기 때문에이를 가정했습니다. – twbbas