typosafe typesafe config
Scala
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example/src/main
macro/src
project
.gitignore
.scalafmt.conf
.travis.yml
LICENSE.txt
README.md
build.sbt

README.md

configpath

Build Status

Install

scalaVersion := "2.12.2"

resolvers +=
  "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

libraryDependencies += "com.github.tototoshi" %% "configpath" % "0.1.0-SNAPSHOT"

addCompilerPlugin("org.scalameta" % "paradise" % "3.0.0-M8" cross CrossVersion.full)

Example

import com.typesafe.config.ConfigFactory
import com.github.tototoshi.configpath.compile

@compile("example/src/main/resources/application.conf")
object path

object Example {

  def main(args: Array[String]): Unit = {
    val config = ConfigFactory.load()
    val serializer1 = config.getString(path.akka.actor.serializers.`akka-containers`.full)
    val serializer2 = config.getString("akka.actor.serializers.akka-containers")
    assert(serializer1 == serializer2)
  }

}