Skip to content

Commit 0fd512a

Browse files
committed
Use sbt 1
1 parent 99b88ed commit 0fd512a

File tree

3 files changed

+59
-58
lines changed

3 files changed

+59
-58
lines changed

build.sbt

Lines changed: 58 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,61 +8,68 @@ crossScalaVersions := Seq(scalaVersion.value, "2.12.4")
88
libraryDependencies ++= Seq("org.specs2" %% "specs2-core" % "4.0.2" % Test)
99

1010
// Sonatype repository settings
11-
credentials += Credentials(
11+
ThisBuild / credentials += Credentials(
1212
"Sonatype Nexus Repository Manager",
1313
"oss.sonatype.org",
1414
sys.env.getOrElse("SONATYPE_USER", "username"),
1515
sys.env.getOrElse("SONATYPE_PASSWORD", "password")
1616
)
17-
publishMavenStyle := true
18-
publishArtifact in Test := false
19-
pomIncludeRepository := { _ =>
17+
ThisBuild / organization := "com.codacy"
18+
ThisBuild / organizationName := "Codacy"
19+
ThisBuild / organizationHomepage := Some(url("https://www.codacy.com"))
20+
21+
ThisBuild / scmInfo := Some(
22+
ScmInfo(
23+
url("https://github.com/your-account/your-project"),
24+
"scm:[email protected]:your-account/your-project.git"
25+
)
26+
)
27+
ThisBuild / developers := List(
28+
Developer(
29+
id = "johannegger",
30+
name = "Johann",
31+
email = "johann [at] codacy.com",
32+
url = url("https://github.com/johannegger")
33+
),
34+
Developer(
35+
id = "rtfpessoa",
36+
name = "Rodrigo Fernandes",
37+
email = "rodrigo [at] codacy.com",
38+
url = url("https://github.com/rtfpessoa")
39+
),
40+
Developer(
41+
id = "bmbferreira",
42+
name = "Bruno Ferreira",
43+
email = "bruno.ferreira [at] codacy.com",
44+
url = url("https://github.com/bmbferreira")
45+
),
46+
Developer(id = "xplosunn",
47+
name = "Hugo Sousa",
48+
email = "hugo [at] codacy.com",
49+
url = url("https://github.com/xplosunn")),
50+
Developer(
51+
id = "pedrocodacy",
52+
name = "Pedro Amaral",
53+
email = "pamaral [at] codacy.com",
54+
url = url("https://github.com/pedrocodacy")
55+
)
56+
)
57+
58+
ThisBuild / startYear := Some(2016)
59+
ThisBuild / description := "Library to develop Codacy tool plugins"
60+
ThisBuild / licenses := List(
61+
"The Apache Software License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
62+
ThisBuild / homepage := Some(url("http://www.github.com/codacy/codacy-plugins-api/"))
63+
64+
// Remove all additional repository other than Maven Central from POM
65+
ThisBuild / pomIncludeRepository := { _ =>
2066
false
2167
}
22-
// Add the default sonatype repository setting
23-
publishTo := sonatypePublishTo.value
24-
25-
organizationName := "Codacy"
26-
organizationHomepage := Some(new URL("https://www.codacy.com"))
27-
startYear := Some(2016)
28-
description := "Library to develop Codacy tool plugins"
29-
licenses := Seq("The Apache Software License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
30-
homepage := Some(url("http://www.github.com/codacy/codacy-plugins-api/"))
31-
pomExtra :=
32-
<scm>
33-
<url>https://github.com/codacy/codacy-plugins-api</url>
34-
<connection>scm:git:git@github.com:codacy/codacy-plugins-api.git</connection>
35-
<developerConnection>scm:git:https://github.com/codacy/codacy-plugins-api.git</developerConnection>
36-
</scm>
37-
<developers>
38-
<developer>
39-
<id>johannegger</id>
40-
<name>Johann</name>
41-
<email>johann [at] codacy.com</email>
42-
<url>https://github.com/johannegger</url>
43-
</developer>
44-
<developer>
45-
<id>rtfpessoa</id>
46-
<name>Rodrigo Fernandes</name>
47-
<email>rodrigo [at] codacy.com</email>
48-
<url>https://github.com/rtfpessoa</url>
49-
</developer>
50-
<developer>
51-
<id>bmbferreira</id>
52-
<name>Bruno Ferreira</name>
53-
<email>bruno.ferreira [at] codacy.com</email>
54-
<url>https://github.com/bmbferreira</url>
55-
</developer>
56-
<developer>
57-
<id>xplosunn</id>
58-
<name>Hugo Sousa</name>
59-
<email>hugo [at] codacy.com</email>
60-
<url>https://github.com/xplosunn</url>
61-
</developer>
62-
<developer>
63-
<id>pedrocodacy</id>
64-
<name>Pedro Amaral</name>
65-
<email>pamaral [at] codacy.com</email>
66-
<url>https://github.com/pedrocodacy</url>
67-
</developer>
68-
</developers>
68+
ThisBuild / publishTo := sonatypePublishTo.value
69+
// ThisBuild / publishTo := {
70+
// val nexus = "https://oss.sonatype.org/"
71+
// if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
72+
// else Some("releases" at nexus + "service/local/staging/deploy/maven2")
73+
// }
74+
ThisBuild / publishMavenStyle := true
75+
ThisBuild / publishArtifact in Test := false

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.17
1+
sbt.version=1.2.3

project/plugins.sbt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import sbt._
22

3-
resolvers ++= Seq(DefaultMavenRepository,
4-
"Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",
5-
"Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/",
6-
Classpaths.typesafeReleases,
7-
Classpaths.sbtPluginReleases)
8-
93
// Sonatype publishing
104
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
115
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1")

0 commit comments

Comments
 (0)