<commit_before>
import com.github.retronym.SbtOneJar
import com.typesafe.sbt.osgi
import osgi.OsgiKeys._
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._

import scalariform.formatter.preferences._

organization := "fr.iscpif"
name := "gridscale-root"

lazy val root = (project in file(".")).
  aggregate(
    gridscale,
    gridscaleEGI,
    gridscaleHTTP,
    gridscaleSSH,
    gridscaleCondor,
    gridscalePBS,
    gridscaleSLURM,
    gridscaleSGE,
    gridscaleOAR,
    gridscaleBundle,
    egiBundle,
    httpBundle,
    sshBundle,
    condorBundle,
    pbsBundle,
    slurmBundle,
    sgeBundle,
    oarBundle
  ) settings(
    publishArtifact := false
  )

releaseVersionBump := sbtrelease.Version.Bump.Minor

releaseTagComment    := s"Releasing ${(version in ThisBuild).value}"

releaseCommitMessage := s"Bump version to ${(version in ThisBuild).value}"

releaseProcess := Seq[ReleaseStep](
  checkSnapshotDependencies,
  inquireVersions,
  runClean,
  runTest,
  setReleaseVersion,
  tagRelease,
  ReleaseStep(action = Command.process("publishSigned", _)),
  setNextVersion,
  commitNextVersion,
  ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
  pushChanges
)

scalariformSettings


def settings = Seq (
  scalaVersion := "2.11.8",
  crossScalaVersions := Seq("2.11.8"),
  javacOptions in (Compile, compile) ++= Seq("-source", "1.7", "-target", "1.7"),
  scalacOptions += "-target:jvm-1.7"
)

def exportSettings = Seq(
  exportJars := true
) ++ SbtOneJar.oneJarSettings


lazy val publishDir = settingKey[File]("Publishing directory")
lazy val publishIpfs = taskKey[Unit]("Publish to IPFS")


lazy val defaultSettings =
  settings ++
    scalariformSettings ++ Seq(
  ScalariformKeys.preferences :=
    ScalariformKeys.preferences.value
      .setPreference(AlignSingleLineCaseStatements, true)
      .setPreference(RewriteArrowSymbols, true),

  organization := "fr.iscpif.gridscale",

  publishDir := {
    import java.io.File
    val dir = new File("/export/ivy/")
    dir.mkdirs()
    dir
  },

  publishTo := Some(Resolver.file("ipfs", publishDir.value)(Resolver.ivyStylePatterns)),

  licenses := Seq("Affero GPLv3" -> url("http://www.gnu.org/licenses/")),
  homepage := Some(url("https://github.com/openmole/gridscale")),

  /*publishTo <<= isSnapshot { snapshot =>
    val nexus = "https://oss.sonatype.org/"
    if (snapshot) Some("snapshots" at nexus + "content/repositories/snapshots")
    else Some("releases" at nexus + "service/local/staging/deploy/maven2")
  },
  pomIncludeRepository := { _ => false},*/


  scmInfo := Some(ScmInfo(url("https://github.com/openmole/gridscale.git"), "scm:git:git@github.com:openmole/gridscale.git")),

  pomExtra := {
    <!-- Developer contact information -->
    <developers>
      <developer>
        <id>romainreuillon</id>
        <name><NAME></name>
        <url>https://github.com/romainreuillon/</url>
      </developer>
      <developer>
        <id>jopasserat</id>
        <name><NAME></name>
        <url>https://github.com/jopasserat/</url>
      </developer>
    </developers>
  }
)<commit_msg>Add publish maven style false.<commit_after>
import com.github.retronym.SbtOneJar
import com.typesafe.sbt.osgi
import osgi.OsgiKeys._
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._

import scalariform.formatter.preferences._

organization := "fr.iscpif"
name := "gridscale-root"

lazy val root = (project in file(".")).
  aggregate(
    gridscale,
    gridscaleEGI,
    gridscaleHTTP,
    gridscaleSSH,
    gridscaleCondor,
    gridscalePBS,
    gridscaleSLURM,
    gridscaleSGE,
    gridscaleOAR,
    gridscaleBundle,
    egiBundle,
    httpBundle,
    sshBundle,
    condorBundle,
    pbsBundle,
    slurmBundle,
    sgeBundle,
    oarBundle
  ) settings(
    publishArtifact := false
  )

releaseVersionBump := sbtrelease.Version.Bump.Minor

releaseTagComment    := s"Releasing ${(version in ThisBuild).value}"

releaseCommitMessage := s"Bump version to ${(version in ThisBuild).value}"

releaseProcess := Seq[ReleaseStep](
  checkSnapshotDependencies,
  inquireVersions,
  runClean,
  runTest,
  setReleaseVersion,
  tagRelease,
  ReleaseStep(action = Command.process("publishSigned", _)),
  setNextVersion,
  commitNextVersion,
  ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
  pushChanges
)

scalariformSettings


def settings = Seq (
  scalaVersion := "2.11.8",
  crossScalaVersions := Seq("2.11.8"),
  javacOptions in (Compile, compile) ++= Seq("-source", "1.7", "-target", "1.7"),
  scalacOptions += "-target:jvm-1.7"
)

def exportSettings = Seq(
  exportJars := true
) ++ SbtOneJar.oneJarSettings


lazy val publishDir = settingKey[File]("Publishing directory")
lazy val publishIpfs = taskKey[Unit]("Publish to IPFS")


lazy val defaultSettings =
  settings ++
    scalariformSettings ++ Seq(
  ScalariformKeys.preferences :=
    ScalariformKeys.preferences.value
      .setPreference(AlignSingleLineCaseStatements, true)
      .setPreference(RewriteArrowSymbols, true),

  organization := "fr.iscpif.gridscale",

  publishDir := {
    import java.io.File
    val dir = new File("/export/ivy/")
    dir.mkdirs()
    dir
  },

  publishMavenStyle := false,
  publishTo := Some(Resolver.file("ipfs", publishDir.value)(Resolver.ivyStylePatterns)),

  licenses := Seq("Affero GPLv3" -> url("http://www.gnu.org/licenses/")),
  homepage := Some(url("https://github.com/openmole/gridscale")),

  /*publishTo <<= isSnapshot { snapshot =>
    val nexus = "https://oss.sonatype.org/"
    if (snapshot) Some("snapshots" at nexus + "content/repositories/snapshots")
    else Some("releases" at nexus + "service/local/staging/deploy/maven2")
  },
  pomIncludeRepository := { _ => false},*/


  scmInfo := Some(ScmInfo(url("https://github.com/openmole/gridscale.git"), "scm:git:<EMAIL>:openmole/gridscale.git")),

  pomExtra := {
    <!-- Developer contact information -->
    <developers>
      <developer>
        <id>romainreuillon</id>
        <name><NAME></name>
        <url>https://github.com/romainreuillon/</url>
      </developer>
      <developer>
        <id>jopasserat</id>
        <name><NAME></name>
        <url>https://github.com/jopasserat/</url>
      </developer>
    </developers>
  }
)
{'fraction_non_alphanumeric': 0.14093529788597053, 'fraction_numerical': 0.005124919923126201, 'mean_word_length': 3.7964669738863286, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 52, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1106488', 'n_tokens_mistral': 2159, 'n_tokens_neox': 2081, 'n_words': 360}