Created
November 27, 2012 01:41
-
-
Save xconnecting/4151859 to your computer and use it in GitHub Desktop.
Gradle: git init using JGit ant task
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:".") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment