All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.10.dp.source-code.sbt-deps.scala Maven / Gradle / Ivy

The newest version!
/*
   Copyright 2010 Aaron J. Radke

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package cc.drx

object Deps{
  // import sbt.librarymanagement._
  // import sbt.librarymanagement.syntax._

  // private val kson = cc.drx.Kson(cc.drx.File("~/.bt.kson").canon) //TODO find another mechanism

  /*
  def dep(key:String):Option[ModuleID] = {
     // cc.drx.Repo.Release.get(kson,key).map{r => 
     cc.drx.Repo.Release.getWithScope(kson,key).map{case (r,scope) => 
        //-- automatic scala version lookup?
        val sbtDep = r.project.alt match {
           case Some(_) => r.project.org.name %% r.project.name % r.tag.name
           case None    => r.project.org.name %  r.project.name % r.tag.name
        }
        //--add the configuration if a config tag exists
        scope.get[String]("config").map{sbtDep % _} getOrElse sbtDep
     }
  }
  */
  // def deps(keys:String*):Seq[ModuleID] = keys.toSeq flatMap dep
  def dep(key:String):Option[_] = {
    println(Red ansi "Error. cc.drx.Deps.dep is not implemented for sbt0.13 (scala-2.10)")
    None
  }
  def apply(keys:String*) = {
    println(Red ansi "Error. cc.drx.Deps is not implemented for sbt0.13 (scala-2.10)")
    Nil
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy