addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.9.0")
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.3")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0")

val sbtSoftwareMillVersion = "2.0.9"
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-browser-test-js" % sbtSoftwareMillVersion)

addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.0")

addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.9.0")
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.3")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0")

val sbtSoftwareMillVersion = "2.0.9"
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-browser-test-js" % sbtSoftwareMillVersion)

addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.1")

addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")

Update mdoc, sbt-mdoc to 2.3.1

Update mdoc, sbt-mdoc to 2.3.1


addSbtPlugin("com.47deg" % "sbt-microsites" % "0.7.6")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.7.0")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.6")
addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.7.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.18")
addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "0.3.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.3.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.21")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.6")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")

addSbtPlugin("com.47deg" % "sbt-microsites" % "0.7.6")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.7.0")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.7")
addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.7.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.18")
addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "0.3.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.3.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.21")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.6")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")

Update sbt-release to 1.0.7

Update sbt-release to 1.0.7 [ci skip]


import sbt._
import sbt.Keys._
import android.Keys._
import android.Plugin._

object Build extends android.AutoBuild
{
	lazy val main = Project( "toolbelt", file( "." ) )
		.settings( androidBuildAar: _* )
		.settings(
			libraryDependencies ++= Seq(
				"com.android.support" % "appcompat-v7" % "21.0.0",
				"com.github.japgolly.android" % "svg-android" % "2.0.6",
				"com.jpardogo.materialtabstrip" % "library" % "1.0.5",
				"org.scala-lang" % "scala-reflect" % scalaVersion.value
			),
			name := "Toolbelt",
			organization := "com.taig.android",
			publishArtifact in ( Compile, packageDoc ) := false,
			scalaVersion := "2.11.4",
			scalacOptions ++= Seq(
				"-deprecation",
				"-feature",
				"-language:dynamics",
				"-language:existentials",
				"-language:implicitConversions",
				"-language:reflectiveCalls"
			),
			// @see https://github.com/pfn/android-sdk-plugin/issues/88
			sourceGenerators in Compile <<= ( sourceGenerators in Compile ) ( generators => Seq( generators.last ) ),
			version := "0.3.12-BETA",
			minSdkVersion in Android := "10",
			platformTarget in Android := "android-21",
			targetSdkVersion in Android := "21"
		)
}

import sbt._
import sbt.Keys._
import android.Keys._
import android.Plugin._

object Build extends android.AutoBuild
{
	lazy val main = Project( "toolbelt", file( "." ) )
		.settings( androidBuildAar: _* )
		.settings(
			libraryDependencies ++= Seq(
				"com.android.support" % "appcompat-v7" % "21.0.0",
				"com.github.japgolly.android" % "svg-android" % "2.0.6",
				"com.jpardogo.materialtabstrip" % "library" % "1.0.5",
				"org.scala-lang" % "scala-reflect" % scalaVersion.value
			),
			name := "Toolbelt",
			organization := "com.taig.android",
			publishArtifact in ( Compile, packageDoc ) := false,
			scalaVersion := "2.11.4",
			scalacOptions ++= Seq(
				"-deprecation",
				"-feature",
				"-language:dynamics",
				"-language:existentials",
				"-language:implicitConversions",
				"-language:reflectiveCalls"
			),
			// @see https://github.com/pfn/android-sdk-plugin/issues/88
			sourceGenerators in Compile <<= ( sourceGenerators in Compile ) ( generators => Seq( generators.last ) ),
			version := "0.3.13-BETA",
			minSdkVersion in Android := "10",
			platformTarget in Android := "android-21",
			targetSdkVersion in Android := "21"
		)
}

Set project version to 0.3.13-BETA

Set project version to 0.3.13-BETA


val scalaJSVersion = sys.env.getOrElse("SCALAJS_VERSION", "1.8.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")

val scalaJSVersion = sys.env.getOrElse("SCALAJS_VERSION", "1.9.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")

Update sbt-scalajs, scalajs-compiler, ... to 1.9.0


addSbtPlugin("org.ensime" % "ensime-sbt" % "0.1.7")

addSbtPlugin("com.trueaccord.scalapb" % "sbt-scalapb" % "0.5.32")

addSbtPlugin("org.ensime" % "ensime-sbt" % "0.1.7")

addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M13")

addSbtPlugin("com.trueaccord.scalapb" % "sbt-scalapb" % "0.5.32")

Add coursier plugin for dependency downloads


addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")

Update sbt-scalajs, scalajs-compiler, ... to 1.11.0 in master


addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.4")

val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.0.1")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.1")

addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.1")

addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0-M2")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.2.0")

addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.2")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.4")

val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.0.1")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.1")

addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.1")

addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0-M2")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.2.0")

addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.1")

Update sbt-sonatype 3.9.2 & sbt-pgp 2.0.1


addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.5.0")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")

resolvers += Resolver.jcenterRepo

addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.5.2")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")

resolvers += Resolver.jcenterRepo

Fix tut dependency version issue

Fix tut dependency version issue


libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.11"

// https://github.com/coursier/coursier/issues/450
classpathTypes += "maven-plugin"

addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0")
addSbtPlugin("org.http4s" % "sbt-http4s-org" % "0.14.5")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.11")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.4")

libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.11"

// https://github.com/coursier/coursier/issues/450
classpathTypes += "maven-plugin"

addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0")
addSbtPlugin("org.http4s" % "sbt-http4s-org" % "0.14.5")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.11")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.5")

Update sbt-scoverage to 2.0.5 in series/0.23


addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0")
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.8.0")

val sbtSoftwareMillVersion = "2.0.8"
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-browser-test-js" % sbtSoftwareMillVersion)

addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.23")

addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1")
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.8.0")

val sbtSoftwareMillVersion = "2.0.8"
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-browser-test-js" % sbtSoftwareMillVersion)

addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.23")

addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")

Update sbt-scalajs, scalajs-compiler, ... to 1.7.1


