forked from foundweekends/giter8
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
724 additions
and
643 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
style = default | ||
maxColumn = 120 | ||
align.tokens = ["|", "=>", "<-", "=", "\"\"\""] |
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
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 |
---|---|---|
|
@@ -3,57 +3,61 @@ import Dependencies._ | |
val g8version = "0.7.3-SNAPSHOT" | ||
|
||
// posterous title needs to be giter8, so both app and root are named giter8 | ||
lazy val root = (project in file(".")). | ||
enablePlugins(TravisSitePlugin, NoPublish). | ||
aggregate(app, lib, scaffold, plugin). | ||
settings( | ||
inThisBuild(List( | ||
organization := "org.foundweekends.giter8", | ||
version := g8version, | ||
scalaVersion := "2.10.6", | ||
organizationName := "foundweekends", | ||
organizationHomepage := Some(url("http://foundweekends.org/")), | ||
scalacOptions ++= Seq("-language:_", "-deprecation", "-Xlint", "-Xfuture"), | ||
publishArtifact in (Compile, packageBin) := true, | ||
homepage := Some(url("http://www.foundweekends.org/giter8/")), | ||
publishMavenStyle := true, | ||
publishTo := | ||
Some("releases" at | ||
"https://oss.sonatype.org/service/local/staging/deploy/maven2"), | ||
publishArtifact in Test := false, | ||
parallelExecution in Test := false, | ||
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), | ||
developers := List( | ||
Developer("n8han", "Nathan Hamblen", "@n8han", url("http://github.com/n8han")), | ||
Developer("eed3si9n", "Eugene Yokota", "@eed3si9n", url("https://github.com/eed3si9n")) | ||
), | ||
scmInfo := Some(ScmInfo(url("https://github.com/foundweekends/giter8"), "[email protected]:foundweekends/giter8.git")) | ||
)), | ||
lazy val root = (project in file(".")) | ||
.enablePlugins(TravisSitePlugin, NoPublish) | ||
.aggregate(app, lib, scaffold, plugin) | ||
.settings( | ||
inThisBuild( | ||
List( | ||
organization := "org.foundweekends.giter8", | ||
version := g8version, | ||
scalaVersion := "2.10.6", | ||
organizationName := "foundweekends", | ||
organizationHomepage := Some(url("http://foundweekends.org/")), | ||
scalacOptions ++= Seq("-language:_", "-deprecation", "-Xlint", "-Xfuture"), | ||
publishArtifact in (Compile, packageBin) := true, | ||
homepage := Some(url("http://www.foundweekends.org/giter8/")), | ||
publishMavenStyle := true, | ||
publishTo := | ||
Some("releases" at | ||
"https://oss.sonatype.org/service/local/staging/deploy/maven2"), | ||
publishArtifact in Test := false, | ||
parallelExecution in Test := false, | ||
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), | ||
developers := List( | ||
Developer("n8han", "Nathan Hamblen", "@n8han", url("http://github.com/n8han")), | ||
Developer("eed3si9n", "Eugene Yokota", "@eed3si9n", url("https://github.com/eed3si9n")) | ||
), | ||
scmInfo := Some( | ||
ScmInfo(url("https://github.com/foundweekends/giter8"), "[email protected]:foundweekends/giter8.git")) | ||
)), | ||
name := "giter8", | ||
crossScalaVersions := List(scala210, scala211, scala212), | ||
siteGithubRepo := "foundweekends/giter8", | ||
siteEmail := { "eed3si9n" + "@" + "gmail.com" }, | ||
customCommands | ||
) | ||
|
||
lazy val app = (project in file("app")). | ||
disablePlugins(BintrayPlugin). | ||
enablePlugins(ConscriptPlugin, BuildInfoPlugin, SonatypePublish). | ||
dependsOn(lib). | ||
settings( | ||
lazy val app = (project in file("app")) | ||
.disablePlugins(BintrayPlugin) | ||
.enablePlugins(ConscriptPlugin, BuildInfoPlugin, SonatypePublish) | ||
.dependsOn(lib) | ||
.settings( | ||
description := "Command line tool to apply templates defined on github", | ||
name := "giter8", | ||
crossScalaVersions := List(scala210, scala211, scala212), | ||
sourceDirectory in csRun := { (baseDirectory).value.getParentFile / "src" / "main" / "conscript" }, | ||
sourceDirectory in csRun := { | ||
(baseDirectory).value.getParentFile / "src" / "main" / "conscript" | ||
}, | ||
libraryDependencies ++= Seq(scopt, logback), | ||
buildInfoKeys := Seq(name, version, scalaVersion, sbtVersion), | ||
buildInfoPackage := "giter8" | ||
) | ||
|
||
lazy val scaffold = (project in file("scaffold")). | ||
enablePlugins(BintrayPublish). | ||
dependsOn(lib). | ||
settings( | ||
lazy val scaffold = (project in file("scaffold")) | ||
.enablePlugins(BintrayPublish) | ||
.dependsOn(lib) | ||
.settings( | ||
name := "sbt-giter8-scaffold", | ||
description := "sbt plugin for scaffolding giter8 templates", | ||
sbtPlugin := true, | ||
|
@@ -64,16 +68,18 @@ lazy val scaffold = (project in file("scaffold")). | |
), | ||
scriptedBufferLog := false, | ||
scriptedLaunchOpts += ("-Dplugin.version=" + version.value), | ||
scripted := ScriptedPlugin.scripted.dependsOn(publishLocal in lib).evaluated, | ||
scripted := ScriptedPlugin.scripted | ||
.dependsOn(publishLocal in lib) | ||
.evaluated, | ||
test in Test := { | ||
scripted.toTask("").value | ||
} | ||
) | ||
|
||
lazy val plugin = (project in file("plugin")). | ||
enablePlugins(BintrayPublish). | ||
dependsOn(lib). | ||
settings( | ||
lazy val plugin = (project in file("plugin")) | ||
.enablePlugins(BintrayPublish) | ||
.dependsOn(lib) | ||
.settings( | ||
name := "sbt-giter8", | ||
scriptedSettings, | ||
description := "sbt plugin for testing giter8 templates", | ||
|
@@ -85,38 +91,46 @@ lazy val plugin = (project in file("plugin")). | |
), | ||
scriptedBufferLog := false, | ||
scriptedLaunchOpts += ("-Dplugin.version=" + version.value), | ||
scripted := ScriptedPlugin.scripted.dependsOn(publishLocal in lib).evaluated, | ||
scripted := ScriptedPlugin.scripted | ||
.dependsOn(publishLocal in lib) | ||
.evaluated, | ||
libraryDependencies += ("org.scala-sbt" % "scripted-plugin" % sbtVersion.value), | ||
test in Test := { | ||
scripted.toTask("").value | ||
} | ||
) | ||
|
||
lazy val lib = (project in file("library")). | ||
disablePlugins(BintrayPlugin). | ||
enablePlugins(SonatypePublish). | ||
settings( | ||
lazy val lib = (project in file("library")) | ||
.disablePlugins(BintrayPlugin) | ||
.enablePlugins(SonatypePublish) | ||
.settings( | ||
name := "giter8-lib", | ||
description := "shared library for app and plugin", | ||
crossScalaVersions := List(scala210, scala211, scala212), | ||
libraryDependencies ++= Seq( | ||
scalasti, jgit, commonsIo, plexusArchiver, | ||
scalacheck % Test, sbtIo % Test, scalatest % Test, | ||
scalamock % Test, "org.slf4j" % "slf4j-simple" % "1.7.12" % Test | ||
scalasti, | ||
jgit, | ||
commonsIo, | ||
plexusArchiver, | ||
scalacheck % Test, | ||
sbtIo % Test, | ||
scalatest % Test, | ||
scalamock % Test, | ||
"org.slf4j" % "slf4j-simple" % "1.7.12" % Test | ||
) ++ | ||
(CrossVersion.partialVersion(scalaVersion.value) match { | ||
case Some((2, scalaMajor)) if scalaMajor >= 11 => | ||
Seq(scalaXml, parserCombinator) | ||
case _ => Nil | ||
(CrossVersion.partialVersion(scalaVersion.value) match { | ||
case Some((2, scalaMajor)) if scalaMajor >= 11 => | ||
Seq(scalaXml, parserCombinator) | ||
case _ => Nil | ||
}) | ||
) | ||
) | ||
|
||
def customCommands: Seq[Setting[_]] = Seq( | ||
commands += Command.command("release") { state => | ||
"clean" :: | ||
"so compile" :: | ||
"so publishSigned" :: | ||
"reload" :: | ||
state | ||
"so compile" :: | ||
"so publishSigned" :: | ||
"reload" :: | ||
state | ||
} | ||
) |
Oops, something went wrong.