tools: Add dependecy download helpers

This patch adds 2 helpers to download dependencies for compiler and
stub generator during their execution.

They take list of external dependencies as a parameter and directory
where they must be located. Helpers check if these dependencies exist
in the given directory and download not existing ones.
This commit is contained in:
Ilya Matveev
2017-03-21 15:43:13 +07:00
committed by ilmat192
parent 4a716fbf30
commit fbc14becfc
20 changed files with 342 additions and 21 deletions
@@ -12,7 +12,7 @@ abstract class KonanTest extends JavaExec {
def backendNative = project.project(":backend.native")
def runtimeProject = project.project(":runtime")
def dist = project.rootProject.file("dist")
def dependencies = project.findProject(":dependencies").file("all")
def dependenciesDir = project.findProject(":dependencies").file("all")
def runtimeBc = new File("${dist.canonicalPath}/lib/runtime.bc").absolutePath
def launcherBc = new File("${dist.canonicalPath}/lib/launcher.bc").absolutePath
def startKtBc = new File("${dist.canonicalPath}/lib/start.kt.bc").absolutePath
@@ -59,7 +59,7 @@ abstract class KonanTest extends JavaExec {
void setJvmArgs(Iterable<?> arguments) {
super.setJvmArgs(arguments +
"-Dkonan.home=${dist.canonicalPath}" +
"-Dkonan.dependencies=${dependencies.canonicalPat}",
"-Dkonan.dependencies=${dependenciesDir.canonicalPath}" +
"-Djava.library.path=${dist.canonicalPath}/konan/nativelib")
}