diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-19 19:51:38 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-20 02:56:26 -0400 |
commit | d6245c8dc5c7b2f885d538b39f685327da252863 (patch) | |
tree | 846bdd92ad022dbe5a7a45e0b9d5e75bbf7779c8 /stage2/BasicBuild.scala | |
parent | ca099eba708f3618bed75a5940a5a5ae1d10b684 (diff) | |
download | cbt-d6245c8dc5c7b2f885d538b39f685327da252863.tar.gz cbt-d6245c8dc5c7b2f885d538b39f685327da252863.tar.bz2 cbt-d6245c8dc5c7b2f885d538b39f685327da252863.zip |
Unify reflectively loading builds from directories.
THis is mostly cleanup and a little bit feature.
Before it was done partially in 3 places, BuildBuild,
loadRoot and GitDependency. Now DirectoryDependencies
also support referencing sub-builds.
Also introduce scalariform for the first few files
of cbt's core code :).
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r-- | stage2/BasicBuild.scala | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index fcda629..4158040 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -122,11 +122,6 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with SbtDep scalaVersion: String = scalaMajorVersion, verifyHash: Boolean = true ) = lib.ScalaDependency( groupId, artifactId, version, classifier, scalaVersion, verifyHash ) - final def DirectoryDependency(path: File, pathToNestedBuild: String*) = cbt.DirectoryDependency( - context.copy( workingDirectory = path ), - pathToNestedBuild: _* - ) - def localJars: Seq[File] = Seq(projectDirectory ++ "/lib") .filter(_.exists) @@ -220,8 +215,7 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with SbtDep def test: Dependency = { val testDirectory = projectDirectory / "test" if( (testDirectory / lib.buildDirectoryName / lib.buildFileName).exists ){ - // FIYME: maybe we can make loadRoot(...).finalBuild an Option some - DirectoryDependency( testDirectory ) + DirectoryDependency( testDirectory ).dependency } else { new BasicBuild( context.copy(workingDirectory = testDirectory) ){ override def dependencies = Seq( @@ -292,13 +286,6 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with SbtDep context.logger.composition("<"*80) */ - // ========== cbt internals ========== - @deprecated("use finalbuild(File)","") - def finalBuild: BuildInterface = this - override def finalBuild( current: File ): BuildInterface = { - //assert( current.getCanonicalFile == projectDirectory.getCanonicalFile, s"$current == $projectDirectory" ) - this - } override def show = this.getClass.getSimpleName ++ "(" ++ projectDirectory.string ++ ")" override def toString = show |