2017-08-08 12:02:27 +02:00
|
|
|
name := "enry-java"
|
|
|
|
organization := "tech.sourced"
|
2017-09-07 12:44:06 +02:00
|
|
|
|
2018-10-21 12:26:43 +02:00
|
|
|
git.useGitDescribe := true
|
|
|
|
enablePlugins(GitVersioning)
|
2017-09-07 12:44:06 +02:00
|
|
|
|
|
|
|
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)
|
2017-08-08 12:02:27 +02:00
|
|
|
|
|
|
|
crossPaths := false
|
|
|
|
autoScalaLibrary := false
|
|
|
|
publishMavenStyle := true
|
|
|
|
exportJars := true
|
|
|
|
|
2017-09-07 12:44:06 +02:00
|
|
|
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
|
|
|
|
pgpSecretRing := baseDirectory.value / "project" / ".gnupg" / "secring.gpg"
|
|
|
|
pgpPublicRing := baseDirectory.value / "project" / ".gnupg" / "pubring.gpg"
|
|
|
|
pgpPassphrase := Some(SONATYPE_PASSPHRASE.toArray)
|
|
|
|
|
2018-10-21 15:40:25 +02:00
|
|
|
libraryDependencies += "com.nativelibs4java" % "jnaerator-runtime" % "0.12"
|
2017-08-08 12:02:27 +02:00
|
|
|
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test
|
|
|
|
|
|
|
|
unmanagedBase := baseDirectory.value / "lib"
|
|
|
|
unmanagedClasspath in Test += baseDirectory.value / "shared"
|
|
|
|
unmanagedClasspath in Runtime += baseDirectory.value / "shared"
|
|
|
|
unmanagedClasspath in Compile += baseDirectory.value / "shared"
|
|
|
|
testOptions += Tests.Argument(TestFrameworks.JUnit)
|
|
|
|
|
2017-09-04 11:49:14 +02:00
|
|
|
publishArtifact in (Compile, packageBin) := false
|
2017-08-11 09:55:22 +02:00
|
|
|
|
|
|
|
artifact in (Compile, assembly) := {
|
|
|
|
val art = (artifact in (Compile, assembly)).value
|
2017-09-04 11:49:14 +02:00
|
|
|
art.copy(`classifier` = None)
|
2017-08-11 09:55:22 +02:00
|
|
|
}
|
|
|
|
|
2017-09-04 11:49:14 +02:00
|
|
|
addArtifact(artifact in (Compile, assembly), assembly)
|
2017-09-07 12:44:06 +02:00
|
|
|
|
|
|
|
isSnapshot := version.value endsWith "SNAPSHOT"
|
|
|
|
|
2017-10-02 14:24:54 +02:00
|
|
|
publishTo := {
|
|
|
|
val nexus = "https://oss.sonatype.org/"
|
2017-09-07 12:44:06 +02:00
|
|
|
if (isSnapshot.value)
|
2017-10-02 14:24:54 +02:00
|
|
|
Some("snapshots" at nexus + "content/repositories/snapshots")
|
2017-09-07 12:44:06 +02:00
|
|
|
else
|
2017-10-02 14:24:54 +02:00
|
|
|
Some("releases" at nexus + "service/local/staging/deploy/maven2")
|
|
|
|
}
|