diff options
author | Jan Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-11 18:58:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-11 18:58:56 -0500 |
commit | 4eb753e4d4ef5be7443b99832892bac697b10b50 (patch) | |
tree | d9200d33f7d2f9b1ed9884330fcd4c6ca651f44a /stage2/BuildBuild.scala | |
parent | e760ee9e4c4c3b3f39e2bb2dfd47d2b142e12a53 (diff) | |
parent | cf859909fbcf577bac92d9f35f5d11e638a66177 (diff) | |
download | cbt-4eb753e4d4ef5be7443b99832892bac697b10b50.tar.gz cbt-4eb753e4d4ef5be7443b99832892bac697b10b50.tar.bz2 cbt-4eb753e4d4ef5be7443b99832892bac697b10b50.zip |
Merge pull request #412 from cvogt/chris
various
Diffstat (limited to 'stage2/BuildBuild.scala')
-rw-r--r-- | stage2/BuildBuild.scala | 18 |
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") + } +} |