-
Notifications
You must be signed in to change notification settings - Fork 63
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
2 changed files
with
39 additions
and
15 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,18 +1,29 @@ | ||
val sbtScalariform = Project("sbt-scalariform", file(".")) | ||
|
||
val projectName = "sbt-scalariform" | ||
val sbtScalariform = Project(projectName, file(".")) | ||
sbtPlugin := true | ||
organization := "org.scalariform" | ||
name := "sbt-scalariform" | ||
name := projectName | ||
sonatypeProfileName := organization.value | ||
version in ThisBuild := "1.7.0" | ||
scalaVersion := "2.10.6" | ||
|
||
licenses := Seq(("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0"))) | ||
homepage := scmInfo.value map (_.browseUrl) | ||
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt-scalariform"), "scm:git:[email protected]:sbt/sbt-scalariform.git")) | ||
developers := List( | ||
Developer("hseeberger", "Heiko Seeberger", "mail at heikoseeberger de", url("http://blog.heikoseeberger.name/")), | ||
Developer("daniel-trinh", "Daniel Trinh", "daniel s trinh at gmail com", url("http://danieltrinh.com")) | ||
) | ||
|
||
sbtPlugin := true | ||
scmInfo := | ||
Some( | ||
ScmInfo(url("https://github.com/sbt/sbt-scalariform"), | ||
"scm:git:[email protected]:sbt/sbt-scalariform.git") | ||
) | ||
developers := List( | ||
Developer( | ||
"hseeberger", "Heiko Seeberger", "mail at heikoseeberger de", | ||
url("http://blog.heikoseeberger.name/") | ||
), | ||
Developer( | ||
"daniel-trinh", "Daniel Trinh", "daniel s trinh at gmail com", | ||
url("http://danieltrinh.com") | ||
) | ||
) | ||
|
||
scalacOptions ++= List( | ||
"-unchecked", | ||
|
@@ -23,8 +34,6 @@ scalacOptions ++= List( | |
"-encoding", "UTF-8" | ||
) | ||
|
||
resolvers ++= Seq(sonatypeSnapshots, sonatypeReleases) | ||
|
||
libraryDependencies += "org.scalariform" %% "scalariform" % "0.2.1" | ||
|
||
com.typesafe.sbt.SbtScalariform.ScalariformKeys.preferences := { | ||
|
@@ -37,10 +46,22 @@ com.typesafe.sbt.SbtScalariform.ScalariformKeys.preferences := { | |
.setPreference(SpacesAroundMultiImports, true) | ||
} | ||
|
||
publishTo := Some(if (isSnapshot.value) sonatypeSnapshots else sonatypeReleases) | ||
publishMavenStyle := true | ||
publishArtifact in Test := false | ||
publishArtifact in (Compile, packageDoc) := true | ||
publishArtifact in (Compile, packageSrc) := true | ||
pomIncludeRepository := { _ => false } | ||
buildInfoKeys := Seq[BuildInfoKey](version) | ||
buildInfoPackage := projectName | ||
publishTo := getPublishToRepo.value | ||
credentials ++= { | ||
val creds = Path.userHome / ".m2" / "credentials" | ||
if (creds.exists) Seq(Credentials(creds)) else Nil | ||
} | ||
|
||
val sonatypeSnapshots = "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" | ||
val sonatypeReleases = "Sonatype OSS Releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2" | ||
def getPublishToRepo = Def.setting { | ||
if (isSnapshot.value) | ||
Some(Opts.resolver.sonatypeSnapshots) | ||
else | ||
Some(Opts.resolver.sonatypeStaging) | ||
} |
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,4 @@ | ||
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0") | ||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") | ||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.6.1") | ||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1") |