2017-08-08 10:02:27 +00:00
|
|
|
name := "enry-java"
|
|
|
|
organization := "tech.sourced"
|
2017-09-07 10:44:06 +00:00
|
|
|
|
2018-10-21 10:26:43 +00:00
|
|
|
git.useGitDescribe := true
|
|
|
|
enablePlugins(GitVersioning)
|
2017-09-07 10:44:06 +00:00
|
|
|
|
|
|
|
sonatypeProfileName := "tech.sourced"
|
|
|
|
|
|
|
|
// pom settings for sonatype
|
2020-03-19 10:10:03 +00:00
|
|
|
homepage := Some(url("https://github.com/bzz/enry"))
|
|
|
|
scmInfo := Some(ScmInfo(url("https://github.com/bzz/enry"),
|
2017-09-07 10:44:06 +00:00
|
|
|
"git@github.com:src-d/enry.git"))
|
|
|
|
developers += Developer("abeaumont",
|
|
|
|
"Alfredo Beaumont",
|
|
|
|
"alfredo@sourced.tech",
|
|
|
|
url("https://github.com/abeaumont"))
|
2019-04-14 17:28:51 +00:00
|
|
|
developers += Developer("bzz",
|
|
|
|
"Alexander Bezzubov",
|
|
|
|
"alex@sourced.tech",
|
|
|
|
url("https://github.com/bzz"))
|
2017-09-07 10:44:06 +00:00
|
|
|
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
|
|
|
|
pomIncludeRepository := (_ => false)
|
2017-08-08 10:02:27 +00:00
|
|
|
|
|
|
|
crossPaths := false
|
|
|
|
autoScalaLibrary := false
|
|
|
|
publishMavenStyle := true
|
|
|
|
exportJars := true
|
|
|
|
|
2017-09-07 10:44:06 +00: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 13:40:25 +00:00
|
|
|
libraryDependencies += "com.nativelibs4java" % "jnaerator-runtime" % "0.12"
|
2017-08-08 10:02:27 +00: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 09:49:14 +00:00
|
|
|
publishArtifact in (Compile, packageBin) := false
|
2017-08-11 07:55:22 +00:00
|
|
|
|
|
|
|
artifact in (Compile, assembly) := {
|
|
|
|
val art = (artifact in (Compile, assembly)).value
|
2017-09-04 09:49:14 +00:00
|
|
|
art.copy(`classifier` = None)
|
2017-08-11 07:55:22 +00:00
|
|
|
}
|
|
|
|
|
2017-09-04 09:49:14 +00:00
|
|
|
addArtifact(artifact in (Compile, assembly), assembly)
|
2017-09-07 10:44:06 +00:00
|
|
|
|
|
|
|
isSnapshot := version.value endsWith "SNAPSHOT"
|
|
|
|
|
2017-10-02 12:24:54 +00:00
|
|
|
publishTo := {
|
|
|
|
val nexus = "https://oss.sonatype.org/"
|
2017-09-07 10:44:06 +00:00
|
|
|
if (isSnapshot.value)
|
2017-10-02 12:24:54 +00:00
|
|
|
Some("snapshots" at nexus + "content/repositories/snapshots")
|
2017-09-07 10:44:06 +00:00
|
|
|
else
|
2017-10-02 12:24:54 +00:00
|
|
|
Some("releases" at nexus + "service/local/staging/deploy/maven2")
|
|
|
|
}
|