/*
 * Copyright (C) 2012 reuillon
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.openmole.plugin.grouping

import org.openmole.core.implementation.puzzle.Puzzle

package object batch {

  implicit def puzzleBatchGroupingDecorator(puzzle: Puzzle) = new {

    def by(n: Int): Puzzle =
      puzzle.copy(
        grouping = puzzle.grouping + (puzzle.last -> new NumberOfMoleJobsGrouping(n))
      )

    def in(n: Int): Puzzle =
      puzzle.copy(
        grouping = puzzle.grouping + (puzzle.last -> new NumberOfBatchGrouping(n))
      )

    def inShuffled(n: Int): Puzzle  =
      puzzle.copy(
        grouping = puzzle.grouping + (puzzle.last -> new NumberOfBatchShuffledGrouping(n))
      )

  }

}

/*
 * Copyright (C) 2012 reuillon
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.openmole.plugin.grouping

import org.openmole.core.implementation.puzzle.Puzzle

package object batch {

  implicit def puzzleBatchGroupingDecorator(puzzle: Puzzle) = new {

    def by(n: Int): Puzzle =
      puzzle.copy(
        grouping = puzzle.grouping + (puzzle.last -> new NumberOfMoleJobsGrouping(n))
      )

    def in(n: Int): Puzzle =
      puzzle.copy(
        grouping = puzzle.grouping + (puzzle.last -> new NumberOfBatchGrouping(n))
      )

    def inShuffled(n: Int): Puzzle  =
      puzzle.copy(
        grouping = puzzle.grouping + (puzzle.last -> new NumberOfBatchShuffledGrouping(n))
      )

  }

  implicit def intToNumberOfMoleJobGrouping(n: Int) = new NumberOfMoleJobsGrouping(n)

}

Add implicit conversion to number of mole job grouping.


// ----- ostrich service

import com.twitter.finagle.builder.{Server, ServerBuilder}
import com.twitter.finagle.stats.OstrichStatsReceiver
import com.twitter.finagle.thrift.ThriftServerFramedCodec
import com.twitter.logging.Logger
import com.twitter.ostrich.admin.Service

trait ThriftServer extends Service with FutureIface {
  val log = Logger.get(getClass)

  def thriftCodec = ThriftServerFramedCodec()
  val thriftProtocolFactory = new TBinaryProtocol.Factory()
  val thriftPort: Int
  val serverName: String

  var server: Server = null

  def start() {
    val thriftImpl = new FinagledService(this, thriftProtocolFactory)
    val serverAddr = new InetSocketAddress(thriftPort)
    server = ServerBuilder().codec(thriftCodec).name(serverName).reportTo(new OstrichStatsReceiver).bindTo(serverAddr).build(thriftImpl)
  }

  def shutdown() {
    synchronized {
      if (server != null) {
        server.close(0.seconds)
      }
    }
  }
}

// ----- ostrich service

import com.twitter.finagle.builder.{Server, ServerBuilder}
import com.twitter.finagle.stats.{StatsReceiver, OstrichStatsReceiver}
import com.twitter.finagle.thrift.ThriftServerFramedCodec
import com.twitter.finagle.tracing.{NullTracer, Tracer}
import com.twitter.logging.Logger
import com.twitter.ostrich.admin.Service

trait ThriftServer extends Service with FutureIface {
  val log = Logger.get(getClass)

  def thriftCodec = ThriftServerFramedCodec()
  def statsReceiver: StatsReceiver = new OstrichStatsReceiver
  def tracer: Tracer = NullTracer
  val thriftProtocolFactory = new TBinaryProtocol.Factory()
  val thriftPort: Int
  val serverName: String

  var server: Server = null

  def start() {
    val thriftImpl = new FinagledService(this, thriftProtocolFactory)
    val serverAddr = new InetSocketAddress(thriftPort)
    server = ServerBuilder()
      .codec(thriftCodec)
      .name(serverName)
      .reportTo(statsReceiver)
      .bindTo(serverAddr)
      .tracer(tracer)
      .build(thriftImpl)
  }

  def shutdown() {
    synchronized {
      if (server != null) {
        server.close(0.seconds)
      }
    }
  }
}

Allow a tracer to be set on the ServerBuilder


package vtpassim.pageinfo

case class Coords(x: Int, y: Int, w: Int, h: Int, b: Int)

case class Region(start: Int, length: Int, coords: Coords)

case class Page(id: String, series: String, seq: Int, dpi: Int, text: String,
  regions: Array[Region])

package vtpassim.pageinfo

case class Coords(x: Int, y: Int, w: Int, h: Int, b: Int)

case class Region(start: Int, length: Int, coords: Coords)

case class Page(id: String, book: String, seq: Int, dpi: Int, text: String,
  regions: Array[Region])

Rename "series" to "book" for books.

Rename "series" to "book" for books.


resolvers ++= Seq(
  Classpaths.sbtPluginReleases,
  Opts.resolver.sonatypeReleases
)

resolvers += Classpaths.typesafeResolver

addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")

addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.10")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")

addSbtPlugin("io.spray" % "sbt-revolver" % "0.8.0")

addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.0.4")

addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2")

addSbtPlugin("org.ensime" % "sbt-ensime" % "1.12.7")

Remove ensime from project config

Remove ensime from project config


package com.nhlreplay.parser.playbyplay

import xml.NodeSeq

class Team(columns: NodeSeq)
{
  val teamName = getTeamName(columns)

  private def getTeamName(columns: NodeSeq) = {
    val pattern = """\s+(.+)<br>""".r
    val content = ((columns \ "tbody" \ "tr")(2) \ "td").mkString
    pattern.findFirstMatchIn(content) match {
      case Some(teamMatch) => teamMatch.group(1)
      case None => throw new RuntimeException("No match in '%s'".format(content))
    }
  }
}

package com.nhlreplay.parser.playbyplay

import xml.NodeSeq

class Team(columns: NodeSeq)
{
  val teamName = getTeamName(columns)

  private def getTeamName(columns: NodeSeq) = {
    val pattern = """>(.+)<br/>""".r
    val content = ((columns \ "tbody" \ "tr")(2) \ "td").mkString
    pattern.findFirstMatchIn(content) match {
      case Some(teamMatch) => teamMatch.group(1)
      case None => throw new RuntimeException("No match in '%s'".format(content))
    }
  }
}

Fix team name parsing with Scala 2.10.0

Fix team name parsing with Scala 2.10.0


package models

import play.api.libs.json._

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future

case class ViewerProfile(id: String, likeStoryIds: List[String] = List(), nopeStoryIds: List[String] = List(), tagsWeights: Map[String,Int] = Map())
{
  def tagsFilterBy(filter: ((String,Int)) => (Boolean)) = this.tagsWeights.filter(filter).map(_._1).toList
}

object ViewerProfile extends MongoModel("viewerprofiles")
{
  def findById(id: String): Future[ViewerProfile] = collection.find(Json.obj("_id" -> Json.obj("$oid" -> id))).cursor[ViewerProfile].collect[List]().map{
    case vp :: Nil =>
      vp
    case _ =>
      ViewerProfile(id)
  }

  def processEvent(event: Event) =
    collection.update(
      Json.obj("_id" -> Json.obj("$oid" -> event.viewerProfileId)),
      Json.obj(
        "$addToSet" -> Json.obj(event._type+"StoryIds" -> event.storyId),
        "$inc" -> JsObject(event.tags.map(tag => ("tagsWeights."+tag, JsNumber(event.tagsWeight))))
      ),
      multi = false,
      upsert = true
    )
}

package models

import play.api.libs.json._

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future

case class ViewerProfile(id: String, likeStoryIds: List[String] = List(), nopeStoryIds: List[String] = List(), tagsWeights: Map[String,Int] = Map())
{
  def tagsFilterBy(filter: ((String,Int)) => (Boolean)) = this.tagsWeights.filter(filter).map(_._1).toList
}

object ViewerProfile extends MongoModel("viewerprofiles")
{
  def findById(id: String): Future[ViewerProfile] = collection.find(Json.obj("_id" -> Json.obj("$oid" -> id))).cursor[ViewerProfile].collect[List]().map{
    case vp :: Nil =>
      vp
    case _ =>
      ViewerProfile(id)
  }

  def processEvent(event: Event) = {
    val update = if(event.tags.nonEmpty) {
      Json.obj(
        "$addToSet" -> Json.obj(event._type + "StoryIds" -> event.storyId)
      )
    } else {
      Json.obj(
        "$addToSet" -> Json.obj(event._type + "StoryIds" -> event.storyId),
        "$inc" -> JsObject(event.tags.map(tag => ("tagsWeights." + tag, JsNumber(event.tagsWeight))))
      )
    }
    collection.update(
      Json.obj("_id" -> Json.obj("$oid" -> event.viewerProfileId)),
      update,
      multi = false,
      upsert = true
    )
  }
}

Correct like if not tags for story

Correct like if not tags for story


resolvers ++= Seq(
    DefaultMavenRepository,
//  Moved
//  TODO: update location
//	"gseitz@github" at "http://gseitz.github.com/maven/",
    "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
)

// addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.4")

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0")

scalaVersion := "2.9.2"

resolvers ++= Seq(
    DefaultMavenRepository,
//  Moved
//  TODO: update location
//	"gseitz@github" at "http://gseitz.github.com/maven/",
    "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
)

// addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.4")

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.1")

scalaVersion := "2.9.2"

Upgrade to SBT Eclipse 2.1.1

Upgrade to SBT Eclipse 2.1.1


import de.johoop.findbugs4sbt.FindBugs._
import de.johoop.findbugs4sbt.ReportType
import de.johoop.findbugs4sbt.Effort
import de.johoop.jacoco4sbt._
import JacocoPlugin._

fork in test := true

fork in run := true

fork in run in Test := true

autoScalaLibrary := false

crossPaths := false

libraryDependencies += "net.liftweb" %% "lift-json" % "2.5" % "test"

libraryDependencies += "com.novocode" % "junit-interface" % "0.10-M4" % "test"

externalResolvers += "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots/"

seq(findbugsSettings : _*)

findbugsReportType := Some(ReportType.Html)

findbugsReportName := Some("findbugs.html")

findbugsEffort := Effort.High

findbugsMaxMemory := 1000

seq(jacoco.settings : _*)

javacOptions in (Compile,doc) ++= Seq("-exclude", "com.typesafe.config.impl")

javacOptions in (Compile,compile) ++= Seq("-source", "1.6", "-target", "1.6", "-g")

// because we test some global state such as singleton caches,
// we have to run tests in serial.
parallelExecution in Test := false

sources in (Compile, doc) := (sources in (Compile, doc)).value.filter(_.getParentFile.getName != "impl")

import de.johoop.findbugs4sbt.FindBugs._
import de.johoop.findbugs4sbt.ReportType
import de.johoop.findbugs4sbt.Effort
import de.johoop.jacoco4sbt._
import JacocoPlugin._

fork in test := true

fork in run := true

fork in run in Test := true

autoScalaLibrary := false

crossPaths := false

libraryDependencies += "net.liftweb" %% "lift-json" % "2.5" % "test"

libraryDependencies += "com.novocode" % "junit-interface" % "0.10-M4" % "test"

externalResolvers += "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots/"

seq(findbugsSettings : _*)

findbugsReportType := Some(ReportType.Html)

findbugsReportName := Some("findbugs.html")

findbugsEffort := Effort.High

findbugsMaxMemory := 1000

seq(jacoco.settings : _*)

javacOptions in (Compile,compile) ++= Seq("-source", "1.6", "-target", "1.6", "-g")

// because we test some global state such as singleton caches,
// we have to run tests in serial.
parallelExecution in Test := false

sources in (Compile, doc) := (sources in (Compile, doc)).value.filter(_.getParentFile.getName != "impl")

Remove javadoc -exclude option which apparently doesn't work

I'm not 100% sure what was up here; did it used to work and now
doesn't? Anyway, we just don't pass those sources to javadoc
anymore.


package models

import com.gilt.apidocgenerator.models.ServiceDescription
import core.generator.ScalaServiceDescription
import core.{ServiceDescriptionBuilder}
import org.scalatest.{ ShouldMatchers, FunSpec }

class Play2BindablesSpec extends FunSpec with ShouldMatchers {

  lazy val service = TestHelper.parseFile(s"../reference-api/api.json").serviceDescription.get
  lazy val ssd = new ScalaServiceDescription(service)
  lazy val ageGroup = ssd.enums.find(_.name == "AgeGroup").getOrElse {
    sys.error("No age group enum found")
  }

  it("generates bindable for a single enum") {
    TestHelper.assertEqualsFile(
      "test/resources/generators/play-2-bindable-age-group.txt",
      Play2Bindables.buildImplicit(ageGroup)
    )
  }

  it("generates bindable object") {
    TestHelper.assertEqualsFile(
      "core/src/test/resources/generators/play-2-bindable-reference-api-object.txt",
      Play2Bindables.build(ssd).getOrElse("")
    )
  }

}

package models

import com.gilt.apidocgenerator.models.ServiceDescription
import core.generator.ScalaServiceDescription
import core.{ServiceDescriptionBuilder}
import org.scalatest.{ ShouldMatchers, FunSpec }

class Play2BindablesSpec extends FunSpec with ShouldMatchers {

  lazy val service = TestHelper.parseFile(s"../reference-api/api.json").serviceDescription.get
  lazy val ssd = new ScalaServiceDescription(service)
  lazy val ageGroup = ssd.enums.find(_.name == "AgeGroup").getOrElse {
    sys.error("No age group enum found")
  }

  it("generates bindable for a single enum") {
    TestHelper.assertEqualsFile(
      "test/resources/generators/play-2-bindable-age-group.txt",
      Play2Bindables.buildImplicit(ageGroup)
    )
  }

  it("generates bindable object") {
    TestHelper.assertEqualsFile(
      "core/src/test/resources/generators/play-2-bindable-reference-api-object.txt",
      Play2Bindables.build(ssd)
    )
  }

}

Fix unit test for api change

Fix unit test for api change


import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

crossScalaVersions := Seq("2.11.7")

version := "0.0.21"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      "org.scalatest" %% "scalatest" % "2.2.6" % "test"
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

crossScalaVersions := Seq("2.11.7")

version := "0.0.22"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      "org.scalatest" %% "scalatest" % "2.2.6" % "test"
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

Increment version from 0.0.21 => 0.0.22

Increment version from 0.0.21 => 0.0.22


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.99"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.2.0"

autocommit: Update configuration to record version 0.2.0


androidBuildAar

autoScalaLibrary := false

githubProject := "floating-label-layout"

javacOptions ++=
    "-source" :: "1.7" ::
    "-target" :: "1.7" ::
    Nil

libraryDependencies ++=
    "com.android.support" % "design" % "24.1.1" ::
    Nil

minSdkVersion := "7"

normalizedName := "floating-label-layout"

organization := "io.taig.android"

platformTarget := "android-24"

publishArtifact in ( Compile, packageDoc ) := false

scalacOptions ++=
    "-deprecation" ::
    "-feature" ::
    Nil

targetSdkVersion := "24"

typedResources := false

version := "1.1.9"

androidBuildAar

autoScalaLibrary := false

githubProject := "floating-label-layout"

javacOptions ++=
    "-source" :: "1.7" ::
    "-target" :: "1.7" ::
    Nil

libraryDependencies ++=
    "com.android.support" % "design" % "24.2.0" ::
    Nil

minSdkVersion := "7"

normalizedName := "floating-label-layout"

organization := "io.taig.android"

platformTarget := "android-24"

publishArtifact in ( Compile, packageDoc ) := false

scalacOptions ++=
    "-deprecation" ::
    "-feature" ::
    Nil

typedResources := false

version := "1.1.9"

Upgrade to Android support library 24.2.0


name := """twitter-vault-frontend"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.6"

libraryDependencies ++= Seq(
  jdbc,
  cache,
  ws,
  specs2 % Test
)

libraryDependencies += "org.twitter4j" % "twitter4j-stream" % "4.0.4"

resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator

name := """tweet-vault-frontend"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.6"

libraryDependencies ++= Seq(
  jdbc,
  cache,
  ws,
  specs2 % Test
)

libraryDependencies += "org.twitter4j" % "twitter4j-stream" % "4.0.4"

resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator

Rename project to match git repo

Rename project to match git repo


package utils.json

import java.sql.Timestamp
import java.util.UUID

import models.{ Prediction, TaggingImage }
import play.api.libs.json._

/**
 * Created by jlzie on 28.04.2017.
 */
