gitlab.com/thomasboni/go-enry/v2@v2.8.3-0.20220418031202-30b0d7a3de98/java/build.sbt (about) 1 name := "enry-java" 2 organization := "tech.sourced" 3 4 git.useGitDescribe := true 5 enablePlugins(GitVersioning) 6 7 sonatypeProfileName := "tech.sourced" 8 9 // pom settings for sonatype 10 homepage := Some(url("https://github.com/bzz/enry")) 11 scmInfo := Some(ScmInfo(url("https://github.com/bzz/enry"), 12 "git@github.com:src-d/enry.git")) 13 developers += Developer("abeaumont", 14 "Alfredo Beaumont", 15 "alfredo@sourced.tech", 16 url("https://github.com/abeaumont")) 17 developers += Developer("bzz", 18 "Alexander Bezzubov", 19 "alex@sourced.tech", 20 url("https://github.com/bzz")) 21 licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")) 22 pomIncludeRepository := (_ => false) 23 24 crossPaths := false 25 autoScalaLibrary := false 26 publishMavenStyle := true 27 exportJars := true 28 29 val SONATYPE_USERNAME = scala.util.Properties.envOrElse("SONATYPE_USERNAME", "NOT_SET") 30 val SONATYPE_PASSWORD = scala.util.Properties.envOrElse("SONATYPE_PASSWORD", "NOT_SET") 31 credentials += Credentials( 32 "Sonatype Nexus Repository Manager", 33 "oss.sonatype.org", 34 SONATYPE_USERNAME, 35 SONATYPE_PASSWORD) 36 37 val SONATYPE_PASSPHRASE = scala.util.Properties.envOrElse("SONATYPE_PASSPHRASE", "not set") 38 39 useGpg := false 40 pgpSecretRing := baseDirectory.value / "project" / ".gnupg" / "secring.gpg" 41 pgpPublicRing := baseDirectory.value / "project" / ".gnupg" / "pubring.gpg" 42 pgpPassphrase := Some(SONATYPE_PASSPHRASE.toArray) 43 44 libraryDependencies += "com.nativelibs4java" % "jnaerator-runtime" % "0.12" 45 libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test 46 47 unmanagedBase := baseDirectory.value / "lib" 48 unmanagedClasspath in Test += baseDirectory.value / "shared" 49 unmanagedClasspath in Runtime += baseDirectory.value / "shared" 50 unmanagedClasspath in Compile += baseDirectory.value / "shared" 51 testOptions += Tests.Argument(TestFrameworks.JUnit) 52 53 publishArtifact in (Compile, packageBin) := false 54 55 artifact in (Compile, assembly) := { 56 val art = (artifact in (Compile, assembly)).value 57 art.copy(`classifier` = None) 58 } 59 60 addArtifact(artifact in (Compile, assembly), assembly) 61 62 isSnapshot := version.value endsWith "SNAPSHOT" 63 64 publishTo := { 65 val nexus = "https://oss.sonatype.org/" 66 if (isSnapshot.value) 67 Some("snapshots" at nexus + "content/repositories/snapshots") 68 else 69 Some("releases" at nexus + "service/local/staging/deploy/maven2") 70 }