Commit 1a705227 authored by Emmanuel Godard's avatar Emmanuel Godard

install dir is ./davis

parent a77ec046
......@@ -9,24 +9,22 @@ apply plugin: "java"
apply plugin: "idea"
apply plugin: "application"
// Install jbotsim locally in libs/lib
// Install jbotsim locally in davis/lib
task installJBotsim(type: Copy, group: "distribution", description: "Install jbotsim locally"){
dependsOn installDist
from 'build/install/basic-example/lib/'
include 'jbotsim-*'
into 'libs/lib'
into 'davis/lib'
}
// Basic task to launch davis with appropriate arguments :
// <network> <id> <size> <algo>
task davis(type: Exec, group: "Application", description: "Run default Davis") {
commandLine 'libs/bin/udavis','src/RingAnon2AgentsSym.java','RandomIds','18','src/randomWalkRing.java'
commandLine 'davis/bin/udavis','src/RingAnon2AgentsSym.java','RandomIds','18','src/randomWalkRing.java'
dependsOn installJBotsim
}
def davisFiles = "${projectDir}/libs/"
def davisFiles = "${projectDir}/davis/"
println("${davisFiles}")
repositories {
......@@ -36,7 +34,7 @@ repositories {
url = "https://repo1.maven.org/maven2/io/jbotsim/"
}
flatDir {
dirs "libs/lib"
dirs "davis/lib"
}
}
......@@ -46,13 +44,13 @@ repositories {
*/
task downloadZipFile(type: Download) {
src 'http://pageperso.lif.univ-mrs.fr/~emmanuel.godard/udavis-0.7rc1.zip'
dest new File('libs', 'udavis-0.7rc1.zip')
dest new File('davis', 'udavis-0.7rc1.zip')
overwrite false // to download only once
}
task downloadAndUnzipFile(dependsOn: downloadZipFile, type: Copy) {
from zipTree(downloadZipFile.dest)
into 'libs'
into 'davis'
}
defaultTasks 'downloadAndUnzipFile'
......@@ -117,5 +115,5 @@ scripts.each() { scriptName, scriptArgs ->
//Add directories to remove by the clean task
clean.doFirst {
delete fileTree(dir: rootProject.file("src"), include: '**/*.class')
delete rootProject.file("libs")
delete rootProject.file("davis")
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment