Gradle タスクでリモート git リポジトリにプッシュしようとしています。私が見つけた最良の方法は、https ://github.com/ajoberstar/gradle-git にあるプラグイン Gradle-Git を使用することです。
私は基本的に、プッシュ タスクを実行し、そこから自分のプロジェクトで使用するように構成できるようにしようとしています。
私の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 に例外ログが生成されます。