Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from Activator to Giter8 #13

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: scala

# These directories are cached to S3 at the end of the build
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/boot/

jdk:
- oraclejdk8

script:
## This runs the template with the default parameters, and runs test within the templated app.
- sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M test

# Tricks to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
7 changes: 7 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
A [Giter8][g8] template for the [api-first-hand][afh] plugin.

To get started, read the [tutorial](tutorial/index.html).

[g8]: http://www.foundweekends.org/giter8/
[afh]: https://github.com/zalando/api-first-hand

45 changes: 12 additions & 33 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,33 +1,12 @@
name := "api-first-hand-activator"

version := "0.1.18"

lazy val root = (project in file(".")).enablePlugins(PlayScala, ApiFirstCore, ApiFirstPlayScalaCodeGenerator, ApiFirstSwaggerParser)

scalaVersion := "2.11.7"

libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test,
"org.scalacheck" %% "scalacheck" % "1.12.4" % Test,
"org.specs2" %% "specs2-scalacheck" % "3.6" % Test,
"me.jeffmay" %% "play-json-tests" % "1.3.0" % Test,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test
)

resolvers ++= Seq(
"zalando-bintray" at "https://dl.bintray.com/zalando/maven",
"scalaz-bintray" at "http://dl.bintray.com/scalaz/releases",
"jeffmay" at "https://dl.bintray.com/jeffmay/maven",
Resolver.url("sbt-plugins", url("http://dl.bintray.com/zalando/sbt-plugins"))(Resolver.ivyStylePatterns)
)

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator

apiFirstParsers := Seq(ApiFirstSwaggerParser.swaggerSpec2Ast.value).flatten

playScalaAutogenerateTests := true
// This build is for this Giter8 template.
// To test the template run `g8` or `g8Test` from the sbt session.
// See http://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin for more details.
lazy val root = (project in file(".")).
settings(
name := "api-first-hand-service",
test in Test := {
val _ = (g8Test in Test).toTask("").value
},
scriptedLaunchOpts ++= List("-Xms1024m", "-Xmx1024m", "-XX:ReservedCodeCacheSize=128m", "-XX:MaxPermSize=256m", "-Xss2m", "-Dfile.encoding=UTF-8"),
resolvers += Resolver.url("typesafe", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns)
)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.8
sbt.version=0.13.16-RC1
1 change: 1 addition & 0 deletions project/giter8.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("org.foundweekends.giter8" %% "sbt-giter8" % "0.9.0")
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions src/main/g8/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name := "$name;format="norm"$"

version := "0.1.18"

lazy val root = (project in file(".")).enablePlugins(PlayScala, ApiFirstCore, ApiFirstPlayScalaCodeGenerator, ApiFirstSwaggerParser)

scalaVersion := "2.11.7"

libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test,
"org.scalacheck" %% "scalacheck" % "1.12.4" % Test,
"org.specs2" %% "specs2-scalacheck" % "3.6" % Test,
"me.jeffmay" %% "play-json-tests" % "1.3.0" % Test,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test
)

resolvers ++= Seq(
"zalando-bintray" at "https://dl.bintray.com/zalando/maven",
"scalaz-bintray" at "http://dl.bintray.com/scalaz/releases",
"jeffmay" at "https://dl.bintray.com/jeffmay/maven",
Resolver.url("sbt-plugins", url("http://dl.bintray.com/zalando/sbt-plugins"))(Resolver.ivyStylePatterns)
)

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator

apiFirstParsers := Seq(ApiFirstSwaggerParser.swaggerSpec2Ast.value).flatten

playScalaAutogenerateTests := true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions src/main/g8/default.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name=api-first-hand-service
description=Seed for starting a new Play Api-First project
verbatim=*.yaml *.html *.js *.css *.ttf *.png *.gif *.ico example.yaml.scala
1 change: 1 addition & 0 deletions src/main/g8/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=0.13.8
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions src/main/g8/src/main/scala/Stub.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Stub {
// got any helpful boilerplate for your users?
}