object JsonFormats {
  implicit object timestampFormat extends Format[Timestamp] {
    def reads(json: JsValue) = {

      JsSuccess(new Timestamp(json.as[Long]))
    }
    def writes(ts: Timestamp) = {
      JsNumber(ts.getTime)
    }
  }

  implicit val taggingImageFormat = Json.format[TaggingImage]

  def writeImageswithPredicitions(images: Seq[TaggingImage], predicitions: Seq[Prediction]) = {
    implicit object PredictionFormat extends Writes[Prediction] {
      override def writes(o: Prediction): JsValue = Json.format[Prediction].writes(o) - ("imageId")
    }

    val predictionMap = Map[UUID, List[Prediction]]()
    predicitions.foreach(prediction => {
      predictionMap.get(prediction.imageId) match {
        case Some(list: List[Prediction]) => list.::(prediction)
        case None => predictionMap + ((prediction.imageId, List(prediction)))
      }
    })
    val imagesJson = images.map(image => {
      val jImage = Json.toJson(image).as[JsObject]
      predictionMap.get(image.imageId) match {
        case Some(preds) => jImage.+(("predictions", Json.toJson(preds)))
        case _ => jImage
      }

    }).seq
    Json.toJson(imagesJson)
  }
}

package utils.json

import java.sql.Timestamp
import java.util.UUID

import models.{ Prediction, TaggingImage }
import play.api.libs.json._

/**
 * Created by jlzie on 28.04.2017.
 */
object JsonFormats {
  implicit object timestampFormat extends Format[Timestamp] {
    def reads(json: JsValue) = {

      JsSuccess(new Timestamp(json.as[Long]))
    }
    def writes(ts: Timestamp) = {
      JsNumber(ts.getTime)
    }
  }

  implicit val taggingImageFormat = Json.format[TaggingImage]

  def writeImageswithPredicitions(images: Seq[TaggingImage], predicitions: Seq[Prediction]) = {
    implicit object PredictionFormat extends Writes[Prediction] {
      override def writes(o: Prediction): JsValue = Json.format[Prediction].writes(o) - ("imageId")
    }

    val predictionMap = scala.collection.mutable.HashMap.empty[UUID, scala.collection.mutable.MutableList[Prediction]]
    predicitions.foreach(prediction => {
      predictionMap.get(prediction.imageId) match {
        case Some(list: scala.collection.mutable.MutableList[Prediction]) => list.+=(prediction)
        case _ => predictionMap += ((prediction.imageId, scala.collection.mutable.MutableList(prediction)))
      }
    })
    val imagesJson = images.map(image => {
      val jImage = Json.toJson(image).as[JsObject]
      predictionMap.get(image.imageId) match {
        case Some(preds) => jImage.+(("predictions", Json.toJson(preds)))
        case _ => jImage
      }

    }).seq
    Json.toJson(imagesJson)
  }
}

Fix bug, that would not deliver predictions with the images


package controllers

import formats.APIJsonFormats
import models.TopLevel
import play.api.libs.json.Json
import play.api.mvc._

object Application extends Controller with APIJsonFormats {

  def index = Action {
      val services = Map( "users"-> "/users",
                          "emails"-> "/emails",
                          "tokens"-> "/tokens"
      )
      Ok(Json.toJson(TopLevel(links=Some(services))))
    }

}

package controllers

import formats.APIJsonFormats
import models.TopLevel
import play.api.libs.json.Json
import play.api.mvc._

object Application extends Controller with APIJsonFormats {

  def index = Action {
      val services = Map( "users"-> "/users",
                          "emails"-> "/emails",
                          "tokens"-> "/tokens",
                          "stories"-> "/stories"
      )
      Ok(Json.toJson(TopLevel(links=Some(services))))
    }

}

Add story to endpoint links

Add story to endpoint links


resolvers += Resolver.url("gatling", url("http://dl.bintray.com/content/gatling/sbt-plugins/"))(Resolver.ivyStylePatterns)

addSbtPlugin("io.gatling" % "gatling-build-plugin" % "2.1.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.2")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.3")

resolvers += Resolver.url("gatling", url("http://dl.bintray.com/content/gatling/sbt-plugins/"))(Resolver.ivyStylePatterns)
resolvers += Resolver.jcenterRepo

addSbtPlugin("io.gatling" % "gatling-build-plugin" % "2.1.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.2")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.3")
addSbtPlugin("net.aichler" % "sbt-jupiter-interface" % "0.7.0")

