diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-01 23:10:40 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-15 01:24:46 -0400 |
commit | 81a8db46ce92f6f0b7b2c2661ae8f0a2f38e5adc (patch) | |
tree | 2510223d526d983590ff5062a938f247231d90e1 /stage2/BuildBuild.scala | |
parent | ee439cdc67034d35762d54a6d87d51844fcf6dde (diff) | |
download | cbt-81a8db46ce92f6f0b7b2c2661ae8f0a2f38e5adc.tar.gz cbt-81a8db46ce92f6f0b7b2c2661ae8f0a2f38e5adc.tar.bz2 cbt-81a8db46ce92f6f0b7b2c2661ae8f0a2f38e5adc.zip |
support for git dependencies on projects in subdirectories
Diffstat (limited to 'stage2/BuildBuild.scala')
-rw-r--r-- | stage2/BuildBuild.scala | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/stage2/BuildBuild.scala b/stage2/BuildBuild.scala index c6d45d3..901e860 100644 --- a/stage2/BuildBuild.scala +++ b/stage2/BuildBuild.scala @@ -28,24 +28,25 @@ trait BuildBuild extends BaseBuild{ if(context.cbtHome.string.contains(hash)) None else Some{ - val checkoutDirectory = new GitDependency(base, hash).checkout - val build = new BasicBuild( context.copy( projectDirectory = checkoutDirectory ++ "/nailgun_launcher" ) ) - val cl = build - .classLoader(classLoaderCache) // Note: cbt can't use an old version of itself for building, // otherwise we'd have to recursively build all versions since // the beginning. Instead CBT always needs to build the pure Java // Launcher in the checkout with itself and then run it via reflection. - cl + val dep = new GitDependency(base, hash, Some("nailgun_launcher")) + val ctx = managedContext.copy( cbtHome = dep.checkout ) + dep.classLoader(classLoaderCache) .loadClass( "cbt.NailgunLauncher" ) .getMethod( "getBuild", classOf[AnyRef] ) - .invoke( null, managedContext.copy(cbtHome=checkoutDirectory) ) + .invoke( null, ctx ) } }.getOrElse{ + //new BasicBuild(managedContext) + ///* classLoader(context.classLoaderCache) .loadClass(lib.buildClassName) .getConstructors.head .newInstance(managedContext) + //*/ } } else { new BasicBuild(managedContext) |