-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
401ffb2
commit 843932b
Showing
3 changed files
with
39 additions
and
53 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
//import org.ajoberstar.grgit.* | ||
//import org.ajoberstar.gradle.git.tasks.* | ||
import org.ajoberstar.grgit.* | ||
|
||
/* | ||
* This build file was auto generated by running the Gradle 'init' task | ||
|
@@ -9,18 +8,15 @@ | |
* For more details take a look at the Java Quickstart chapter in the Gradle | ||
* user guide available at https://docs.gradle.org/2.11/userguide/tutorial_java_projects.html | ||
*/ | ||
ant.importBuild 'build.xml' | ||
|
||
// Apply the java plugin to add support for Java | ||
apply plugin: 'java' | ||
apply plugin: 'groovy' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'idea' | ||
|
||
//buildscript { | ||
// repositories { mavenCentral() } | ||
// dependencies { classpath 'org.ajoberstar:gradle-git:1.4.2' } | ||
//} | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'org.ajoberstar:gradle-git:1.4.2' | ||
} | ||
} | ||
|
||
// In this section you declare where to find the dependencies of your project | ||
repositories { | ||
|
@@ -29,6 +25,16 @@ repositories { | |
jcenter() | ||
} | ||
|
||
|
||
ant.importBuild 'build.xml' | ||
|
||
// Apply the java plugin to add support for Java | ||
apply plugin: 'java' | ||
apply plugin: 'groovy' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'idea' | ||
//apply plugin: "de.qaware.seu.as.code.git" | ||
|
||
// In this section you declare the dependencies for your production and test code | ||
dependencies { | ||
// The production code uses the SLF4J logging API at compile time | ||
|
@@ -47,6 +53,18 @@ def jbrowsePlugins | |
def pluginsDirectory = "jbrowse-download/plugins" | ||
def currentPlugin | ||
|
||
|
||
task cloneTask(type: CloneTask) | ||
|
||
class CloneTask extends DefaultTask { | ||
|
||
@TaskAction | ||
def clone() { | ||
def grgit = Grgit.clone(dir: 'asdf', uri: 'https://github.com/GMOD/myvariantviewer') | ||
} | ||
} | ||
|
||
|
||
task evaluateJBrowseConfigs { | ||
// gradle read in Config.groovy | ||
def config = new ConfigSlurper().parse(new File("grails-app/conf/Config.groovy").toURI().toURL()) | ||
|
@@ -82,37 +100,12 @@ task installJBrowse(dependsOn: "setup-jbrowse") << { | |
|
||
task setupJBrowse(dependsOn: "setup-jbrowse") << {} | ||
|
||
//task cloneGitRepo(type: GitClone) { | ||
// def destination = file("abcd") | ||
// uri = "https://github.org/GMOD/myvariantviewer" | ||
// destinationPath = destination | ||
// bare = false | ||
// enabled = !destination.exists() //to clone only once | ||
//} | ||
|
||
task cloneGitExec(type: Exec) { | ||
onlyIf { Task task -> | ||
println "TRYING TO CLOEN ${currentPlugin}" | ||
workingDir "jbrowse-download/plugins/${currentPlugin.key}" | ||
|
||
println "CLONNING " | ||
// execCommand "git" | ||
commandLine "git", "clone", currentPlugin.value.git | ||
println "CLONED ABC" | ||
standardOutput = new ByteArrayOutputStream() | ||
println "STARNDARD OUTPUT ${standardOutput}" | ||
return currentPlugin != null | ||
} | ||
} | ||
|
||
|
||
task installJBrowsePlugins << { | ||
println "installing jbrowse plugins ${jbrowsePlugins}" | ||
|
||
for (plugin in jbrowsePlugins) { | ||
currentPlugin = plugin | ||
println "KEY ${plugin.key}" | ||
println "GIT ${plugin.value}" | ||
def path = pluginsDirectory + "/" + plugin.key | ||
def pluginExists = confirmPlugin(path) | ||
if (plugin.value.included == true) { | ||
|
@@ -129,20 +122,12 @@ task installJBrowsePlugins << { | |
println "git checkout proper directory" | ||
} else { | ||
println "git clone to the proper directory" | ||
// def grgit = Grgit.clone(dir: pluginsDirectory, uri: '[email protected]:ajoberstar/grgit.git') | ||
println "cloning from ${plugin.value.git} into ${path}" | ||
currentPlugin = plugin | ||
// tasks["cloneGitExec"].execute() | ||
if (currentPlugin) { | ||
cloneGitExec.execute() | ||
File testFile = new File(".") | ||
"/usr/bin/git clone ${plugin.value.git}".execute(null,testFile) | ||
} | ||
println "current plugin ${currentPlugin}" | ||
println "attemptping to clone from '${plugin.value.git}' into '${path}'" | ||
def grgit = Grgit.clone(dir: path , uri: plugin.value.git) | ||
println "CLONED from ${plugin.value.git} into ${path}" | ||
|
||
// def grgit = Grgit.clone(dir: path, uri: plugin.value.git) | ||
// def grgit = Grgit.clone(dir: "ASdf", uri: plugin.value.git) | ||
// ["git","clone",plugin.value.git].execute() | ||
} | ||
} else if (plugin.value.url == true) { | ||
if (!pluginExists) { | ||
|
@@ -163,4 +148,5 @@ task handleJBrowse(dependsOn: ['evaluateJBrowseConfigs', 'installJBrowse', 'inst | |
def confirmPlugin(String path) { | ||
File file = new File(path) | ||
return file.exists() && file.isDirectory() && file.canRead() | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Mar 14 12:08:11 PDT 2016 | ||
#Mon Mar 14 22:13:59 PDT 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -368,7 +368,7 @@ jbrowse { | |
included = true | ||
} | ||
MyVariantInfo { | ||
git = 'https://github.org/GMOD/myvariantviewer' | ||
git = 'https://github.com/GMOD/myvariantviewer' | ||
// git = '[email protected]:GMOD/myvariantviewer.git' | ||
branch = 'master' | ||
alwaysRecheck = "true" | ||
|