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.
Merge pull request foundweekends#186 from eed3si9n/wip/buildsbt
Update build.scala to build.sbt
- Loading branch information
Showing
10 changed files
with
102 additions
and
126 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
language: scala | ||
sudo: false | ||
script: | ||
- sbt test giter8-plugin/scripted | ||
- sbt test plugin/scripted | ||
|
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,77 @@ | ||
import Dependencies._ | ||
|
||
val g8version = "0.6.9-SNAPSHOT" | ||
|
||
// posterous title needs to be giter8, so both app and root are named giter8 | ||
lazy val root = (project in file(".")). | ||
aggregate(app, lib, scaffold, plugin). | ||
settings( | ||
inThisBuild(List( | ||
organization := "org.foundweekends.giter8", | ||
version := g8version, | ||
scalaVersion := "2.10.6", | ||
scalacOptions ++= Seq("-language:_", "-deprecation", "-Xlint"), | ||
publishArtifact in (Compile, packageBin) := true, | ||
homepage := Some(url("https://github.com/foundweekends/giter8")), | ||
publishMavenStyle := true, | ||
publishTo := | ||
Some("releases" at | ||
"https://oss.sonatype.org/service/local/staging/deploy/maven2"), | ||
publishArtifact in Test := false, | ||
licenses := Seq("LGPL v3" -> url("http://www.gnu.org/licenses/lgpl.txt")), | ||
developers := List( | ||
Developer("n8han", "Nathan Hamblen", "@n8han", url("http://github.com/n8han")) | ||
), | ||
scmInfo := Some(ScmInfo(url("https://github.com/foundweekends/giter8"), "[email protected]:foundweekends/giter8.git")) | ||
)), | ||
name := "giter8", | ||
LsKeys.skipWrite := true, | ||
publish := (), | ||
publishLocal := () | ||
) | ||
|
||
lazy val app = (project in file("app")). | ||
enablePlugins(ConscriptPlugin, BuildInfoPlugin). | ||
dependsOn(lib). | ||
settings( | ||
description := "Command line tool to apply templates defined on github", | ||
name := "giter8", | ||
sourceDirectory in csRun := { (baseDirectory).value.getParentFile / "src" / "main" / "conscript" }, | ||
libraryDependencies ++= Seq(jgit, scopt, dispatchJson, dispatchHttp), | ||
buildInfoKeys := Seq(name, version, scalaVersion, sbtVersion), | ||
buildInfoPackage := "giter8" | ||
) | ||
|
||
lazy val scaffold = (project in file("scaffold")). | ||
dependsOn(lib). | ||
settings( | ||
name := "giter8-scaffold", | ||
description := "sbt plugin for scaffolding giter8 templates", | ||
sbtPlugin := true | ||
) | ||
|
||
lazy val plugin = (project in file("plugin")). | ||
dependsOn(lib). | ||
settings( | ||
name := "giter8-plugin", | ||
scriptedSettings, | ||
description := "sbt plugin for testing giter8 templates", | ||
sbtPlugin := true, | ||
resolvers += Resolver.typesafeIvyRepo("releases"), | ||
scriptedLaunchOpts ++= sys.process.javaVmArguments.filter( | ||
a => Seq("-Xmx", "-Xms", "-XX").exists(a.startsWith) | ||
), | ||
scriptedBufferLog := false, | ||
scriptedLaunchOpts += ("-Dplugin.version=" + version.value), | ||
scripted <<= ScriptedPlugin.scripted dependsOn(publishLocal in lib), | ||
libraryDependencies <+= sbtVersion("org.scala-sbt" % "scripted-plugin" % _) | ||
) | ||
|
||
lazy val lib = (project in file("library")). | ||
settings( | ||
name := "giter8-lib", | ||
description := "shared library for app and plugin", | ||
libraryDependencies ++= Seq( | ||
scalasti, jline, lsCore, dispatchCore, commonsIo, plexusArchiver | ||
) | ||
) |
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 |
---|---|---|
@@ -1 +1 @@ | ||
addSbtPlugin("net.databinder.giter8" % "giter8-plugin" % System.getProperty("plugin.version")) | ||
addSbtPlugin("org.foundweekends.giter8" % "giter8-plugin" % System.getProperty("plugin.version")) |
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,20 @@ | ||
import sbt._ | ||
|
||
object Dependencies { | ||
val scalasti = "org.clapper" %% "scalasti" % "2.0.0" | ||
val jline = ("jline" % "jline" % "1.0" force) | ||
val lsCore = "me.lessis" %% "ls" % "0.1.3" | ||
// override ls's older version of dispatch | ||
val dispatchCore = "net.databinder.dispatch" %% "dispatch-core" % "0.11.2" | ||
val commonsIo = "commons-io" % "commons-io" % "2.4" | ||
val plexusArchiver = "org.codehaus.plexus" % "plexus-archiver" % "2.2" excludeAll( | ||
ExclusionRule("org.apache.commons", "commons-compress"), | ||
ExclusionRule("classworlds", "classworlds"), | ||
ExclusionRule("org.tukaani", "xz"), | ||
ExclusionRule("junit", "junit") | ||
) | ||
val jgit = "org.eclipse.jgit" % "org.eclipse.jgit" % "1.3.0.201202151440-r" | ||
val scopt = "com.github.scopt" %% "scopt" % "3.1.0" | ||
val dispatchJson = "net.databinder" %% "dispatch-json" % "0.8.10" | ||
val dispatchHttp = "net.databinder" %% "dispatch-http" % "0.8.10" | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=0.13.8 | ||
sbt.version=0.13.11 |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.6.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 @@ | ||
addSbtPlugin("org.foundweekends.conscript" % "sbt-conscript" % "0.5.0") |
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 was deleted.
Oops, something went wrong.