your packages, delivered fresh
A scala interface for the bintray api.
add the following to your sbt build definition
libraryDependencies += "org.foundweekends" %% "bintry" % "0.6.0"Create a new bintry Client with your bintray username and api key ( which can be found here )
import bintry._, dispatch._, dispatch.Defaults._, org.json4s._
val bty = Client(user, apikey)
val repo = bty.repo(user, "generic")repo.createPackage("my-awesome-package",
"description of my awesome package",
Seq("MIT"))(as.json4s.Json)repo.get("my-awesome-package").createVersion("0.1.0")(as.json4s.Json)repo.get("my-awesome-package").version("0.1.0")
.upload("/baz", file("foo_2.10"),
publish = true)(as.json4s.Json)You can assign typed metadata as attributes to packages and versions.
Bintray expects these to be of type string, date, number, boolean or version. Bintry exposes these types as
Attr.String(stringVal), Attr.Date(java.util.Date), Attr.Number(intVal), Attr.Boolean(boolVal) and Attr(stringVal) respectively.
Doug Tangren (softprops) 2013-2014