Enable junit5 tests w/ sbt

Enable junit5 tests w/ sbt


resolvers += "Typesafe Repository" at "https://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5")
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.2.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.0-RC3")

resolvers += "Typesafe Repository" at "https://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.3")
addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.2.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.0-RC3")

Revert "Upgrade sbt-scoverage plugin 1.3.3 -> 1.3.5"

This reverts commit 59b742ead974f611df0480e1e5bedbca2b59c798.


addSbtPlugin("com.github.sbt"       % "sbt-pgp"                       % "2.1.2")
addSbtPlugin("com.github.sbt"     % "sbt-git"                       % "2.0.0")
addSbtPlugin("org.scala-js"         % "sbt-scalajs"                   % "1.9.0")
addSbtPlugin("org.portable-scala"   % "sbt-scalajs-crossproject"      % "1.2.0")
addSbtPlugin("org.portable-scala"   % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.xerial.sbt"       % "sbt-sonatype"                  % "3.9.12")
addSbtPlugin("ohnosequences"        % "sbt-github-release"            % "0.7.0")
addSbtPlugin("com.eed3si9n"         % "sbt-buildinfo"                 % "0.11.0")
addSbtPlugin("org.scala-native"     % "sbt-scala-native"              % "0.4.4")

// https://github.com/ohnosequences/sbt-github-release/issues/28#issuecomment-426086656
libraryDependencies += "com.sun.activation" % "javax.activation" % "1.2.0"

addSbtPlugin("com.github.sbt"       % "sbt-pgp"                       % "2.1.2")
addSbtPlugin("com.github.sbt"     % "sbt-git"                       % "2.0.0")
addSbtPlugin("org.scala-js"         % "sbt-scalajs"                   % "1.10.0")
addSbtPlugin("org.portable-scala"   % "sbt-scalajs-crossproject"      % "1.2.0")
addSbtPlugin("org.portable-scala"   % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.xerial.sbt"       % "sbt-sonatype"                  % "3.9.12")
addSbtPlugin("ohnosequences"        % "sbt-github-release"            % "0.7.0")
addSbtPlugin("com.eed3si9n"         % "sbt-buildinfo"                 % "0.11.0")
addSbtPlugin("org.scala-native"     % "sbt-scala-native"              % "0.4.4")

// https://github.com/ohnosequences/sbt-github-release/issues/28#issuecomment-426086656
libraryDependencies += "com.sun.activation" % "javax.activation" % "1.2.0"

Update sbt-scalajs, scalajs-compiler, ... to 1.10.0


logLevel := Level.Warn

libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.1"
libraryDependencies += "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0"

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0")
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.0")
addSbtPlugin("org.jetbrains" % "sbt-ide-settings" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1")

// Deployment configuration
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")

logLevel := Level.Warn

libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.1"
libraryDependencies += "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0"

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1")
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.0")
addSbtPlugin("org.jetbrains" % "sbt-ide-settings" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1")

// Deployment configuration
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")


libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.0"
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.0")
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0-M2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.6.0")

val sbtSoftwareMillVersion = "1.9.13"
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)

addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.5")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.10")

addSbtPlugin("org.jetbrains" % "sbt-ide-settings" % "1.1.0")

libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.0"
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.0")
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0-M2")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.6.0")

val sbtSoftwareMillVersion = "1.9.13"
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)

addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.5")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.12")

addSbtPlugin("org.jetbrains" % "sbt-ide-settings" % "1.1.0")

Update mdoc, sbt-mdoc to 2.2.12

Update mdoc, sbt-mdoc to 2.2.12


resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"

resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"

resolvers += Classpaths.sbtPluginReleases

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.6")

addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.7.6")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.5.0")

addSbtPlugin("com.heroku" % "sbt-heroku" % "0.5.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.0.4")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0")

addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")

addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.0")

addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M12")

Use Coursier which is awesome

Use Coursier which is awesome


// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.13")

// For removing warts, maintain code quality
addSbtPlugin("org.wartremover" %% "sbt-wartremover" % "2.4.17")

// The sbt native packager - needed for docker builds
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.8")

// For code coverage test
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")

// For checkstyle
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

// For formatting Scala source code
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.16")

// Build fat JAR file
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0")

// Check vulnerabilities in JAR's
addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "3.4.0")

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.13")

// For removing warts, maintain code quality
addSbtPlugin("org.wartremover" %% "sbt-wartremover" % "2.4.18")

// The sbt native packager - needed for docker builds
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.8")

// For code coverage test
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")

// For checkstyle
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

// For formatting Scala source code
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.16")

// Build fat JAR file
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0")

// Check vulnerabilities in JAR's
addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "3.4.0")

Update sbt-wartremover, wartremover to 2.4.18


addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.15")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.17")

Update sbt-jmh plugin to 0.2.17.

Update sbt-jmh plugin to 0.2.17.


addSbtPlugin("com.typesafe.play" % "sbt-plugin"   % "2.8.11")
addSbtPlugin("org.scalameta"     % "sbt-scalafmt" % "2.4.4")

addSbtPlugin("com.typesafe.play" % "sbt-plugin"   % "2.8.12")
addSbtPlugin("org.scalameta"     % "sbt-scalafmt" % "2.4.4")

Update play-ahc-ws, play-akka-http-server, ... to 2.8.12


addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.12.0")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")

addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")

addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.9.9")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.9.2")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")

addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.6.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")

addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.12.0")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")

addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")

addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.9.9")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.9.2")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")

addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")

Update sbt-scalajs, scalajs-compiler, ... to 1.7.0


package org.moe.interpreter

import org.scalatest.FunSuite
import org.scalatest.matchers.ShouldMatchers

import org.moe.runtime._
import org.moe.ast._

import ClassMatchers._

class ClassNodeTestSuite
  extends FunSuite
  with InterpreterTestUtils
  with ShouldMatchers
  with ClassMatchers {
  test("... basic test with class") {
    // class Point { }
    val ast = wrapSimpleAST(
      List(
        ClassDeclarationNode(
          "Point",
          None,
          StatementsNode(
            List()
          )
        )
      )
    )
    interpreter.eval(runtime, runtime.getRootEnv, ast)
    val root_pkg = runtime.getRootPackage
    root_pkg should haveClass("Point")
  }

  test("... basic test with class and superclass") {
    // class Point { }
    val ast = wrapSimpleAST(
      List(
        ClassDeclarationNode(
          "Point",
          None,
          StatementsNode(
            List()
          )
        ),
        ClassDeclarationNode(
          "Point3D",
          Some("Point"),
          StatementsNode(
            List()
          )
        )
      )
    )
    interpreter.eval(runtime, runtime.getRootEnv, ast)
    val root_pkg = runtime.getRootPackage
    root_pkg should haveClass("Point")
    root_pkg should haveClass("Point3D")
    val point3d_class = root_pkg.getClass("Point3D")
    point3d_class match {
      case Some(point3d_class) => point3d_class should extendClass("Point")
      case None => assert(false)
    }
  }
}

package org.moe.interpreter

import org.scalatest.FunSuite
import org.scalatest.matchers.ShouldMatchers

import org.moe.runtime._
import org.moe.ast._

import ClassMatchers._

class ClassNodeTestSuite
  extends FunSuite
  with InterpreterTestUtils
  with ShouldMatchers
  with ClassMatchers {
  test("... basic test with class") {
    // class Point { }
    val ast = wrapSimpleAST(
      List(
        ClassDeclarationNode(
          "Point",
          None,
          StatementsNode(
            List()
          )
        )
      )
    )
    interpreter.eval(runtime, runtime.getRootEnv, ast)
    val root_pkg = runtime.getRootPackage
    root_pkg should haveClass("Point")
  }

  test("... basic test with class and superclass") {
    // class Point { }
    // class Point3D extends Point { }
    val ast = wrapSimpleAST(
      List(
        ClassDeclarationNode(
          "Point",
          None,
          StatementsNode(
            List()
          )
        ),
        ClassDeclarationNode(
          "Point3D",
          Some("Point"),
          StatementsNode(
            List()
          )
        )
      )
    )
    interpreter.eval(runtime, runtime.getRootEnv, ast)
    val root_pkg = runtime.getRootPackage
    root_pkg should haveClass("Point")
    root_pkg should haveClass("Point3D")
    val point3d_class = root_pkg.getClass("Point3D")
    point3d_class match {
      case Some(point3d_class) => point3d_class should extendClass("Point")
      case None => assert(false)
    }
  }
}

Clarify the code portrayal in the comment


/* Copyright 2009-2015 EPFL, Lausanne */

package leon
package termination

import purescala.Definitions._
import purescala.DefOps._

object TerminationPhase extends LeonPhase[Program,TerminationReport] {
  val name = "Termination"
  val description = "Check termination of PureScala functions"

