Skip to content

A fresh-made Sbt-PlugIn to load Sbt dependencies from json files

License

Notifications You must be signed in to change notification settings

radicalbit/sbt-dependency-from-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

sbt-dependency-from-file

sbt-dependency-from-file is a fresh-made library for dynamic load sbt dependencies using json files.

Advantages

By using sbt-dependency-from-file, users will be able to dynamically change project dependencies by adding or overwriting a simple file; this comes really handy to automation software.

Usage

In order to use sbt-dependency-from-file in a sbt project, add sbt plugin in project/plugins.sbt:

addSbtPlugin("io.radicalbit" % "sbt-dependency-from-file" % "1.0")

Example

Suppose that you want to load different sbt dependencies according to specific environment, you just need to define a json file that contains dependencies in the root folder of your project:

          {
            "groupId":"org.typelevel",
            "artifactId":"cats-core",
            "version":"2.0.0-RC1",
            "scalaVersion": "2.12",
            "resolver":{
              "name":"Local Maven Repository",
              "url":".m2/repository",
            }
          }
        ]

And then, in your build.sbt:

    dependenciesJsonPath := baseDirectory.value / "dev.json"
    libraryDependencies ++= extractedDependencies.value

Authors

About

A fresh-made Sbt-PlugIn to load Sbt dependencies from json files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages