Skip to content

Commit

Permalink
Updated build.sbt (#258)
Browse files Browse the repository at this point in the history
* Removed bintrayOrganization in build.sbt
* Removed buildinfo settings in build.sbt
* Used inThisBuild instead of commons settings
* Used sbt 1.2.6
* Removed jvm options when calling sbt
  • Loading branch information
MFSY authored Nov 19, 2018
1 parent 0c8ea29 commit 4133afb
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 46 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
include:
- stage: test
script:
- sbt -javaOptions=.jvmopts compile
- sbt -javaOptions=.jvmopts test
- sbt clean compile
- sbt test
- stage: bintraypublish
before_install:
- openssl aes-256-cbc -K $encrypted_b14561f0d260_key -iv $encrypted_b14561f0d260_iv
-in .travis/secrets.tar.enc -out .travis/local.secrets.tar -d;
- tar xv -C .travis -f .travis/local.secrets.tar;
script:
- sbt -javaOptions=.jvmopts releaseEarly universal:packageZipTarball
- sbt releaseEarly
env:
global:
- secure: Mw/BpJUUFHbB7MAJIZOWgVjjQkM89Nzt2YVWHU51ErTu2FZMXvrg7etg2+CRXpI442lMJn8N2VLyFSphtDNAQ48kC7ZC0Nl1OrmhCJVDW+jtKwH6oDEUMAvCvdoRElYIoqZgD4rrN0BEOr4C8kxA3BBM+bnn/NCowB0wt+syywnF1uZPaGUttenCAjo4Zk8qrAgkTNuyJZo7kXiwf0em/jTknWA2SUdbMEb+LOV8CxgF5ILvM98Owr2XDzCerFR9uGMjHUwMHpbWWXlTN/ud9clLuohpuxO3yQu7GIibh0mMmvTjRpGUa6TG3xraP5tQ387pu+pYFPuyOJCys4dLHU9xzBkNEgmzdHtrR9GM088P7Sw5VCsZpi+t6WK7JSXRPL7WYsGAXhI71bcgpWeGdiYxbU4WhLuuPdhadorY0mzaNTnFyT9RvTAPGG4S/lMzoJ/+eTuvy3Vh37pAd1SdY9bl4dcg5jZmg91IqhAZqW4lvW4G5HKlhkQCUf6QEtP1Q3BuGcOtTJ5kwZ728JQb/gDvh3zArd16/WDZ10eVpwnx5wWVlcXr9ctdg6kTpAqQVPBlXDwTSPapgvKWV5nF8UmNuh5ikXxrc4xASKsCPsXampwariJ1qZQYsgDfjfrYlIea8RzeWZc675RBDqn1Cn6Hsox3WMYRlbO4KF4N4o8=
Expand Down
97 changes: 55 additions & 42 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/*
scalafmt: {
style = defaultWithAlign
maxColumn = 150
align.tokens = [
{ code = "=>", owner = "Case" }
{ code = "?", owner = "Case" }
{ code = "extends", owner = "Defn.(Class|Trait|Object)" }
{ code = "//", owner = ".*" }
{ code = "{", owner = "Template" }
{ code = "}", owner = "Template" }
{ code = ":=", owner = "Term.ApplyInfix" }
{ code = "++=", owner = "Term.ApplyInfix" }
{ code = "+=", owner = "Term.ApplyInfix" }
{ code = "%", owner = "Term.ApplyInfix" }
{ code = "%%", owner = "Term.ApplyInfix" }
{ code = "%%%", owner = "Term.ApplyInfix" }
{ code = "->", owner = "Term.ApplyInfix" }
{ code = "?", owner = "Term.ApplyInfix" }
{ code = "<-", owner = "Enumerator.Generator" }
{ code = "?", owner = "Enumerator.Generator" }
{ code = "=", owner = "(Enumerator.Val|Defn.(Va(l|r)|Def|Type))" }
]
}
*/

val commonsVersion = "0.7.6"
val provVersion = "1.1.1"
val kgVersion = "0.9.4"
Expand All @@ -8,10 +34,9 @@ lazy val kgSchemas = "ch.epfl.bluebrain.nexus" %% "kg-schemas" % kgVer

lazy val core = project
.in(file("modules/core"))
.enablePlugins(WorkbenchPlugin,BuildInfoPlugin)
.enablePlugins(WorkbenchPlugin)
.disablePlugins(ScapegoatSbtPlugin, DocumentationPlugin)
.dependsOn(nsgcommons)
.settings(common,publishSettings,buildInfoSettings)
.settings(
name := "nsg-core-schemas",
moduleName := "nsg-core-schemas"
Expand All @@ -21,7 +46,7 @@ lazy val nexusschema = project
.in(file("modules/nexus-schemas"))
.enablePlugins(WorkbenchPlugin)
.disablePlugins(ScapegoatSbtPlugin, DocumentationPlugin)
.settings(common, noPublish)
.settings(noPublish)
.settings(
noPublish,
name := "kg-nsg-schemas",
Expand All @@ -35,21 +60,19 @@ lazy val nexusschema = project

lazy val experiment = project
.in(file("modules/experiment"))
.enablePlugins(WorkbenchPlugin,BuildInfoPlugin)
.enablePlugins(WorkbenchPlugin)
.disablePlugins(ScapegoatSbtPlugin, DocumentationPlugin)
.dependsOn(core)
.settings(common,publishSettings,buildInfoSettings)
.settings(
name := "nsg-experiment-schemas",
moduleName := "nsg-experiment-schemas"
)

lazy val nsgcommons = project
.in(file("modules/commons"))
.enablePlugins(WorkbenchPlugin,BuildInfoPlugin)
.enablePlugins(WorkbenchPlugin)
.disablePlugins(ScapegoatSbtPlugin, DocumentationPlugin)
.dependsOn(nexusschema)
.settings(common,publishSettings,buildInfoSettings)
.settings(
name := "nsg-commons-schemas",
moduleName := "nsg-commons-schemas",
Expand All @@ -58,43 +81,39 @@ lazy val nsgcommons = project

lazy val atlas = project
.in(file("modules/atlas"))
.enablePlugins(WorkbenchPlugin,BuildInfoPlugin)
.enablePlugins(WorkbenchPlugin)
.disablePlugins(ScapegoatSbtPlugin, DocumentationPlugin)
.dependsOn(experiment)
.settings(common,publishSettings,buildInfoSettings)
.settings(
name := "nsg-atlas-schemas",
moduleName := "nsg-atlas-schemas"
)

lazy val electrophysiology = project
.in(file("modules/electrophysiology"))
.enablePlugins(WorkbenchPlugin,BuildInfoPlugin)
.enablePlugins(WorkbenchPlugin)
.disablePlugins(ScapegoatSbtPlugin, DocumentationPlugin)
.dependsOn(experiment)
.settings(common,publishSettings,buildInfoSettings)
.settings(
name := "nsg-electrophysiology-schemas",
moduleName := "nsg-electrophysiology-schemas"
)

lazy val morphology = project
.in(file("modules/morphology"))
.enablePlugins(WorkbenchPlugin,BuildInfoPlugin)
.enablePlugins(WorkbenchPlugin)
.disablePlugins(ScapegoatSbtPlugin, DocumentationPlugin)
.dependsOn(experiment)
.settings(common,publishSettings,buildInfoSettings)
.settings(
name := "nsg-morphology-schemas",
moduleName := "nsg-morphology-schemas"
)

lazy val simulation = project
.in(file("modules/simulation"))
.enablePlugins(WorkbenchPlugin,BuildInfoPlugin, ServicePackagingPlugin)
.enablePlugins(WorkbenchPlugin)
.disablePlugins(ScapegoatSbtPlugin, DocumentationPlugin)
.dependsOn(core)
.settings(common,publishSettings,buildInfoSettings)
.settings(
name := "nsg-simulation-schemas",
moduleName := "nsg-simulation-schemas"
Expand All @@ -104,43 +123,37 @@ lazy val simulation = project
lazy val root = project
.in(file("."))
.settings(name := "nsg-schemas", moduleName := "nsg-schemas")
.settings(common, noPublish)
.settings(noPublish)
.aggregate(core, experiment, atlas, morphology, electrophysiology, simulation, nexusschema,nsgcommons)

lazy val common = Seq(
scalacOptions in (Compile, console) ~= (_ filterNot (_ == "-Xfatal-warnings")),
autoScalaLibrary := false,
workbenchVersion := "0.3.2",
bintrayOmitLicense := true,
homepage := Some(url("https://github.com/INCF/neuroshapes")),
licenses := Seq("CC-4.0" -> url("https://github.com/INCF/neuroshapes/blob/master/LICENSE")),
developers := List(
inThisBuild(
List(
workbenchVersion := "0.3.2",
bintrayOmitLicense := true,
homepage := Some(url("https://github.com/INCF/neuroshapes")),
licenses := Seq("CC-4.0" -> url("https://github.com/INCF/neuroshapes/blob/master/LICENSE")),
developers := List(
Developer("MFSY", "Mohameth François Sy", "[email protected]", url("https://incf.github.io/neuroshapes/")),
Developer("annakristinkaufmann", "Anna-Kristin Kaufmann", "[email protected]", url("https://incf.github.io/neuroshapes/")),
Developer("huanxiang", "Lu Huanxiang", "[email protected]", url("https://incf.github.io/neuroshapes/")),
Developer("apdavison", "Andrew Davison", "[email protected]", url("https://incf.github.io/neuroshapes/")),
Developer("genric", "Ivaska Genrich", "[email protected]", url("https://incf.github.io/neuroshapes/"))
),
scmInfo := Some(
ScmInfo(url("https://github.com/INCF/neuroshapes"), "scm:git:git@https://github.com/INCF/neuroshapes.git"))
)
),
scmInfo := Some(ScmInfo(url("https://github.com/INCF/neuroshapes"), "scm:git:git@https://github.com/INCF/neuroshapes.git")),
// These are the sbt-release-early settings to configure
releaseEarlyWith := BintrayPublisher,
bintrayRepository := "maven",
releaseEarlyNoGpg := true,
releaseEarlyEnableSyncToMaven := false,
))

lazy val buildInfoSettings = Seq(
buildInfoKeys := Seq[BuildInfoKey](version),
buildInfoPackage := s"$name-${version}"
)

lazy val publishSettings = Seq(
releaseEarlyWith := BintrayPublisher,
bintrayOrganization := Some("neuroshapes"),
bintrayRepository := "maven",
releaseEarlyNoGpg := true,
releaseEarlyEnableSyncToMaven := false
)



lazy val noPublish = Seq(publishLocal := {}, publish := {})
lazy val noPublish = Seq(
publishLocal := {},
publish := {},
publishArtifact := false,
)

addCommandAlias("review", ";clean;test")
addCommandAlias("rel", ";release with-defaults skip-tests")
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.1.1
sbt.version = 1.2.6

0 comments on commit 4133afb

Please sign in to comment.