  def run(ctx : LeonContext)(program : Program) : TerminationReport = {
    val startTime = System.currentTimeMillis

//    val tc = new SimpleTerminationChecker(ctx, program)
    val tc = new ComplexTerminationChecker(ctx, program)

    def excludeByDefault(fd: FunDef): Boolean = fd.annotations contains "library"

    val fdFilter = {
      import OptionsHelpers._

      filterInclusive(ctx.findOption(SharedOptions.optFunctions).map(fdMatcher), Some(excludeByDefault _))
    }

    val toVerify = tc.program.definedFunctions.filter(fdFilter).sortWith((fd1, fd2) => fd1.getPos < fd2.getPos)

    val results = toVerify.map { funDef =>
      funDef -> tc.terminates(funDef)
    }
    val endTime = System.currentTimeMillis

    new TerminationReport(results, (endTime - startTime).toDouble / 1000.0d)
  }
}

/* Copyright 2009-2015 EPFL, Lausanne */

package leon
package termination

import purescala.Definitions._
import purescala.DefOps._

object TerminationPhase extends LeonPhase[Program,TerminationReport] {
  val name = "Termination"
  val description = "Check termination of PureScala functions"

  def run(ctx : LeonContext)(program : Program) : TerminationReport = {
    val startTime = System.currentTimeMillis

//    val tc = new SimpleTerminationChecker(ctx, program)
    val tc = new ComplexTerminationChecker(ctx, program)

    def excludeByDefault(fd: FunDef): Boolean = fd.annotations contains "library"

    val fdFilter = {
      import OptionsHelpers._

      filterInclusive(ctx.findOption(SharedOptions.optFunctions).map(fdMatcher(program)), Some(excludeByDefault _))
    }

    val toVerify = tc.program.definedFunctions.filter(fdFilter).sortWith((fd1, fd2) => fd1.getPos < fd2.getPos)

    val results = toVerify.map { funDef =>
      funDef -> tc.terminates(funDef)
    }
    val endTime = System.currentTimeMillis

    new TerminationReport(results, (endTime - startTime).toDouble / 1000.0d)
  }
}

Use full names to match against --functions. Display qualified names.


addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.10")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.11")

Update sbt-jmh plugin to 0.2.11.

Update sbt-jmh plugin to 0.2.11.


package services

import akka.stream.Materializer
import akka.stream.scaladsl.Source
import dao.EventDao
import models.{OrderPlaced, UserRecognized}

class NewUserService(eventDao: EventDao[OrderPlaced],
                     users: EventDao[UserRecognized])(
    implicit val mat: Materializer) {

  Source
    .fromPublisher(eventDao.out)
    .mapConcat { placing =>
      placing.order.attendees.map(UserRecognized(_))
    }
    .runForeach(println)

}

package services

import akka.stream.Materializer
import akka.stream.scaladsl.Source
import dao.EventDao
import models.{OrderPlaced, UserRecognized}

class NewUserService(eventDao: EventDao[OrderPlaced],
                     users: EventDao[UserRecognized])(
    implicit val mat: Materializer) {

  Source
    .fromPublisher(eventDao.out)
    .mapConcat { placing =>
      placing.order.attendees.map(UserRecognized(_))
    }
    .runForeach(users.store(_))

}

Send events to users event store (no back pressure, events maybe got lost)


import sbt._

object Dependencies {
  lazy val thetaVersion = "1.1.4"
  lazy val breezeVersion = "2.0"
  lazy val junitVersion = "4.13.1"
  lazy val scalaTestVersion = "3.2.2"

  // this is used in build.sbt so that it works with both 2.12 and 2.13
  lazy val scalaParallelCollectionsVersion = "1.0.0"

  val loloDeps = Seq(
    "io.citrine"      %% "theta"           % thetaVersion,
    "org.scalanlp"    %% "breeze"          % breezeVersion,
    "junit"            % "junit"           % junitVersion     % "test",
    "org.scalatest"   %% "scalatest"       % scalaTestVersion % "test",
    "com.novocode"     % "junit-interface" % "0.11"           % "test",
    "org.knowm.xchart" % "xchart"          % "3.5.2"
  )
}

import sbt._

object Dependencies {
  lazy val thetaVersion = "1.1.5"
  lazy val breezeVersion = "2.0"
  lazy val junitVersion = "4.13.1"
  lazy val scalaTestVersion = "3.2.2"

  // this is used in build.sbt so that it works with both 2.12 and 2.13
  lazy val scalaParallelCollectionsVersion = "1.0.0"

  val loloDeps = Seq(
    "io.citrine"      %% "theta"           % thetaVersion,
    "org.scalanlp"    %% "breeze"          % breezeVersion,
    "junit"            % "junit"           % junitVersion     % "test",
    "org.scalatest"   %% "scalatest"       % scalaTestVersion % "test",
    "com.novocode"     % "junit-interface" % "0.11"           % "test",
    "org.knowm.xchart" % "xchart"          % "3.5.2"
  )
}

Update to theta version that does not have netlib


package controllers

import actions.{TokenCheckAction, LoggingAction}
import formats.APIJsonFormats
import models.TopLevel
import play.api.libs.json.Json
import play.api.mvc._

object Application extends Controller with APIJsonFormats {

  def index = LoggingAction {
    TokenCheckAction { request =>
      val root = "https://"+request.host
      val services = Map("users" -> s"$root/users",
        "emails" -> s"$root/emails",
        "tokens" -> s"$root/tokens",
        "stories" -> s"$root/stories"
      )
      Ok(Json.toJson(TopLevel(links = Some(services))))
    }
  }
}

package controllers

import actions.{TokenCheckAction, LoggingAction}
import formats.APIJsonFormats
import models.TopLevel
import play.api.libs.json.Json
import play.api.mvc._

object Application extends Controller with APIJsonFormats {

  def index = LoggingAction {
    TokenCheckAction { request =>
      val root = "https://"+request.host
      val services = Map("users" -> s"$root/users",
        "emails" -> s"$root/emails",
        "usernames" -> s"$root/usernames",
        "tokens" -> s"$root/tokens",
        "stories" -> s"$root/stories"
      )
      Ok(Json.toJson(TopLevel(links = Some(services))))
    }
  }
}

Add usernames information to root path

Add usernames information to root path


name := "apibuilder-validation"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.10"

crossScalaVersions := Seq("2.12.10")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.7.4",
      "org.apache.commons" % "commons-compress" % "1.18",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}
version := "0.4.10"

name := "apibuilder-validation"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.10"

crossScalaVersions := Seq("2.12.10")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.7.4",
      "org.apache.commons" % "commons-compress" % "1.18",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}
version := "0.4.11"

autocommit: Update configuration to record version 0.4.11


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.47"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.3",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.48"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.3",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.0.48


name := "mtg-workstation"

scalaVersion := "3.0.1"
libraryDependencies ++= Seq(
    "com.google.code.gson" % "gson" % "2.8.5",
    "com.joestelmach" % "natty" % "0.12",
    "org.jfree" % "jfreechart" % "1.5.2"
)

fork := true
javaOptions ++= Seq("-Dsun.java2d.d3d=false", "-Dfile.encoding=UTF-8")

import java.util.Properties

val appProperties = settingKey[Properties]("Global application properties")
appProperties := {
    val prop = new Properties()
    IO.load(prop, new File("src/main/resources/project.properties"))
    prop
}

name := "mtg-workstation"
version := appProperties.value.getProperty("version")

scalaVersion := "3.0.1"
libraryDependencies ++= Seq(
    "com.google.code.gson" % "gson" % "2.8.5",
    "com.joestelmach" % "natty" % "0.12",
    "org.jfree" % "jfreechart" % "1.5.2"
)

fork := true
javaOptions ++= Seq("-Dsun.java2d.d3d=false", "-Dfile.encoding=UTF-8")

Read version from property file

Read version from property file


organization := "org.xerial.silk"
sonatypeProfileName := "org.xerial"
name := "silk"
description := "A framework for simplifying SQL pipelines"
scalaVersion in Global := "2.11.6"

packSettings

packMain := Map("silk" -> "xerial.silk.cui.SilkMain")

lazy val root = project.in(file(".")).aggregate(core, cui)

lazy val core = project.in(file("silk-core")).settings(
  libraryDependencies ++= Seq(
    "com.github.nscala-time" %% "nscala-time" % "2.0.0",
    "org.xerial" % "xerial-lens" % "3.3.6",
    "org.scala-lang" % "scalap" % scalaVersion.value,
    "org.scala-lang" % "scala-reflect" % scalaVersion.value,
    "org.ow2.asm" % "asm-all" % "4.1",
    "com.esotericsoftware.kryo" % "kryo" % "2.20" exclude("org.ow2.asm", "asm"),
    "org.scalatest" %% "scalatest" % "2.2.4" % "test"
  )
)

lazy val cui = project.in(file("silk-cui")).dependsOn(core)

organization := "org.xerial.silk"
sonatypeProfileName := "org.xerial"
name := "silk"
description := "A framework for simplifying SQL pipelines"
scalaVersion in Global := "2.11.7"

packSettings
packMain := Map("silk" -> "xerial.silk.cui.SilkMain")
packExclude := Seq("silk-root")

