This repository has been archived by the owner on Nov 16, 2017. It is now read-only.
forked from sbt/sbt-houserules
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
10 changed files
with
109 additions
and
83 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 @@ | ||
target/ |
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,9 @@ | ||
# Sbt Scalariform | ||
|
||
> Scalariform auto plugin with custom formatting settings | ||
## Installation | ||
|
||
```` | ||
addSbtPlugin( "io.taig" %% "sbt-scalariform" % "1.0.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,11 @@ | ||
lazy val commonSettings = Seq( | ||
organization := "org.scala-sbt", | ||
version := "0.1.0" | ||
) | ||
addSbtPlugin( "org.scalariform" % "sbt-scalariform" % "1.4.0" ) | ||
|
||
lazy val root = (project in file(".")). | ||
settings( | ||
commonSettings ++ | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0") ++ | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.6.1") | ||
: _*). | ||
settings( | ||
sbtPlugin := true, | ||
name := "sbt-houserules", | ||
description := "sbt plugin for enforcing sbt house rules.", | ||
licenses := Seq("Apache v2" -> url("https://github.com/sbt/sbt-houserules/blob/master/LICENSE")), | ||
publishMavenStyle := false, | ||
publishTo := { | ||
if (isSnapshot.value) Some(Resolver.sbtPluginRepo("snapshots")) | ||
else Some(Resolver.sbtPluginRepo("releases")) | ||
}, | ||
credentials += Credentials(Path.userHome / ".ivy2" / ".sbtcredentials") | ||
) | ||
name := "SbtScalariform" | ||
|
||
normalizedName := "sbt-scalariform" | ||
|
||
organization := "io.taig" | ||
|
||
sbtPlugin := true | ||
|
||
version := "1.0.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=0.13.7 | ||
sbt.version=0.13.9 |
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 @@ | ||
addSbtPlugin( "com.jsuereth" % "sbt-pgp" % "1.0.0" ) | ||
|
||
addSbtPlugin( "org.xerial.sbt" % "sbt-sonatype" % "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
description := "Scalariform auto plugin with custom formatting settings" | ||
|
||
homepage := Some( url( "https://github.com/taig/sbtscalariform" ) ) | ||
|
||
licenses := Seq( "MIT" -> url( "https://raw.githubusercontent.com/taig/sbtscalariform/master/LICENSE" ) ) | ||
|
||
organizationHomepage := Some( url( "http://taig.io" ) ) | ||
|
||
pomExtra := { | ||
<issueManagement> | ||
<url>https://github.com/taig/sbtscalariform/issues</url> | ||
<system>GitHub Issues</system> | ||
</issueManagement> | ||
<developers> | ||
<developer> | ||
<id>Taig</id> | ||
<name>Niklas Klein</name> | ||
<email>mail@taig.io</email> | ||
<url>http://taig.io/</url> | ||
</developer> | ||
</developers> | ||
} | ||
|
||
pomIncludeRepository := { _ => false } | ||
|
||
publishArtifact in Test := false | ||
|
||
publishMavenStyle := true | ||
|
||
publishTo <<= version ( version => { | ||
val url = Some( "https://oss.sonatype.org/" ) | ||
|
||
if( version.endsWith( "SNAPSHOT" ) ) { | ||
url.map( "snapshot" at _ + "content/repositories/snapshots" ) | ||
} | ||
else { | ||
url.map( "release" at _ + "service/local/staging/deploy/maven2" ) | ||
} | ||
} ) | ||
|
||
scmInfo := Some( | ||
ScmInfo( | ||
url( "https://github.com/taig/sbtscalariform" ), | ||
"scm:git:git://github.com/taig/sbtscalariform.git", | ||
Some( "scm:git:git@github.com:taig/sbtscalariform.git" ) | ||
) | ||
) | ||
|
||
startYear := Some( 2015 ) |
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,36 @@ | ||
package io.taig | ||
|
||
import com.typesafe.sbt.SbtScalariform.{ScalariformKeys, scalariformSettings} | ||
import sbt._ | ||
|
||
import scalariform.formatter.preferences._ | ||
|
||
object FormatPlugin extends AutoPlugin { | ||
override def requires = plugins.JvmPlugin | ||
|
||
override def trigger = allRequirements | ||
|
||
override def projectSettings: Seq[Def.Setting[_]] = scalariformSettings ++ Seq( | ||
ScalariformKeys.preferences := ScalariformKeys.preferences.value | ||
.setPreference( AlignParameters, true ) | ||
.setPreference( AlignArguments, true ) | ||
.setPreference( AlignSingleLineCaseStatements, true ) | ||
.setPreference( CompactControlReadability, true ) | ||
.setPreference( CompactStringConcatenation, false ) | ||
.setPreference( DoubleIndentClassDeclaration, true ) | ||
.setPreference( FormatXml, false ) | ||
.setPreference( IndentLocalDefs, false ) | ||
.setPreference( IndentPackageBlocks, true ) | ||
.setPreference( IndentSpaces, 4 ) | ||
.setPreference( IndentWithTabs, false ) | ||
.setPreference( MultilineScaladocCommentsStartOnFirstLine, false ) | ||
.setPreference( PlaceScaladocAsterisksBeneathSecondAsterisk, false ) | ||
.setPreference( PreserveSpaceBeforeArguments, true ) | ||
.setPreference( RewriteArrowSymbols, true ) | ||
.setPreference( SpaceBeforeColon, false ) | ||
.setPreference( SpaceInsideBrackets, false ) | ||
.setPreference( SpaceInsideParentheses, true ) | ||
.setPreference( SpacesWithinPatternBinders, true ) | ||
.setPreference( SpacesAroundMultiImports, true ) | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.