|
Play Framework/Scala example source code file (Build.scala)
The Build.scala Play Framework example source code/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ import sbt._ import Keys._ object ApplicationBuild extends Build { val appName = "secret-sample" val appVersion = "1.0-SNAPSHOT" val Secret = """(?s).*application.secret="(.*)".*""".r val main = Project(appName, file(".")).enablePlugins(play.PlayScala).settings( version := appVersion, TaskKey[Unit]("check-secret") := { val file = IO.read(baseDirectory.value / "conf/application.conf") file match { case Secret("changeme") => throw new RuntimeException("secret not changed!!\n" + file) case Secret(_) => case _ => throw new RuntimeException("secret not found!!\n" + file) } } ) } Other Play Framework source code examplesHere is a short list of links related to this Play Framework Build.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.