lazy val root = (project in file(".")).settings(
  name := "silk-root",
  publish := {}
).aggregate(core, cui)

lazy val core = (project in file("silk-core")).settings(
  name := "silk-core",
  libraryDependencies ++= Seq(
    "com.github.nscala-time" %% "nscala-time" % "2.0.0",
    "org.xerial" % "xerial-lens" % "3.3.8",
    "org.scala-lang" % "scalap" % scalaVersion.value,
    "org.scala-lang" % "scala-reflect" % scalaVersion.value,
    "org.ow2.asm" % "asm-all" % "4.1",
    "com.esotericsoftware.kryo" % "kryo" % "2.20" exclude("org.ow2.asm", "asm"),
    "org.scalatest" %% "scalatest" % "2.2.4" % "test"
  )
)

lazy val cui = project.in(file("silk-cui")).settings(
  name := "silk-cui"
).dependsOn(core)

Upgrade to xerial 3.3.8 and Scala 2.11.7


import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

crossScalaVersions := Seq("2.11.8")

version := "0.2.21"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      filters,
      "com.jason-goodwin" %% "authentikat-jwt" % "0.4.3",
      "org.scalatestplus" %% "play" % "1.4.0" % "test"
    ),
    resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
    resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
    resolvers += "Artifactory" at "https://flow.artifactoryonline.com/flow/libs-release/",
    credentials += Credentials(
      "Artifactory Realm",
      "flow.artifactoryonline.com",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

crossScalaVersions := Seq("2.11.8")

version := "0.2.22"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      filters,
      "com.jason-goodwin" %% "authentikat-jwt" % "0.4.3",
      "org.scalatestplus" %% "play" % "1.4.0" % "test"
    ),
    resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
    resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
    resolvers += "Artifactory" at "https://flow.artifactoryonline.com/flow/libs-release/",
    credentials += Credentials(
      "Artifactory Realm",
      "flow.artifactoryonline.com",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.2.22


name := "proxy"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .enablePlugins(NewRelic)
  .settings(commonSettings: _*)
  .settings(
    libraryDependencies ++= Seq(
      filters,
      ws,
      "com.jason-goodwin" %% "authentikat-jwt" % "0.4.3",
      "org.yaml" % "snakeyaml" % "1.17",
      "org.scalatestplus.play" %% "scalatestplus-play" % "1.5.0" % "test"
    )
  )

val credsToUse = Option(System.getenv("ARTIFACTORY_USERNAME")) match {
  case None => Credentials(Path.userHome / ".ivy2" / ".artifactory")
  case _ => Credentials("Artifactory Realm","flow.artifactoryonline.com",System.getenv("ARTIFACTORY_USERNAME"),System.getenv("ARTIFACTORY_PASSWORD"))
}

lazy val commonSettings: Seq[Setting[_]] = Seq(
  name <<= name("proxy-" + _),
  scalacOptions += "-feature",
  sources in (Compile,doc) := Seq.empty,
  publishArtifact in (Compile, packageDoc) := false,
  credentials += credsToUse,
  resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
  resolvers += "Artifactory" at "https://flow.artifactoryonline.com/flow/libs-release/"
)

version := "0.0.24"

name := "proxy"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .enablePlugins(NewRelic)
  .settings(commonSettings: _*)
  .settings(
    libraryDependencies ++= Seq(
      filters,
      ws,
      "com.jason-goodwin" %% "authentikat-jwt" % "0.4.3",
      "org.yaml" % "snakeyaml" % "1.17",
      "org.scalatestplus.play" %% "scalatestplus-play" % "1.5.0" % "test"
    )
  )

val credsToUse = Option(System.getenv("ARTIFACTORY_USERNAME")) match {
  case None => Credentials(Path.userHome / ".ivy2" / ".artifactory")
  case _ => Credentials("Artifactory Realm","flow.artifactoryonline.com",System.getenv("ARTIFACTORY_USERNAME"),System.getenv("ARTIFACTORY_PASSWORD"))
}

lazy val commonSettings: Seq[Setting[_]] = Seq(
  name <<= name("proxy-" + _),
  scalacOptions += "-feature",
  sources in (Compile,doc) := Seq.empty,
  publishArtifact in (Compile, packageDoc) := false,
  credentials += credsToUse,
  resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
  resolvers += "Artifactory" at "https://flow.artifactoryonline.com/flow/libs-release/"
)

version := "0.0.25"

autocommit: Update configuration to record version 0.0.25


name := "debiki-tck-dao"

organization := "com.debiki"

version := "0.0.2-SNAPSHOT"

scalaVersion := "2.10.0"

libraryDependencies ++= Seq(
  "junit" % "junit" % "4.7",
  "org.specs2" %% "specs2" % "1.14"
)

// See: https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/bkF1IDZj4L0
ideaPackagePrefix := None

// vim: fdm=marker et ts=2 sw=2 tw=80 fo=tcqwn list

name := "debiki-tck-dao"

organization := "com.debiki"

version := "0.0.2-SNAPSHOT"

scalaVersion := "2.10.1"

libraryDependencies ++= Seq(
  "junit" % "junit" % "4.7",
  "org.specs2" %% "specs2" % "1.14"
)

// See: https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/bkF1IDZj4L0
ideaPackagePrefix := None

// vim: fdm=marker et ts=2 sw=2 tw=80 fo=tcqwn list

Use Scala 2.10.1, not 2.10.0.

Use Scala 2.10.1, not 2.10.0.


name := "scyig-judicial"

organization := "me.frmr.scyig"

version := "0.0.1-SNAPSHOT"

scalaVersion := "2.12.2"

scalacOptions in Compile ++= Seq("-feature", "-deprecation")

libraryDependencies ++= {
  val liftVersion = "3.2.0-M1"

  Seq(
    "net.liftweb"                   %% "lift-webkit"          % liftVersion,
    "com.typesafe.slick"            %% "slick"                % "3.2.0",
    "mysql"                         % "mysql-connector-java"  % "8.0.7-dmr",
    "ch.qos.logback"                % "logback-classic"       % "1.2.3",
    "org.scalatest"                 %% "scalatest"            % "3.0.1" % "test",
    "org.scalacheck"                %% "scalacheck"           % "1.13.4" % "test"
  )
}

enablePlugins(JettyPlugin)

webappPostProcess := { webappDir: File =>
  def recurseFiles(rootDir: File, targetDir: File, extension: String, handler: (String, String, String)=>Unit): Unit = {
    if (! rootDir.isDirectory || ! targetDir.isDirectory) {
      streams.value.log.error(s"$rootDir and $targetDir must both be directories")
    } else {
      for {
        file <- rootDir.listFiles if file.getName.endsWith(extension)
      } {
        streams.value.log.info(s"Processing ${file.getPath}...")
        handler(
          rootDir.toString,
          file.getName,
          targetDir.toString
        )
      }
    }
  }

  def compileScss(inputDir: String, inputFile: String, outputDir: String): Unit = {
    val outputFilename = inputFile.replace(".scss", ".css")
    s"scss $inputDir/$inputFile $outputDir/$outputFilename" ! streams.value.log
  }

  recurseFiles(
    webappDir / "scss-hidden",
    webappDir / "css",
    ".scss",
    compileScss _
  )
}

Support scss compilation from scss-hidden


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.30"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.1",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

version := "0.0.31"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.5.1",
      "com.ning" % "async-http-client" % "1.9.38",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.0.31


/*
 * Copyright 2015 Priyesh Patel
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package me.priyesh.litho

object Config {

  val SplashText = "    __    _ __  __        \n   / /   (_) /_/ /_  ____ \n  / /   " +
    "/ / __/ __ \\/ __ \\\n / /___/ / /_/ / / / /_/ /\n/_____/_/\\__/_/ /_/\\____/ \n"

  val Version = 1.0
  val Author = "Priyesh Patel"
  val Debug = false

}

/*
 * Copyright 2015 Priyesh Patel
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package me.priyesh.litho

object Config {

  val SplashText = "    __    _ __  __        \n   / /   (_) /_/ /_  ____ \n  / /   " +
    "/ / __/ __ \\/ __ \\\n / /___/ / /_/ / / / /_/ /\n/_____/_/\\__/_/ /_/\\____/ \n"

  val Version = 1.0
  val Author = "Priyesh Patel"

}

Remove useless flag in config

Remove useless flag in config


package actors

import akka.actor.SupervisorStrategy.Restart
import akka.remote.ContainerFormats.ActorRef
import akka.actor._
import services.TitleLink

import scala.concurrent.Await
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration._
import scala.language.postfixOps

/**
  * Created by molmsted on 5/23/2016.
  */
object SupervisorActor {
  def props(tabId: String) = Props(new SupervisorActor(tabId))
}

class SupervisorActor(tabId: String) extends Actor{
  //implicit val node = Cluster(ScraperCluster.system1)

  override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 3, withinTimeRange = 1 minute) {
    case e: Exception => println("Exception detected by supervisor")
      Restart
  }
  //create/use scraping actors on a timer
  val scraper = context.system.actorOf(Props(classOf[ScraperActor], tabId))

  def deleteAndRefresh() = {
    //println(s"started scraping $tabId")
    scraper ! StartScraping
  }

  context.system.scheduler.schedule(15.seconds, 15.minutes)(deleteAndRefresh())

  def receive = {
    case _ => println("Unexpected msg to DbActor")//bad message
  }
}

