aboutsummaryrefslogtreecommitdiff
path: root/stage2/BuildBuild.scala
diff options
context:
space:
mode:
Diffstat (limited to 'stage2/BuildBuild.scala')
-rw-r--r--stage2/BuildBuild.scala18
1 files changed, 13 insertions, 5 deletions
diff --git a/stage2/BuildBuild.scala b/stage2/BuildBuild.scala
index c312df9..9d3458d 100644
--- a/stage2/BuildBuild.scala
+++ b/stage2/BuildBuild.scala
@@ -14,8 +14,9 @@ class plugins(implicit context: Context){
context.copy(
workingDirectory = context.cbtHome / "plugins" / dir
)
- ).dependency
+ )
final lazy val essentials = plugin( "essentials" )
+ final lazy val googleJavaFormat = plugin( "google-java-format" )
final lazy val proguard = plugin( "proguard" )
final lazy val sbtLayout = plugin( "sbt_layout" )
final lazy val scalafmt = plugin( "scalafmt" )
@@ -31,7 +32,7 @@ trait BuildBuildWithoutEssentials extends BaseBuild{
assert(
projectDirectory.getName === lib.buildDirectoryName,
- "You can't extend ${lib.buildBuildClassName} in: " + projectDirectory + "/" + lib.buildDirectoryName
+ s"You can't extend ${lib.buildBuildClassName} in: " + projectDirectory + "/" + lib.buildDirectoryName
)
protected final val managedContext = context.copy(
@@ -66,9 +67,9 @@ trait BuildBuildWithoutEssentials extends BaseBuild{
// 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.
- val dep = new GitDependency(base, hash, Some("nailgun_launcher"))
- val ctx = managedContext.copy( cbtHome = dep.checkout )
- dep.classLoader
+ val build = GitDependency(base, hash, Some("nailgun_launcher")).asInstanceOf[BaseBuild]
+ val ctx = managedContext.copy( cbtHome = build.projectDirectory.getParentFile )
+ build.classLoader
.loadClass( "cbt.NailgunLauncher" )
.getMethod( "getBuild", classOf[AnyRef] )
.invoke( null, ctx )
@@ -116,3 +117,10 @@ trait BuildBuildWithoutEssentials extends BaseBuild{
if( c == p ) this else managedBuild.finalBuild( current )
}
}
+
+trait CbtInternal extends BuildBuild{
+ protected object cbtInternal{
+ def shared = DirectoryDependency(context.cbtHome / "/internal/plugins/shared")
+ def library = DirectoryDependency(context.cbtHome / "/internal/plugins/library")
+ }
+}