-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sbt support
- Loading branch information
Showing
9 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,8 @@ | |
Staticfile.auth | ||
|
||
/vendor | ||
/public | ||
/target | ||
/project/project | ||
/project/target | ||
/.project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin.publishingSettings | ||
|
||
val appName = "vat-end-to-end" | ||
|
||
lazy val microservice = Project(appName, file(".")) | ||
.enablePlugins(play.sbt.PlayScala, SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin, SbtArtifactory) | ||
.settings( | ||
libraryDependencies ++= AppDependencies.compile ++ AppDependencies.test, | ||
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false), | ||
majorVersion := 0 | ||
) | ||
.settings( | ||
publishingSettings: _* | ||
) | ||
.settings( | ||
resolvers += Resolver.bintrayRepo("hmrc", "releases"), | ||
resolvers += Resolver.jcenterRepo | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Copyright 2018 HM Revenue & Customs | ||
# | ||
# 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. | ||
|
||
include "backend.conf" | ||
|
||
# This is the main configuration file for the application. | ||
# ~~~~~ | ||
|
||
appName=vat-service-guide | ||
appUrl="http://"${appName}".local" | ||
incapacityBenefitPAYEReference="892/BA500" | ||
employmentAndSupportAllowancePAYEReference="267/ESA500" | ||
|
||
# An ApplicationLoader that uses Guice to bootstrap the application. | ||
play.application.loader = "uk.gov.hmrc.play.bootstrap.ApplicationLoader" | ||
|
||
# Primary entry point for all HTTP requests on Play applications | ||
#play.http.requestHandler = "uk.gov.hmrc.play.bootstrap.http.RequestHandler" | ||
|
||
# Provides an implementation of AuditConnector. Use `uk.gov.hmrc.play.bootstrap.AuditModule` or create your own. | ||
# An audit connector must be provided. | ||
#play.modules.enabled += "uk.gov.hmrc.play.bootstrap.AuditModule" | ||
|
||
# Provides an implementation of MetricsFilter. Use `uk.gov.hmrc.play.graphite.GraphiteMetricsModule` or create your own. | ||
# A metric filter must be provided | ||
#play.modules.enabled += "uk.gov.hmrc.play.bootstrap.graphite.GraphiteMetricsModule" | ||
|
||
# Play Modules | ||
# ~~~~ | ||
# Additional play modules can be added here | ||
|
||
# Session Timeout | ||
# ~~~~ | ||
# The default session timeout for the app is 15 minutes (900seconds). | ||
# Updating this is the responsibility of the app - it must issue a new cookie with each request or the session will | ||
# timeout 15 minutes after login (regardless of user activity). | ||
# session.maxAge=900 | ||
|
||
# Secret key | ||
# ~~~~~ | ||
# The secret key is used to secure cryptographics functions. | ||
# If you deploy your application to several instances be sure to use the same key! | ||
play.crypto.secret="DUMMY" | ||
|
||
# Session configuration | ||
# ~~~~~ | ||
application.session.httpOnly=false | ||
application.session.secure=false | ||
|
||
# The application languages | ||
# ~~~~~ | ||
application.langs="en" | ||
|
||
# Router | ||
# ~~~~~ | ||
# Define the Router object to use for this application. | ||
# This router will be looked up first when the application is starting up, | ||
# so make sure this is the entry point. | ||
# Furthermore, it's assumed your route file is named properly. | ||
# So for an application router like `my.application.Router`, | ||
# you may need to define a router file `conf/my.application.routes`. | ||
# Default to Routes in the root package (and conf/routes) | ||
# !!!WARNING!!! DO NOT CHANGE THIS ROUTER | ||
play.http.router=prod.Routes | ||
|
||
# Metrics plugin settings - graphite reporting is configured on a per env basis | ||
metrics { | ||
name = ${appName} | ||
rateUnit = SECONDS | ||
durationUnit = SECONDS | ||
showSamples = true | ||
jvm = true | ||
enabled = true | ||
} | ||
|
||
|
||
# Microservice specific config | ||
|
||
auditing { | ||
enabled=false | ||
traceRequests=true | ||
consumer { | ||
baseUri { | ||
host = localhost | ||
port = 8100 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
GET / controllers.Assets.at(path="/public", file="index.html") | ||
GET /*file controllers.Assets.at(path="/public", file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import play.core.PlayVersion | ||
import play.sbt.PlayImport._ | ||
import sbt._ | ||
|
||
object AppDependencies { | ||
val bootStrapPlayVersion = "3.14.0" | ||
|
||
val compile = Seq( | ||
ws, | ||
"uk.gov.hmrc" %% "bootstrap-play-25" % bootStrapPlayVersion) | ||
|
||
val test = Seq( | ||
"org.pegdown" % "pegdown" % "1.6.0" % "test", | ||
"org.scalatest" %% "scalatest" % "3.0.5" % "test") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=0.13.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resolvers += Resolver.url("hmrc-sbt-plugin-releases", url("https://dl.bintray.com/hmrc/sbt-plugin-releases"))(Resolver.ivyStylePatterns) | ||
resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/" | ||
resolvers += "HMRC Releases" at "https://dl.bintray.com/hmrc/releases" | ||
|
||
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "1.13.0") | ||
addSbtPlugin("uk.gov.hmrc" % "sbt-git-versioning" % "1.15.0") | ||
addSbtPlugin("uk.gov.hmrc" % "sbt-artifactory" % "0.14.0") | ||
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "1.2.0") | ||
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.12") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2018 HM Revenue & Customs | ||
* | ||
* 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 test | ||
|
||
import org.scalatest.{Matchers, WordSpec} | ||
import sys.process._ | ||
|
||
class BuildSpec extends WordSpec with Matchers { | ||
"Building the content" should { | ||
"produce static files" in { | ||
val result = "bundle install" #&& "bundle exec middleman build --build-dir=public/" ! | ||
|
||
result shouldBe 0 | ||
} | ||
} | ||
} |