package actors

import akka.actor.SupervisorStrategy.Restart
import akka.remote.ContainerFormats.ActorRef
import akka.actor._
import services.TitleLink

import scala.concurrent.Await
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration._
import scala.language.postfixOps

/**
  * Created by molmsted on 5/23/2016.
  */
object SupervisorActor {
  def props(tabId: String) = Props(new SupervisorActor(tabId))
}

class SupervisorActor(tabId: String) extends Actor{
  //implicit val node = Cluster(ScraperCluster.system1)

  override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 3, withinTimeRange = 1 minute) {
    case e: Exception => println("Exception detected by supervisor")
      Restart
  }
  //create/use scraping actors on a timer
  val scraper = context.system.actorOf(Props(classOf[ScraperActor], tabId))

  def deleteAndRefresh() = {
    //println(s"started scraping $tabId")
    scraper ! StartScraping
  }

  context.system.scheduler.schedule(0.seconds, 15.minutes)(deleteAndRefresh())

  def receive = {
    case _ => println("Unexpected msg to DbActor")//bad message
  }
}

Remove initial delay on spinning up the Actor system


addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.0")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.5")

scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.0")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.8.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.5")

scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")

Update sbt-scalajs, scalajs-compiler, ... to 1.8.0 in master


addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
addSbtPlugin("io.github.irundaia" % "sbt-sassify" % "1.5.2")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")

libraryDependencies ++= Seq(
  "org.testcontainers" % "postgresql" % "1.17.3",
  "org.testcontainers" % "elasticsearch" % "1.17.3",
  "org.tpolecat" %% "doobie-postgres" % "0.13.4"
)

addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
addSbtPlugin("io.github.irundaia" % "sbt-sassify" % "1.5.2")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")

libraryDependencies ++= Seq(
  "org.testcontainers" % "postgresql" % "1.17.5",
  "org.testcontainers" % "elasticsearch" % "1.17.5",
  "org.tpolecat" %% "doobie-postgres" % "0.13.4"
)

Update elasticsearch, postgresql to 1.17.5


// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.8")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.6.1")

// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.10")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.6.1")

Update to latest version of Play

Update to latest version of Play


addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")

Update sbt-scalajs, scalajs-compiler, ... to 1.11.0


plugins_(
  "com.geirsson"       % "sbt-ci-release"           % "1.5.2",
  "pl.project13.scala" % "sbt-jmh"                  % "0.3.7",
  "org.scalameta"      % "sbt-mdoc"                 % "2.1.1",
  "com.typesafe"       % "sbt-mima-plugin"          % "0.6.4",
  "org.xerial.sbt"     % "sbt-pack"                 % "0.12",
  "com.lightbend.sbt"  % "sbt-proguard"             % "0.3.0",
  "org.scala-js"       % "sbt-scalajs"              % "0.6.32",
  "ch.epfl.scala"      % "sbt-scalajs-bundler"      % "0.14.0",
  "org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0",
)

addSbtPlugin("io.get-coursier" % "sbt-coursier" % "2.0.0-RC6")
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.0.0-RC6")

def plugins_(modules: ModuleID*) = modules.map(addSbtPlugin)

plugins_(
  "com.geirsson"       % "sbt-ci-release"           % "1.5.2",
  "pl.project13.scala" % "sbt-jmh"                  % "0.3.7",
  "org.scalameta"      % "sbt-mdoc"                 % "2.1.1",
  "com.typesafe"       % "sbt-mima-plugin"          % "0.6.4",
  "org.xerial.sbt"     % "sbt-pack"                 % "0.12",
  "com.lightbend.sbt"  % "sbt-proguard"             % "0.3.0",
  "org.scala-js"       % "sbt-scalajs"              % "0.6.32",
  "ch.epfl.scala"      % "sbt-scalajs-bundler"      % "0.14.0",
  "org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0",
)

addSbtPlugin("io.get-coursier" % "sbt-coursier" % "2.0.0-RC6-1")
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.0.0-RC6-1")

def plugins_(modules: ModuleID*) = modules.map(addSbtPlugin)

Switch to sbt-coursier / sbt-shading 2.0.0-RC6-1


sbtResolver <<= (sbtResolver) { r =>
  Option(System.getenv("SBT_PROXY_REPO")) map { x =>
    Resolver.url("proxy repo for sbt", url(x))(Resolver.ivyStylePatterns)
  } getOrElse r
}

resolvers <<= (resolvers) { r =>
  (Option(System.getenv("SBT_PROXY_REPO")) map { url =>
    Seq("proxy-repo" at url)
  } getOrElse {
    r ++ Seq(
      "twitter.com" at "http://maven.twttr.com/",
      "scala-tools" at "http://scala-tools.org/repo-releases/",
      "maven" at "http://repo1.maven.org/maven2/",
      "freemarker" at "http://freemarker.sourceforge.net/maven2/"
    )
  }) ++ Seq("local" at ("file:" + System.getProperty("user.home") + "/.m2/repo/"))
}

externalResolvers <<= (resolvers) map identity

resolvers += Classpaths.sbtPluginReleases

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.0.4")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.0")

sbtResolver <<= (sbtResolver) { r =>
  Option(System.getenv("SBT_PROXY_REPO")) map { x =>
    Resolver.url("proxy repo for sbt", url(x))(Resolver.ivyStylePatterns)
  } getOrElse r
}

resolvers <<= (resolvers) { r =>
  (Option(System.getenv("SBT_PROXY_REPO")) map { url =>
    Seq("proxy-repo" at url)
  } getOrElse {
    r ++ Seq(
      "twitter.com" at "http://maven.twttr.com/",
      "scala-tools" at "http://scala-tools.org/repo-releases/",
      "maven" at "http://repo1.maven.org/maven2/",
      "freemarker" at "http://freemarker.sourceforge.net/maven2/"
    )
  }) ++ Seq("local" at ("file:" + System.getProperty("user.home") + "/.m2/repo/"))
}

externalResolvers <<= (resolvers) map identity

resolvers += Classpaths.sbtPluginReleases

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.0.4")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.2")

finagle: Add query benchmark for CommonsStatsReceiver (upgrade JMH)

RB_ID=717603


organization := "com.productfoundry"

name := "akka-persistence-couchbase"

version := "0.3"

scalaVersion := "2.11.7"

fork in Test := true

javaOptions in Test += "-Xmx512M"

scalacOptions ++= Seq(
  "-encoding", "UTF-8",
  "-feature",
  "-unchecked",
  "-deprecation",
  "-Xlint",
  "-Yno-adapted-args",
  "-Ywarn-dead-code",
  "-Ywarn-numeric-widen",
  "-Xfuture"
)

parallelExecution in Test := false

resolvers ++= Seq(
  "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/"
)

licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))

bintrayOrganization := Some("productfoundry")

val akkaVer = "2.4.2"

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-persistence" % akkaVer,
  "com.couchbase.client" % "java-client" % "2.2.4",
  "commons-codec" % "commons-codec" % "1.10",
  "com.typesafe.akka" %% "akka-persistence-tck" % akkaVer % "test",
  "org.scalatest" %% "scalatest" % "2.2.4" % "test"
)

organization := "com.productfoundry"

name := "akka-persistence-couchbase"

version := "0.3"

scalaVersion := "2.11.7"

fork in Test := true

javaOptions in Test += "-Xmx512M"

scalacOptions ++= Seq(
  "-encoding", "UTF-8",
  "-feature",
  "-unchecked",
  "-deprecation",
  "-Xlint",
  "-Yno-adapted-args",
  "-Ywarn-dead-code",
  "-Ywarn-numeric-widen",
  "-Xfuture"
)

parallelExecution in Test := false

resolvers ++= Seq(
  "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/"
)

licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))

bintrayOrganization := Some("productfoundry")

val akkaVer = "2.4.2"

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-persistence" % akkaVer,
  "com.couchbase.client" % "java-client" % "2.2.6",
  "commons-codec" % "commons-codec" % "1.10",
  "com.typesafe.akka" %% "akka-persistence-tck" % akkaVer % "test",
  "org.scalatest" %% "scalatest" % "2.2.4" % "test"
)

Upgrade to Couchbase client 2.2.6

Upgrade to Couchbase client 2.2.6


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.3" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}
version := "0.1.14"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.8"

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.3" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}
version := "0.1.15"

autocommit: Update configuration to record version 0.1.15


name              := "system-testing"

version           := "0.2.0-SNAPSHOT"

organization      := "edu.nus"

scalaVersion      := "2.10.3"

publishMavenStyle := true

