Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
This commit is contained in:
Miguel Molina
2017-09-07 12:44:06 +02:00
committed by Alfredo Beaumont
parent 5b05a3bcc4
commit d6e70542da
5 changed files with 82 additions and 2 deletions

View File

@ -1,12 +1,41 @@
name := "enry-java"
organization := "tech.sourced"
version := "1.0"
version := "1.0.0"
sonatypeProfileName := "tech.sourced"
// pom settings for sonatype
homepage := Some(url("https://github.com/src-d/enry"))
scmInfo := Some(ScmInfo(url("https://github.com/src-d/enry"),
"git@github.com:src-d/enry.git"))
developers += Developer("abeaumont",
"Alfredo Beaumont",
"alfredo@sourced.tech",
url("https://github.com/abeaumont"))
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
pomIncludeRepository := (_ => false)
crossPaths := false
autoScalaLibrary := false
publishMavenStyle := true
exportJars := true
val SONATYPE_USERNAME = scala.util.Properties.envOrElse("SONATYPE_USERNAME", "NOT_SET")
val SONATYPE_PASSWORD = scala.util.Properties.envOrElse("SONATYPE_PASSWORD", "NOT_SET")
credentials += Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
SONATYPE_USERNAME,
SONATYPE_PASSWORD)
val SONATYPE_PASSPHRASE = scala.util.Properties.envOrElse("SONATYPE_PASSPHRASE", "not set")
useGpg := false
usePgpKeyHex("F75439CAE8DDB254")
pgpSecretRing := baseDirectory.value / "project" / ".gnupg" / "secring.gpg"
pgpPublicRing := baseDirectory.value / "project" / ".gnupg" / "pubring.gpg"
pgpPassphrase := Some(SONATYPE_PASSPHRASE.toArray)
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test
unmanagedBase := baseDirectory.value / "lib"
@ -23,3 +52,12 @@ artifact in (Compile, assembly) := {
}
addArtifact(artifact in (Compile, assembly), assembly)
isSnapshot := version.value endsWith "SNAPSHOT"
publishTo := Some(
if (isSnapshot.value)
"snapshots" at nexus + "content/repositories/snapshots"
else
"releases" at nexus + "service/local/staging/deploy/maven2"
)