本文整理汇总了Scala中uk.gov.hmrc.versioning.SbtGitVersioning类的典型用法代码示例。如果您正苦于以下问题:Scala SbtGitVersioning类的具体用法?Scala SbtGitVersioning怎么用?Scala SbtGitVersioning使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SbtGitVersioning类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Scala代码示例。
示例1: MicroServiceBuild
//设置package包名称以及导入依赖的类
import play.core.PlayVersion
import play.routes.compiler.StaticRoutesGenerator
import play.sbt.PlayImport._
import play.sbt.routes.RoutesKeys.routesGenerator
import sbt.Keys._
import sbt._
import uk.gov.hmrc.DefaultBuildSettings.defaultSettings
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin.publishingSettings
import uk.gov.hmrc.versioning.SbtGitVersioning
object MicroServiceBuild extends Build {
lazy val appName = "pensions-lifetime-allowance-des-stub"
lazy val microservice = Project(appName, file("."))
.enablePlugins(play.sbt.PlayScala, SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin)
.settings(publishingSettings: _*)
.settings(defaultSettings(): _*)
.settings(
libraryDependencies ++= Seq(
ws,
"uk.gov.hmrc" %% "microservice-bootstrap" % "5.16.0",
"uk.gov.hmrc" %% "play-authorisation" % "4.3.0",
"uk.gov.hmrc" %% "play-health" % "2.1.0",
"uk.gov.hmrc" %% "play-url-binders" % "2.1.0",
"uk.gov.hmrc" %% "play-config" % "4.3.0",
"uk.gov.hmrc" %% "logback-json-logger" % "3.1.0",
"uk.gov.hmrc" %% "domain" % "4.1.0",
"uk.gov.hmrc" %% "hmrctest" % "2.3.0" % "test",
"org.scalatest" %% "scalatest" % "2.2.6" % "test",
"org.pegdown" % "pegdown" % "1.6.0" % "test",
"com.typesafe.play" %% "play-test" % PlayVersion.current % "test",
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % "test"
),
retrieveManaged := true,
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
routesGenerator := StaticRoutesGenerator
)
.settings(resolvers ++= Seq(
Resolver.bintrayRepo("hmrc", "releases"),
Resolver.jcenterRepo
))
}
开发者ID:hmrc,项目名称:pensions-lifetime-allowance-des-stub,代码行数:47,代码来源:MicroServiceBuild.scala
示例2: TestPhases
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt.Tests.{SubProcess, Group}
import sbt._
import play.routes.compiler.StaticRoutesGenerator
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin._
trait MicroService {
import uk.gov.hmrc._
import DefaultBuildSettings._
import uk.gov.hmrc.{SbtBuildInfo, ShellPrompt, SbtAutoBuildPlugin}
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
import play.sbt.routes.RoutesKeys.routesGenerator
import TestPhases._
val appName: String
lazy val appDependencies : Seq[ModuleID] = ???
lazy val plugins : Seq[Plugins] = Seq.empty
lazy val playSettings : Seq[Setting[_]] = Seq.empty
lazy val microservice = Project(appName, file("."))
.enablePlugins(Seq(play.sbt.PlayScala,SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin) ++ plugins : _*)
.settings(playSettings : _*)
.settings(scalaSettings: _*)
.settings(publishingSettings: _*)
.settings(defaultSettings(): _*)
.settings(
libraryDependencies ++= appDependencies,
retrieveManaged := true,
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
routesGenerator := StaticRoutesGenerator
)
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(Defaults.itSettings): _*)
.settings(
Keys.fork in IntegrationTest := false,
unmanagedSourceDirectories in IntegrationTest <<= (baseDirectory in IntegrationTest)(base => Seq(base / "it")),
addTestReportOption(IntegrationTest, "int-test-reports"),
testGrouping in IntegrationTest := oneForkedJvmPerTest((definedTests in IntegrationTest).value),
parallelExecution in IntegrationTest := false)
.settings(resolvers ++= Seq(
Resolver.bintrayRepo("hmrc", "releases"),
Resolver.jcenterRepo
))
}
private object TestPhases {
def oneForkedJvmPerTest(tests: Seq[TestDefinition]) =
tests map {
test => new Group(test.name, Seq(test), SubProcess(ForkOptions(runJVMOptions = Seq("-Dtest.name=" + test.name))))
}
}
开发者ID:hmrc,项目名称:taas-example-frontend,代码行数:60,代码来源:MicroService.scala
示例3: HmrcBuild
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt._
object HmrcBuild extends Build {
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
import org.scalajs.sbtplugin._
import ScalaJSPlugin.autoImport._
import SbtAutoBuildPlugin._
val nameApp = "lambda-spike"
val appDependencies = {
import Dependencies._
Seq(
Test.scalaTest,
Test.pegdown
)
}
lazy val simpleReactiveMongo = Project(nameApp, file("."))
.enablePlugins(SbtAutoBuildPlugin, SbtGitVersioning, ScalaJSPlugin)
.settings(
autoSourceHeader := false,
scalaVersion := "2.11.8",
libraryDependencies ++= appDependencies,
resolvers += Resolver.typesafeRepo("releases"),
crossScalaVersions := Seq("2.11.8"),
//Rhino JS interpreter disabled, Node.js must be installed
scalaJSUseRhino := false
)
}
object Dependencies {
object Compile {
val scalaJsDom = "org.scala-js" %% "scalajs-dom" % "0.9.0"
}
sealed abstract class Test(scope: String) {
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.0" % scope
val pegdown = "org.pegdown" % "pegdown" % "1.6.0" % scope
}
object Test extends Test("test")
object IntegrationTest extends Test("it")
}
开发者ID:hmrc,项目名称:lambda-spike,代码行数:55,代码来源:HmrcBuild.scala
示例4: HmrcBuild
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt._
object HmrcBuild extends Build {
import uk.gov.hmrc._
import uk.gov.hmrc.versioning.SbtGitVersioning
val appName = "passcode-verification"
lazy val library = (project in file("."))
.enablePlugins(play.sbt.PlayScala, SbtAutoBuildPlugin, SbtGitVersioning)
.settings(
name := appName,
scalaVersion := "2.11.7",
crossScalaVersions := Seq("2.11.7"),
libraryDependencies ++= AppDependencies(),
resolvers := Seq(
Resolver.bintrayRepo("hmrc", "releases"),
"typesafe-releases" at "http://repo.typesafe.com/typesafe/releases/"
)
)
}
private object AppDependencies {
import play.sbt.PlayImport._
import play.core.PlayVersion
val compile = Seq(
"com.typesafe.play" %% "play" % PlayVersion.current % "provided",
ws % "provided",
"uk.gov.hmrc" %% "play-authorised-frontend" % "6.3.0",
"uk.gov.hmrc" %% "play-config" % "4.3.0",
"uk.gov.hmrc" %% "play-auditing" % "2.10.0"
)
val testScope: String = "test"
val test = Seq(
"org.scalatest" %% "scalatest" % "2.2.6" % testScope,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % testScope,
"org.pegdown" % "pegdown" % "1.4.2" % testScope,
"uk.gov.hmrc" %% "hmrctest" % "2.3.0" % testScope
)
def apply() = compile ++ test
}
开发者ID:hmrc,项目名称:passcode-verification,代码行数:51,代码来源:HmrcBuild.scala
示例5: MicroServiceBuild
//设置package包名称以及导入依赖的类
import play.sbt.routes.RoutesKeys._
import sbt._
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
object MicroServiceBuild extends Build with MicroService {
val appName = "updated-print-suppressions"
override lazy val plugins: Seq[Plugins] = Seq(
SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin
)
override lazy val appDependencies: Seq[ModuleID] = AppDependencies()
override lazy val playSettings = Seq(routesImport ++= Seq(
"uk.gov.hmrc.ups.model._"
))
}
private object AppDependencies {
import play.sbt.PlayImport._
import play.core.PlayVersion
def apply() = Seq(
ws,
"uk.gov.hmrc" %% "play-reactivemongo" % "5.2.0",
"uk.gov.hmrc" %% "microservice-bootstrap" % "5.13.0",
"uk.gov.hmrc" %% "play-authorisation" % "4.3.0",
"uk.gov.hmrc" %% "play-config" % "4.3.0",
"uk.gov.hmrc" %% "play-scheduling" % "4.1.0",
"uk.gov.hmrc" %% "play-health" % "2.1.0",
"uk.gov.hmrc" %% "logback-json-logger" % "3.1.0",
"uk.gov.hmrc" %% "domain" % "4.1.0",
"uk.gov.hmrc" %% "work-item-repo" % "4.1.0",
"uk.gov.hmrc" %% "hmrctest" % "2.3.0" % "test, it",
"uk.gov.hmrc" %% "reactivemongo-test" % "2.0.0" % "test, it",
"org.mockito" % "mockito-all" % "1.9.5" % "test, it",
"com.github.tomakehurst" % "wiremock" % "1.56" % "test, it",
"org.scalatest" %% "scalatest" % "2.2.6" % "test, it",
"org.pegdown" % "pegdown" % "1.6.0" % "test, it",
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % "test, it",
"com.typesafe.play" %% "play-test" % PlayVersion.current % "test, it"
)
}
开发者ID:hmrc,项目名称:updated-print-suppressions,代码行数:50,代码来源:MicroServiceBuild.scala
示例6: HmrcBuild
//设置package包名称以及导入依赖的类
import sbt._
import sbt.Keys._
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
object HmrcBuild extends Build {
import BuildDependencies._
import uk.gov.hmrc.DefaultBuildSettings._
val appName = "ct-calculations"
lazy val CtCalculations = (project in file("."))
.enablePlugins(SbtAutoBuildPlugin, SbtGitVersioning)
.settings(
name := appName,
scalaVersion := "2.11.7",
crossScalaVersions := Seq("2.11.7"),
libraryDependencies ++= Seq(
Compile.playJson,
Test.scalaTest,
Test.pegdown,
Test.mockito,
Test.hamcrest
),
Developers()
)
}
private object BuildDependencies {
object Compile {
val playJson = "com.typesafe.play" %% "play-json" % "2.3.4" % "provided"
}
sealed abstract class Test(scope: String) {
val scalaTest = "org.scalatest" %% "scalatest" % "2.2.4" % scope
val mockito = "org.mockito" % "mockito-all" % "1.9.5" % scope
val pegdown = "org.pegdown" % "pegdown" % "1.5.0" % scope
val hamcrest = "org.hamcrest" % "hamcrest-all" % "1.3" % scope
}
object Test extends Test("test")
}
object Developers {
def apply() = developers := List[Developer]()
}
开发者ID:pncampbell,项目名称:ct-calcs-old,代码行数:51,代码来源:HmrcBuild.scala
示例7: TestPhases
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt.Tests.{SubProcess, Group}
import sbt._
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin._
trait MicroService {
import uk.gov.hmrc._
import DefaultBuildSettings._
import uk.gov.hmrc.{SbtBuildInfo, ShellPrompt, SbtAutoBuildPlugin}
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
import TestPhases._
val appName: String
lazy val appDependencies : Seq[ModuleID] = ???
lazy val plugins : Seq[Plugins] = Seq.empty
lazy val playSettings : Seq[Setting[_]] = Seq.empty
lazy val microservice = Project(appName, file("."))
.enablePlugins(Seq(play.PlayScala,SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin) ++ plugins : _*)
.settings(playSettings : _*)
.settings(scalaSettings: _*)
.settings(publishingSettings: _*)
.settings(defaultSettings(): _*)
.settings(
libraryDependencies ++= appDependencies,
retrieveManaged := true,
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false)
)
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(Defaults.itSettings): _*)
.settings(
Keys.fork in IntegrationTest := false,
unmanagedSourceDirectories in IntegrationTest <<= (baseDirectory in IntegrationTest)(base => Seq(base / "it")),
addTestReportOption(IntegrationTest, "int-test-reports"),
testGrouping in IntegrationTest := oneForkedJvmPerTest((definedTests in IntegrationTest).value),
parallelExecution in IntegrationTest := false)
.settings(resolvers += Resolver.bintrayRepo("hmrc", "releases"))
}
private object TestPhases {
def oneForkedJvmPerTest(tests: Seq[TestDefinition]) =
tests map {
test => new Group(test.name, Seq(test), SubProcess(ForkOptions(runJVMOptions = Seq("-Dtest.name=" + test.name))))
}
}
开发者ID:hmrc,项目名称:trust-registration-frontend,代码行数:54,代码来源:MicroService.scala
示例8: HmrcBuild
//设置package包名称以及导入依赖的类
import play.sbt.PlayImport._
import sbt.Keys._
import sbt._
object HmrcBuild extends Build {
import uk.gov.hmrc._
import uk.gov.hmrc.versioning.SbtGitVersioning
val appName = "play-hmrc-api"
lazy val library = (project in file("."))
.enablePlugins(SbtAutoBuildPlugin, SbtGitVersioning)
.settings(
name := appName,
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.11.8"),
libraryDependencies ++= AppDependencies(),
resolvers := Seq(
Resolver.bintrayRepo("hmrc", "releases"),
"typesafe-releases" at "http://repo.typesafe.com/typesafe/releases/"
)
)
}
private object AppDependencies {
import play.sbt.PlayImport._
import play.core.PlayVersion
val compile = Seq(
ws,
"com.typesafe.play" %% "play" % PlayVersion.current % "provided",
"uk.gov.hmrc" %% "microservice-bootstrap" % "5.12.0" % "provided",
"uk.gov.hmrc" %% "play-config" % "4.2.0" % "provided"
)
trait TestDependencies {
lazy val scope: String = "test"
lazy val test: Seq[ModuleID] = ???
}
object Test {
def apply() = new TestDependencies {
override lazy val test = Seq(
"com.typesafe.play" %% "play-test" % PlayVersion.current % scope,
"org.scalatest" %% "scalatest" % "2.2.6" % scope,
"org.pegdown" % "pegdown" % "1.5.0" % scope,
"com.github.tomakehurst" % "wiremock" % "2.2.2" % scope excludeAll ExclusionRule(organization = "org.apache.httpcomponents"),
"uk.gov.hmrc" %% "hmrctest" % "2.3.0" % scope,
"org.mockito" % "mockito-all" % "1.9.5" % "test"
)
}.test
}
def apply() = compile ++ Test()
}
开发者ID:hmrc,项目名称:play-hmrc-api,代码行数:58,代码来源:HmrcBuild.scala
示例9: appName
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt.Tests.{Group, SubProcess}
import sbt._
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin._
import play.routes.compiler.StaticRoutesGenerator
trait MicroService {
import uk.gov.hmrc._
import DefaultBuildSettings._
import TestPhases._
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import play.sbt.routes.RoutesKeys.routesGenerator
def appName: String
lazy val appDependencies: Seq[ModuleID] = ???
lazy val plugins: Seq[Plugins] = Seq.empty
lazy val playSettings: Seq[Setting[_]] = Seq.empty
lazy val microservice = Project(appName, file("."))
.enablePlugins(Seq(play.sbt.PlayScala, SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin) ++ plugins: _*)
.settings(playSettings: _*)
.settings(scalaSettings: _*)
.settings(publishingSettings: _*)
.settings(defaultSettings(): _*)
.settings(
libraryDependencies ++= appDependencies,
retrieveManaged := true,
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
routesGenerator := StaticRoutesGenerator
)
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(Defaults.itSettings): _*)
.settings(
Keys.fork in IntegrationTest := false,
unmanagedSourceDirectories in IntegrationTest <<= (baseDirectory in IntegrationTest)(base => Seq(base / "it")),
addTestReportOption(IntegrationTest, "int-test-reports"),
testGrouping in IntegrationTest := oneForkedJvmPerTest((definedTests in IntegrationTest).value),
parallelExecution in IntegrationTest := false)
.settings(
resolvers += Resolver.bintrayRepo("hmrc", "releases"),
resolvers += Resolver.jcenterRepo
)
}
private object TestPhases {
def oneForkedJvmPerTest(tests: Seq[TestDefinition]) =
tests map {
test => Group(test.name, Seq(test), SubProcess(ForkOptions(runJVMOptions = Seq("-Dtest.name=" + test.name))))
}
}
开发者ID:hmrc,项目名称:email-verification-frontend,代码行数:58,代码来源:MicroService.scala
示例10: TestPhases
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt.Tests.{SubProcess, Group}
import sbt._
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin._
trait MicroService {
import uk.gov.hmrc._
import DefaultBuildSettings._
import uk.gov.hmrc.{SbtBuildInfo, ShellPrompt, SbtAutoBuildPlugin}
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
import TestPhases._
val appName: String
lazy val appDependencies : Seq[ModuleID] = ???
lazy val plugins : Seq[Plugins] = Seq.empty
lazy val playSettings : Seq[Setting[_]] = Seq.empty
lazy val microservice = Project(appName, file("."))
.enablePlugins(Seq(play.PlayScala,SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin) ++ plugins : _*)
.settings(playSettings : _*)
.settings(scalaSettings: _*)
.settings(publishingSettings: _*)
.settings(defaultSettings(): _*)
.settings(
libraryDependencies ++= appDependencies,
retrieveManaged := true,
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false)
)
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(Defaults.itSettings): _*)
.settings(
Keys.fork in IntegrationTest := false,
unmanagedSourceDirectories in IntegrationTest <<= (baseDirectory in IntegrationTest)(base => Seq(base / "it")),
addTestReportOption(IntegrationTest, "int-test-reports"),
testGrouping in IntegrationTest := oneForkedJvmPerTest((definedTests in IntegrationTest).value),
parallelExecution in IntegrationTest := false)
.settings(resolvers ++= Seq(Resolver.bintrayRepo("hmrc", "releases"), Resolver.jcenterRepo))
}
private object TestPhases {
def oneForkedJvmPerTest(tests: Seq[TestDefinition]) =
tests map {
test => new Group(test.name, Seq(test), SubProcess(ForkOptions(runJVMOptions = Seq("-Dtest.name=" + test.name))))
}
}
开发者ID:Baisysoft,项目名称:off-payroll-decision-service,代码行数:54,代码来源:MicroService.scala
示例11: StubServiceBuild
//设置package包名称以及导入依赖的类
import sbt._
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
object StubServiceBuild extends Build with MicroService {
import scala.util.Properties.envOrElse
val appName = "incorporation-dynamic-stub"
override lazy val appDependencies: Seq[ModuleID] = AppDependencies()
override lazy val plugins: Seq[Plugins] = Seq(
SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin
)
}
private object AppDependencies {
import play.PlayImport._
import play.core.PlayVersion
private val microserviceBootstrapVersion = "4.2.1"
private val playHealthVersion = "1.1.0"
private val playConfigVersion = "2.0.1"
private val hmrcTestVersion = "1.7.0"
val compile = Seq(
ws,
"uk.gov.hmrc" %% "microservice-bootstrap" % microserviceBootstrapVersion,
"uk.gov.hmrc" %% "play-health" % playHealthVersion,
"uk.gov.hmrc" %% "play-config" % playConfigVersion,
"uk.gov.hmrc" %% "play-json-logger" % "2.1.1",
"uk.gov.hmrc" %% "play-reactivemongo" % "4.8.0"
)
trait TestDependencies {
lazy val scope: String = "test"
lazy val test : Seq[ModuleID] = ???
}
object Test {
def apply() = new TestDependencies {
override lazy val test = Seq(
"uk.gov.hmrc" %% "hmrctest" % hmrcTestVersion % scope,
"org.scalatest" %% "scalatest" % "2.2.6" % scope,
"org.pegdown" % "pegdown" % "1.5.0" % scope,
"com.typesafe.play" %% "play-test" % PlayVersion.current % scope
)
}.test
}
def apply() = compile ++ Test()
}
开发者ID:hmrc,项目名称:incorporation-dynamic-stub,代码行数:55,代码来源:StubServiceBuild.scala
示例12: StubServiceBuild
//设置package包名称以及导入依赖的类
import sbt._
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
object StubServiceBuild extends Build with MicroService {
import scala.util.Properties.envOrElse
val appName = "bbsi-dynamic-stub"
override lazy val plugins: Seq[Plugins] = Seq(
SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin
)
override lazy val appDependencies: Seq[ModuleID] = AppDependencies()
}
private object AppDependencies {
import play.PlayImport._
import play.core.PlayVersion
private val microserviceBootstrapVersion = "4.2.1"
private val playHealthVersion = "1.1.0"
private val playConfigVersion = "2.0.1"
private val hmrcTestVersion = "1.6.0"
val compile = Seq(
ws,
"uk.gov.hmrc" %% "microservice-bootstrap" % microserviceBootstrapVersion,
"uk.gov.hmrc" %% "play-health" % playHealthVersion,
"uk.gov.hmrc" %% "play-config" % playConfigVersion,
"uk.gov.hmrc" %% "play-json-logger" % "2.1.1",
"uk.gov.hmrc" %% "play-reactivemongo" % "4.8.0"
)
trait TestDependencies {
lazy val scope: String = "test"
lazy val test : Seq[ModuleID] = ???
}
object Test {
def apply() = new TestDependencies {
override lazy val test = Seq(
"uk.gov.hmrc" %% "hmrctest" % hmrcTestVersion % scope,
"org.scalatest" %% "scalatest" % "2.2.6" % scope,
"org.pegdown" % "pegdown" % "1.5.0" % scope,
"com.typesafe.play" %% "play-test" % PlayVersion.current % scope,
"uk.gov.hmrc" %% "domain" % "3.7.0"
)
}.test
}
def apply() = compile ++ Test()
}
开发者ID:hmrc,项目名称:bbsi-dynamic-stub,代码行数:56,代码来源:StubServiceBuild.scala
示例13: HmrcBuild
//设置package包名称以及导入依赖的类
import play.core.PlayVersion
import sbt.Keys._
import sbt._
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
object HmrcBuild extends Build {
import uk.gov.hmrc.DefaultBuildSettings._
val appName = "txm-events"
lazy val txmEvents = (project in file("."))
.enablePlugins(SbtAutoBuildPlugin, SbtGitVersioning)
.settings(
name := appName,
targetJvm := "jvm-1.8",
scalaVersion := "2.11.8",
libraryDependencies ++= Seq(
"javax.inject" % "javax.inject" % "1",
"uk.gov.hmrc" %% "play-events" % "1.2.0",
"de.threedimensions" %% "metrics-play" % "2.5.13",
"uk.gov.hmrc" %% "http-verbs" % "6.2.0" % "provided",
"uk.gov.hmrc" %% "play-auditing" % "2.4.0" % "provided",
"uk.gov.hmrc" %% "play-config" % "3.0.0",
"com.typesafe.play" %% "play" % PlayVersion.current,
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.pegdown" % "pegdown" % "1.5.0" % "test",
"com.typesafe.play" %% "play-test" % PlayVersion.current % "test"
),
Developers()
)
}
object Developers {
def apply() = developers := List[Developer]()
}
开发者ID:hmrc,项目名称:txm-events,代码行数:39,代码来源:HmrcBuild.scala
示例14: TestPhases
//设置package包名称以及导入依赖的类
import play.sbt.routes.RoutesKeys._
import sbt.Keys._
import sbt.Tests.{Group, SubProcess}
import sbt._
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin._
trait MicroService {
import uk.gov.hmrc._
import DefaultBuildSettings._
import uk.gov.hmrc.{SbtBuildInfo, ShellPrompt, SbtAutoBuildPlugin}
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
import play.sbt.routes.RoutesKeys.routesGenerator
import TestPhases._
val appName: String
lazy val appDependencies : Seq[ModuleID] = ???
lazy val plugins : Seq[Plugins] = Seq.empty
lazy val playSettings : Seq[Setting[_]] = Seq.empty
lazy val microservice = Project(appName, file("."))
.enablePlugins(Seq(play.sbt.PlayScala,SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin) ++ plugins : _*)
.settings(playSettings : _*)
.settings(scalaSettings: _*)
.settings(publishingSettings: _*)
.settings(defaultSettings(): _*)
.settings(staticCompileResourceSettings)
.settings(
libraryDependencies ++= appDependencies,
retrieveManaged := true,
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
routesGenerator := StaticRoutesGenerator
)
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(Defaults.itSettings): _*)
.settings(
Keys.fork in IntegrationTest := false,
unmanagedSourceDirectories in IntegrationTest <<= (baseDirectory in IntegrationTest)(base => Seq(base / "it")),
addTestReportOption(IntegrationTest, "int-test-reports"),
testGrouping in IntegrationTest := oneForkedJvmPerTest((definedTests in IntegrationTest).value),
parallelExecution in IntegrationTest := false)
.settings(
resolvers += Resolver.bintrayRepo("hmrc", "releases"),
resolvers += Resolver.jcenterRepo
)
lazy val staticCompileResourceSettings =
unmanagedResourceDirectories in Compile += baseDirectory.value / "resources"
}
private object TestPhases {
def oneForkedJvmPerTest(tests: Seq[TestDefinition]) =
tests map {
test => new Group(test.name, Seq(test), SubProcess(ForkOptions(runJVMOptions = Seq("-Dtest.name=" + test.name))))
}
}
开发者ID:hmrc,项目名称:api-gateway-async-example,代码行数:62,代码来源:MicroService.scala
示例15: TestPhases
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt.Tests.{SubProcess, Group}
import sbt._
import play.routes.compiler.StaticRoutesGenerator
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin._
trait MicroService {
import uk.gov.hmrc._
import DefaultBuildSettings._
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
import play.sbt.routes.RoutesKeys.routesGenerator
import TestPhases._
val appName: String
lazy val appDependencies : Seq[ModuleID] = ???
lazy val plugins : Seq[Plugins] = Seq.empty
lazy val playSettings : Seq[Setting[_]] = Seq.empty
lazy val microservice = Project(appName, file("."))
.enablePlugins(Seq(play.sbt.PlayScala,SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin) ++ plugins : _*)
.settings(playSettings : _*)
.settings(scalaSettings: _*)
.settings(publishingSettings: _*)
.settings(defaultSettings(): _*)
.settings(
libraryDependencies ++= appDependencies,
retrieveManaged := true,
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
routesGenerator := StaticRoutesGenerator
)
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(Defaults.itSettings): _*)
.settings(
Keys.fork in IntegrationTest := false,
unmanagedSourceDirectories in IntegrationTest <<= (baseDirectory in IntegrationTest)(base => Seq(base / "it")),
addTestReportOption(IntegrationTest, "int-test-reports"),
testGrouping in IntegrationTest := oneForkedJvmPerTest((definedTests in IntegrationTest).value),
parallelExecution in IntegrationTest := false)
.settings(
resolvers += Resolver.bintrayRepo("hmrc", "releases"),
resolvers += Resolver.jcenterRepo
)
}
private object TestPhases {
def oneForkedJvmPerTest(tests: Seq[TestDefinition]) =
tests map {
test => new Group(test.name, Seq(test), SubProcess(ForkOptions(runJVMOptions = Seq("-Dtest.name=" + test.name))))
}
}
开发者ID:hmrc,项目名称:example-play-25-mongo-microservice,代码行数:60,代码来源:MicroService.scala
示例16: TestPhases
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt.Tests.{SubProcess, Group}
import sbt._
import play.routes.compiler.StaticRoutesGenerator
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin._
import play.sbt.routes.RoutesCompiler.autoImport._
trait MicroService {
import uk.gov.hmrc._
import DefaultBuildSettings._
import uk.gov.hmrc.{SbtBuildInfo, ShellPrompt, SbtAutoBuildPlugin}
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
import play.sbt.routes.RoutesKeys.routesGenerator
import TestPhases._
val appName: String
lazy val appDependencies : Seq[ModuleID] = ???
lazy val plugins : Seq[Plugins] = Seq.empty
lazy val playSettings : Seq[Setting[_]] = Seq.empty
lazy val microservice = Project(appName, file("."))
.enablePlugins(Seq(play.sbt.PlayScala,SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin) ++ plugins : _*)
.settings(playSettings : _*)
.settings(scalaSettings: _*)
.settings(publishingSettings: _*)
.settings(defaultSettings(): _*)
.settings(
libraryDependencies ++= appDependencies,
retrieveManaged := true,
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
routesGenerator := StaticRoutesGenerator
)
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(Defaults.itSettings): _*)
.settings(
Keys.fork in IntegrationTest := false,
unmanagedSourceDirectories in IntegrationTest <<= (baseDirectory in IntegrationTest)(base => Seq(base / "it")),
addTestReportOption(IntegrationTest, "int-test-reports"),
testGrouping in IntegrationTest := oneForkedJvmPerTest((definedTests in IntegrationTest).value),
parallelExecution in IntegrationTest := false)
.settings(resolvers ++= Seq(
Resolver.bintrayRepo("hmrc", "releases"),
Resolver.jcenterRepo
))
}
private object TestPhases {
def oneForkedJvmPerTest(tests: Seq[TestDefinition]) =
tests map {
test => new Group(test.name, Seq(test), SubProcess(ForkOptions(runJVMOptions = Seq("-Dtest.name=" + test.name))))
}
}
开发者ID:hmrc,项目名称:self-service-time-to-pay-des-stub-scala,代码行数:61,代码来源:MicroService.scala
示例17: HmrcBuild
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt._
import uk.gov.hmrc.versioning.SbtGitVersioning
object HmrcBuild extends Build {
import BuildDependencies._
import uk.gov.hmrc.DefaultBuildSettings._
import uk.gov.hmrc.SbtAutoBuildPlugin
val appName = "tax-year"
lazy val taxYear = (project in file("."))
.enablePlugins(SbtAutoBuildPlugin, SbtGitVersioning)
.settings(
name := "tax-year",
libraryDependencies ++= Seq(
Compile.nscalaTime,
Test.scalaTest,
Test.pegdown
),
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.11.8"),
developers := List(Developer("andy-gray", "Andrew Gray", "andrew.g[email protected]", new URL("http://www.hmrc.gov.uk")))
)
}
private object BuildDependencies {
object Compile {
val nscalaTime = "com.github.nscala-time" %% "nscala-time" % "2.2.0"
}
sealed abstract class Test(scope: String) {
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.1" % scope
val pegdown = "org.pegdown" % "pegdown" % "1.6.0" % scope
}
object Test extends Test("test")
}
开发者ID:hmrc,项目名称:tax-year,代码行数:42,代码来源:HmrcBuild.scala
示例18: HmrcBuild
//设置package包名称以及导入依赖的类
import sbt.Keys._
import sbt._
object HmrcBuild extends Build {
import uk.gov.hmrc.DefaultBuildSettings._
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
val nameApp = "microservice-async"
lazy val library = Project(nameApp, file("."))
.enablePlugins(SbtAutoBuildPlugin, SbtGitVersioning)
.settings(scalaSettings: _*)
.settings(defaultSettings(): _*)
.settings(
libraryDependencies ++= AppDependencies(),
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.11.8"),
resolvers := Seq(
Resolver.bintrayRepo("hmrc", "releases"),
"typesafe-releases" at "http://repo.typesafe.com/typesafe/releases/"
)
)
}
private object AppDependencies {
import play.core.PlayVersion
val compile = Seq(
"uk.gov.hmrc" %% "play-async" % "1.1.0",
"uk.gov.hmrc" %% "crypto" % "4.2.0",
"uk.gov.hmrc" %% "play-filters" % "5.14.0",
"uk.gov.hmrc" %% "play-config" % "4.3.0",
"uk.gov.hmrc" %% "play-reactivemongo" % "5.2.0"
)
trait TestDependencies {
lazy val scope: String = "test"
lazy val test: Seq[ModuleID] = ???
}
object Test {
def apply() = new TestDependencies {
override lazy val test = Seq(
"org.scalatest" %% "scalatest" % "3.0.1" % scope,
"uk.gov.hmrc" %% "hmrctest" % "2.3.0" % scope,
"uk.gov.hmrc" %% "reactivemongo-test" % "1.6.0" % scope,
"com.typesafe.play" %% "play-test" % PlayVersion.current % scope,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % scope,
"org.mockito" % "mockito-all" % "1.9.5" % scope
)
}.test
}
def apply() = compile ++ Test()
}
开发者ID:hmrc,项目名称:microservice-async,代码行数:60,代码来源:HmrcBuild.scala
示例19: FrontendBuild
//设置package包名称以及导入依赖的类
import sbt._
import uk.gov.hmrc.SbtAutoBuildPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
object FrontendBuild extends Build with MicroService {
override val appName = "mdtp-frontend-microservice"
override lazy val plugins: Seq[Plugins] = Seq(
SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin
)
override lazy val appDependencies: Seq[ModuleID] = AppDependencies()
}
private object AppDependencies {
import play.core.PlayVersion
val compile = Seq(
"uk.gov.hmrc" %% "frontend-bootstrap" % "5.0.0",
"uk.gov.hmrc" %% "play-auditing" % "1.0.0",
"uk.gov.hmrc" %% "play-authorised-frontend" % "4.0.0",
"uk.gov.hmrc" %% "play-config" % "1.2.0",
"uk.gov.hmrc" %% "play-json-logger" % "2.1.1",
"uk.gov.hmrc" %% "play-health" % "1.1.0",
"uk.gov.hmrc" %% "govuk-template" % "4.0.0",
"uk.gov.hmrc" %% "play-ui" % "4.4.0"
)
abstract class TestDependencies(scope: String) {
lazy val test : Seq[ModuleID] = Seq(
"org.scalatest" %% "scalatest" % "2.2.4" % scope,
"org.pegdown" % "pegdown" % "1.4.2" % scope,
"org.jsoup" % "jsoup" % "1.7.3" % scope,
"com.typesafe.play" %% &q
|
请发表评论