libraryDependencies += "org.scalatest" % "scalatest_2.10" % "2.2.4" % "test"

libraryDependencies += "com.typesafe" % "config" % "1.2.1"

libraryDependencies += "org.scala-lang" % "scala-actors" % "2.10.3"

name              := "system-testing"

version           := "0.2.0-SNAPSHOT"

organization      := "edu.nus"

scalaVersion      := "2.10.5"

publishMavenStyle := true

libraryDependencies += "org.scalatest" % "scalatest_2.10" % "2.2.4" % "test"

libraryDependencies += "com.typesafe" % "config" % "1.2.1"

libraryDependencies += "org.scala-lang" % "scala-actors" % "2.10.3"

Update SBT setting to use latest Scala 2.10.5


import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

crossScalaVersions := Seq("2.11.7")

version := "0.0.13"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      "org.scalatest" %% "scalatest" % "2.2.5" % "test"
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import play.PlayImport.PlayKeys._

name := "lib-play"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

crossScalaVersions := Seq("2.11.7")

version := "0.0.14"

lazy val root = project
  .in(file("."))
  .enablePlugins(PlayScala)
  .settings(
    libraryDependencies ++= Seq(
      ws,
      "org.scalatest" %% "scalatest" % "2.2.5" % "test"
    )
)

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

Increment version from 0.0.13 => 0.0.14

Increment version from 0.0.13 => 0.0.14


name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.98"

name := "lib-reference-scala"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

crossScalaVersions := Seq("2.12.6")

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    ),
    credentials += Credentials(
      "Artifactory Realm",
      "flow.jfrog.io",
      System.getenv("ARTIFACTORY_USERNAME"),
      System.getenv("ARTIFACTORY_PASSWORD")
    )
  )

publishTo := {
  val host = "https://flow.jfrog.io/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

version := "0.1.99"

autocommit: Update configuration to record version 0.1.99


androidBuildAar

autoScalaLibrary := false

githubProject := "floatinglabellayout"

javacOptions ++=
    "-source" :: "1.7" ::
    "-target" :: "1.7" ::
    Nil

libraryDependencies ++=
    "com.android.support" % "design" % "23.4.0" ::
    Nil

minSdkVersion := "7"

name := "FloatingLabelLayout"

normalizedName := "floating-label-layout"

organization := "io.taig.android"

platformTarget := "android-23"

publishArtifact in ( Compile, packageDoc ) := false

scalacOptions ++=
    "-deprecation" ::
    "-feature" ::
    Nil

targetSdkVersion := "23"

typedResources := false

version := "1.1.7"

androidBuildAar

autoScalaLibrary := false

githubProject := "floatinglabellayout"

javacOptions ++=
    "-source" :: "1.7" ::
    "-target" :: "1.7" ::
    Nil

libraryDependencies ++=
    "com.android.support" % "design" % "24.0.0" ::
    Nil

minSdkVersion := "7"

name := "FloatingLabelLayout"

normalizedName := "floating-label-layout"

organization := "io.taig.android"

platformTarget := "android-23"

publishArtifact in ( Compile, packageDoc ) := false

scalacOptions ++=
    "-deprecation" ::
    "-feature" ::
    Nil

targetSdkVersion := "23"

typedResources := false

version := "1.1.7"

Upgrade to support library 24.0.0

Upgrade to support library 24.0.0


package me.shadaj.simple.react.core

import me.shadaj.simple.react.core.facade.{ComponentInstance, React}

import scala.language.implicitConversions
import scala.scalajs.js

class BuildingComponent[Props](private[BuildingComponent] val e: ExternalComponent, private[BuildingComponent] val props: Props) {
  def apply(children: ComponentInstance*)(implicit writer: Writer[Props]): ComponentInstance = {
    React.createElement(e.component, writer.write(props), children: _*)
  }
}

object BuildingComponent {
  implicit def shortCut[C <: ExternalComponent, Props](bc: BuildingComponent[Props])(implicit writer: Writer[Props]): ComponentInstance = {
    React.createElement(bc.e.component, writer.write(bc.props))
  }
}

trait ExternalComponent {
  type Props

  val component: js.Object

  def apply(p: Props): BuildingComponent[Props] = {
    new BuildingComponent(this, p)
  }
}

package me.shadaj.simple.react.core

import me.shadaj.simple.react.core.facade.{ComponentInstance, React}

import scala.language.implicitConversions
import scala.scalajs.js

class BuildingComponent[Props](private[BuildingComponent] val e: ExternalComponent, private[BuildingComponent] val props: Props, writer: Writer[Props]) {
  def withChildren(children: ComponentInstance*): ComponentInstance = {
    React.createElement(e.component, writer.write(props), children: _*)
  }
}

object BuildingComponent {
  implicit def shortcut[Props](bc: BuildingComponent[Props]): ComponentInstance = {
    bc.withChildren()
  }
}

trait ExternalComponent {
  type Props

  val component: js.Object

  def apply(p: Props)(implicit writer: Writer[Props]): BuildingComponent[Props] = {
    new BuildingComponent[Props](this, p, writer)
  }
}

Change adding children to external component to have withChildren method instead of apply


/* Copyright 2009-2018 EPFL, Lausanne */

package stainless

import stainless.lang._
import stainless.annotation._

import scala.language.implicitConversions

package object equations {

  @library
  case class ProofOps(prop: Boolean) {
    def because(proof: Boolean): Boolean = proof && prop
  }

  @library @inline
  implicit def boolean2ProofOps(prop: Boolean): ProofOps = ProofOps(prop)

  @library
  def trivial: Boolean = true

  @library @inline
  implicit def any2EqProof[A](x: => A): EqProof[A] = EqProof(() => x, () => x)

  @library
  case class EqEvidence[A](x: () => A, y: () => A, evidence: () => Boolean) {
    require(x() == y() && evidence())

    @inline
    def |(that: EqProof[A]): EqProof[A] = {
      require(evidence() ==> (y() == that.x()))
      EqProof(x, that.y)
    }

    @inline
    def |(that: EqEvidence[A]): EqEvidence[A] = {
      require(evidence() ==> (y() == that.x()))
      EqEvidence(x, that.y, that.evidence)
    }
  }

  @library
  case class EqProof[A](x: () => A, y: () => A) {
    require(x() == y())

    @inline
    def ==|(proof: => Boolean): EqEvidence[A] = {
      require(proof)
      EqEvidence(x, y, () => proof)
    }

    @inline
    def qed: Boolean = (x() == y()).holds
  }
}

/* Copyright 2009-2018 EPFL, Lausanne */

package stainless

import stainless.lang._
import stainless.annotation._

import scala.language.implicitConversions

package object equations {

  @library
  case class ProofOps(prop: Boolean) {
    def because(proof: Boolean): Boolean = proof && prop
  }

  @library @inline
  implicit def boolean2ProofOps(prop: Boolean): ProofOps = ProofOps(prop)

  @library
  def trivial: Boolean = true

  @library @inline
  implicit def any2EqEvidence[A](x: => A): EqEvidence[A] = EqEvidence(() => x, () => x, () => true)

  @library
  case class EqEvidence[A](x: () => A, y: () => A, evidence: () => Boolean) {
    require(x() == y() && evidence())

    @inline
    def ==|(proof: => Boolean): EqEvidence[A] = {
      require(proof)
      EqEvidence(x, y, () => proof)
    }

    @inline
    def |:(prev: EqEvidence[A]): EqEvidence[A] = {
      require(prev.evidence() ==> (prev.y() == x()))
      EqEvidence(prev.x, y, prev.evidence)
    }

    @inline
    def qed: Boolean = (x() == y()).holds
  }
}

Make equations go backwards for better line number reporting

l


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

version := "0.1.75"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.9",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-build"

organization := "io.flow"

scalaVersion in ThisBuild := "2.12.6"

version := "0.1.76"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.6.9",
      "com.ning" % "async-http-client" % "1.9.40",
      "org.scalatest" %% "scalatest" % "3.0.5" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

autocommit: Update configuration to record version 0.1.76


import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

version := "0.0.15"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.4.6",
      "com.ning" % "async-http-client" % "1.9.32",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

import com.github.retronym.SbtOneJar._

oneJarSettings

name := "api-lint"

organization := "io.flow"

scalaVersion in ThisBuild := "2.11.7"

version := "0.0.16"

exportJars := true

lazy val root = project
  .in(file("."))
  .settings(
    libraryDependencies ++= Seq(
      "com.typesafe.play" %% "play-json" % "2.4.6",
      "com.ning" % "async-http-client" % "1.9.32",
      "org.scalatest" %% "scalatest" % "2.2.6" % Test
    )
  )

publishTo := {
  val host = "https://flow.artifactoryonline.com/flow"
  if (isSnapshot.value) {
    Some("Artifactory Realm" at s"$host/libs-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
  } else {
    Some("Artifactory Realm" at s"$host/libs-release-local")
  }
}

Increment version from 0.0.15 => 0.0.16

Increment version from 0.0.15 => 0.0.16