bitcoin-s/build.sbt
Chris Stewart ad3f935e4e WIP: Add ability to publish to bintray, take on the org.scijava native-lib… (#268)
* Add ability to publish to bintray, take on the org.scijava native-lib-loader dependenency so we can bundle secp256k1 natively in a jar file and publish. This dependency will allow us to link the correct secp256k1 version dependending on the os and arch in the future

* Add sbt-pgp plugin to sign binaries, modify project names to all have the 'bitcoin-s-' prefix.

* Adding linux 32 bit secp256k1 natives to secp256k1jni project

* Add mising linux_64 binaries

* remove unused symlinks
2018-12-14 13:09:53 -06:00

145 lines
2.7 KiB
Scala

cancelable in Global := true
lazy val commonCompilerOpts = {
List(
"-Xmax-classfile-name",
"128"
)
}
//https://docs.scala-lang.org/overviews/compiler-options/index.html
lazy val compilerOpts = Seq(
"-target:jvm-1.8",
"-encoding",
"UTF-8",
"-unchecked",
"-feature",
"-deprecation",
"-Xfuture",
"-Ywarn-dead-code",
"-Ywarn-unused-import",
"-Ywarn-value-discard",
"-Ywarn-unused",
"-unchecked",
"-deprecation",
"-feature"
) ++ commonCompilerOpts
lazy val testCompilerOpts = commonCompilerOpts
lazy val commonSettings = List(
scalacOptions in Compile := compilerOpts,
scalacOptions in Test := testCompilerOpts,
assemblyOption in assembly := (assemblyOption in assembly).value
.copy(includeScala = false),
bintrayOrganization := Some("bitcoin-s"),
bintrayRepository := "bitcoin-s-core",
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
)
lazy val root = project
.in(file("."))
.aggregate(
secp256k1jni,
core,
coreGen,
coreTest,
zmq,
rpc,
bench,
eclairRpc,
testkit
)
.settings(commonSettings: _*)
lazy val secp256k1jni = project
.in(file("secp256k1jni"))
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Deps.secp256k1jni,
unmanagedResourceDirectories in Compile += baseDirectory.value / "natives"
)
.enablePlugins()
lazy val core = project
.in(file("core"))
.enablePlugins()
.settings(commonSettings: _*)
.dependsOn(
secp256k1jni
)
lazy val coreGen = project
.in(file("core-gen"))
.enablePlugins()
.settings(commonSettings: _*)
.dependsOn(
core
)
lazy val coreTest = project
.in(file("core-test"))
.enablePlugins()
.settings(commonSettings: _*)
.dependsOn(
core,
coreGen % "test->test"
)
lazy val zmq = project
.in(file("zmq"))
.enablePlugins()
.settings(commonSettings: _*)
.dependsOn(
core
)
lazy val rpc = project
.in(file("rpc"))
.enablePlugins()
.settings(commonSettings: _*)
.dependsOn(
core,
coreGen % "test->test"
)
.settings(
testOptions in Test += Tests.Argument("-oF")
)
lazy val bench = project
.in(file("bench"))
.enablePlugins()
.settings(assemblyOption in assembly := (assemblyOption in assembly).value
.copy(includeScala = true))
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Deps.bench,
name := "bitcoin-s-bench"
)
.dependsOn(core)
lazy val eclairRpc = project
.in(file("eclair-rpc"))
.enablePlugins()
.settings(commonSettings: _*)
.dependsOn(
core,
rpc
)
lazy val testkit = project
.in(file("testkit"))
.enablePlugins()
.settings(commonSettings: _*)
.dependsOn(
core,
rpc,
eclairRpc
)
publishArtifact in root := false