|
1 |
| -sbtPlugin := true |
2 |
| -enablePlugins(SbtPlugin) |
| 1 | +ThisBuild / version := { |
| 2 | + if ((ThisBuild / isSnapshot).value) "0.5.0" + "-SNAPSHOT" |
| 3 | + else (ThisBuild / version).value |
| 4 | +} |
| 5 | +ThisBuild / scalaVersion := "2.12.15" |
3 | 6 |
|
4 |
| -organization := "com.lightbend.sbt" |
5 |
| -homepage := Some(url("https://github.com/sbt/sbt-proguard")) |
6 |
| -name := "sbt-proguard" |
7 |
| -publishMavenStyle := false |
| 7 | +lazy val root = (project in file(".")) |
| 8 | + .enablePlugins(SbtPlugin) |
| 9 | + .settings(nocomma { |
| 10 | + name := "sbt-proguard" |
8 | 11 |
|
9 |
| -scriptedDependencies := publishLocal.value |
10 |
| -scriptedLaunchOpts ++= Seq("-Xms512m", "-Xmx512m", s"-Dproject.version=${version.value}") |
11 |
| -//scriptedBufferLog := false |
| 12 | + scalacOptions ++= Seq( |
| 13 | + "-unchecked", |
| 14 | + "-deprecation", |
| 15 | + "-feature", |
| 16 | + "-Xlint", |
| 17 | + "-Xfatal-warnings", |
| 18 | + ) |
| 19 | + |
| 20 | + scriptedDependencies := publishLocal.value |
| 21 | + scriptedLaunchOpts ++= Seq("-Xms512m", "-Xmx512m", s"-Dproject.version=${version.value}") |
| 22 | + // scriptedBufferLog := false |
| 23 | + |
| 24 | + pluginCrossBuild / sbtVersion := { |
| 25 | + scalaBinaryVersion.value match { |
| 26 | + case "2.12" => "1.1.6" // minimum sbt version |
| 27 | + } |
| 28 | + } |
| 29 | + }) |
| 30 | + |
| 31 | +Global / onChangedBuildSource := ReloadOnSourceChanges |
| 32 | +ThisBuild / organization := "com.github.sbt" |
| 33 | +ThisBuild / description := "an sbt plugin for Proguard" |
| 34 | +ThisBuild / homepage := Some(url("https://github.com/sbt/sbt-proguard")) |
| 35 | +ThisBuild / licenses := List("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.txt")) |
| 36 | +ThisBuild / developers := List( |
| 37 | + Developer( |
| 38 | + "pvlugter", |
| 39 | + "Peter Vlugter", |
| 40 | + "@pvlugter", |
| 41 | + url("https://github.com/pvlugter") |
| 42 | + ) |
| 43 | +) |
| 44 | +ThisBuild / publishTo := { |
| 45 | + val nexus = "https://oss.sonatype.org/" |
| 46 | + if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots") |
| 47 | + else Some("releases" at nexus + "service/local/staging/deploy/maven2") |
| 48 | +} |
| 49 | +ThisBuild / dynverSonatypeSnapshots := true |
0 commit comments