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

Update build.scala to build.sbt #186

Merged
merged 3 commits into from
Apr 14, 2016
Merged
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
2 changes: 1 addition & 1 deletion .travis.yml
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

77 changes: 77 additions & 0 deletions build.sbt
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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably be nixed with lsSettings being elided.

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
)
)
2 changes: 1 addition & 1 deletion plugin/src/sbt-test/giter8/simple/project/plugins.sbt
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"))
20 changes: 20 additions & 0 deletions project/Dependencies.scala
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"
}
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.11
113 changes: 0 additions & 113 deletions project/build.scala

This file was deleted.

1 change: 1 addition & 0 deletions project/buildinfo.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.6.1")
1 change: 1 addition & 0 deletions project/conscript.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("org.foundweekends.conscript" % "sbt-conscript" % "0.5.0")
3 changes: 0 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ resolvers ++= Seq(
)

addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.3")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.2.5")

libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value
7 changes: 0 additions & 7 deletions project/project/plugins.scala

This file was deleted.