Skip to content

Commit

Permalink
Merge pull request #213 from eed3si9n/wip/211
Browse files Browse the repository at this point in the history
Cross build to 2.11
  • Loading branch information
eed3si9n committed Aug 23, 2016
2 parents 83ed0bc + e6ac4ee commit a5e9af7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -3,7 +3,7 @@ language: scala
sudo: false

script:
- sbt test plugin/scripted
- sbt "so test"

jdk:
- openjdk6
Expand Down
22 changes: 19 additions & 3 deletions build.sbt
Expand Up @@ -29,6 +29,7 @@ lazy val root = (project in file(".")).
scmInfo := Some(ScmInfo(url("https://github.com/foundweekends/giter8"), "git@github.com:foundweekends/giter8.git"))
)),
name := "giter8",
crossScalaVersions := List(scala210, scala211),
siteGithubRepo := "foundweekends/giter8",
siteEmail := { "eed3si9n" + "@" + "gmail.com" }
)
Expand All @@ -40,6 +41,7 @@ lazy val app = (project in file("app")).
settings(
description := "Command line tool to apply templates defined on github",
name := "giter8",
crossScalaVersions := List(scala210, scala211),
sourceDirectory in csRun := { (baseDirectory).value.getParentFile / "src" / "main" / "conscript" },
libraryDependencies ++= Seq(scopt),
buildInfoKeys := Seq(name, version, scalaVersion, sbtVersion),
Expand All @@ -53,13 +55,17 @@ lazy val scaffold = (project in file("scaffold")).
name := "sbt-giter8-scaffold",
description := "sbt plugin for scaffolding giter8 templates",
sbtPlugin := true,
crossScalaVersions := List(scala210),
scriptedSettings,
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)
scripted <<= ScriptedPlugin.scripted dependsOn(publishLocal in lib),
test in Test := {
scripted.toTask("").value
}
)

lazy val plugin = (project in file("plugin")).
Expand All @@ -70,14 +76,18 @@ lazy val plugin = (project in file("plugin")).
scriptedSettings,
description := "sbt plugin for testing giter8 templates",
sbtPlugin := true,
crossScalaVersions := List(scala210),
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" % _)
libraryDependencies <+= sbtVersion("org.scala-sbt" % "scripted-plugin" % _),
test in Test := {
scripted.toTask("").value
}
)

lazy val lib = (project in file("library")).
Expand All @@ -86,8 +96,14 @@ lazy val lib = (project in file("library")).
settings(
name := "giter8-lib",
description := "shared library for app and plugin",
crossScalaVersions := List(scala210, scala211),
libraryDependencies ++= Seq(
scalasti, jline, jgit, commonsIo, plexusArchiver,
scalacheck % Test, sbtIo % Test
)
) ++
(CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, scalaMajor)) if scalaMajor >= 11 =>
Seq(scalaXml, parserCombinator)
case _ => Nil
})
)
14 changes: 7 additions & 7 deletions notes/0.7.0.markdown
Expand Up @@ -6,28 +6,28 @@ This is the first release since the development is passed on to
- We've relicensed Giter8 under Apache v2 license after contacting
previous contributors and getting their approvals. [#194][194]
- Organization name is changed to `org.foundweekends.giter8`.
- The sbt plugin was renamed to `sbt-giter8` and `sbt-giter8-scaffold`.
- The sbt plugins were renamed to `sbt-giter8` and `sbt-giter8-scaffold`.
- Created Pamflet [documentation][docs].

### bug fixes and improvements

- Better error handling when templates do not compile. [#193][193] by [@njlg][@njlg]
- Support git URLs that start with `ssh://`. [#192][192] by [@njlg][@njlg]
- Supports Git URLs that start with `ssh://`. [#192][192] by [@njlg][@njlg]
- Fixes sbt-giter8 not expanding dynamic default properties. [#165][165] by [@sattvik][@sattvik]
- `ls(..)` properties is dropped. [#201][201] by [@eed3si9n][@eed3si9n]
- `ls(..)` property is dropped. [#201][201] by [@eed3si9n][@eed3si9n]

### root layout

Giter8 0.7.0 introduces an experimental layout called *root layout*.
Giter8 0.7.0 introduces an *experimental* layout called *root layout*.
When Giter8 does not find `src/main/g8`, it will simply use the root directory
of the specified Git repository as the template directory.

The `default.properties` file can be placed either at the root directory
or in `project` directory.
Since you can no longer include template fields in the files
under `project` its application is very limited. [#202][202] by [@eed3si9n][@eed3si9n]
This also means that you can no longer include template fields in the files
under `project`, so the application of root layout is pretty limited. [#202][202] by [@eed3si9n][@eed3si9n]

#### upgrade
### upgrade

If you're using conscript:

Expand Down
6 changes: 5 additions & 1 deletion project/Dependencies.scala
Expand Up @@ -4,7 +4,7 @@ object Dependencies {
val scalasti = "org.clapper" %% "scalasti" % "2.0.0"
val jline = "jline" % "jline" % "2.13"
val commonsIo = "commons-io" % "commons-io" % "2.4"
val plexusArchiver = "org.codehaus.plexus" % "plexus-archiver" % "2.2" excludeAll(
val plexusArchiver = "org.codehaus.plexus" % "plexus-archiver" % "2.7.1" excludeAll(
ExclusionRule("org.apache.commons", "commons-compress"),
ExclusionRule("classworlds", "classworlds"),
ExclusionRule("org.tukaani", "xz"),
Expand All @@ -18,4 +18,8 @@ object Dependencies {
val scopt = "com.github.scopt" %% "scopt" % "3.5.0"
val scalacheck = "org.scalacheck" %% "scalacheck" % "1.13.0"
val sbtIo = "org.scala-sbt" %% "io" % "1.0.0-M6"
val scala210 = "2.10.6"
val scala211 = "2.11.8"
val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.0.5"
val parserCombinator = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.3"
}
1 change: 1 addition & 0 deletions project/doge.sbt
@@ -0,0 +1 @@
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")

0 comments on commit a5e9af7

Please sign in to comment.