This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
apply plugin: 'maven' | |
configurations { jgit } | |
repositories { | |
mavenRepo url: 'http://download.eclipse.org/jgit/maven' | |
mavenCentral() | |
} | |
dependencies { | |
jgit 'org.eclipse.jgit:org.eclipse.jgit:2.1.0.201209190230-r' | |
jgit 'org.eclipse.jgit:org.eclipse.jgit.ant:2.1.0.201209190230-r' | |
} | |
task gitInit << { | |
def basedir = '.' | |
ant.taskdef(classpath:configurations.jgit.asPath | |
, resource:"org/eclipse/jgit/ant/ant-tasks.properties" | |
) | |
ant.'git-init'(dest:".") | |
} |
JGitのantタスクからよびだせるgitのサブコマンドは、add, clone, checkout, initだけのようなので、複雑なことをするのであれば、Execタスクを使ってコマンドラインのgitを呼び出したほうがよさそう。
0 件のコメント:
コメントを投稿