Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

Commit

Permalink
Upgrade branch 2.7.x using TemplateControl (#77)
Browse files Browse the repository at this point in the history
```
Updated with template-control on 2018-11-16T14:25:16.372Z
  **build.sbt:
    libraryDependencies += "com.typesafe.play" %% "play-slick" % "4.0.0-RC1"
  **build.sbt:
    libraryDependencies += "com.typesafe.play" %% "play-slick-evolutions" % "4.0.0-RC1"
  **/plugins.sbt:
    addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0-RC3")
  **build.gradle:
    def playVersion = "2.7.0-RC3"
  .travis.yml:
    - openjdk10
  .travis.yml:
          jdk: openjdk10

```
  • Loading branch information
octonato committed Nov 28, 2018
1 parent 298992d commit 5cd3249
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 56 deletions.
46 changes: 18 additions & 28 deletions .travis.yml
@@ -1,47 +1,37 @@
language: scala
scala:
# When updating Scala versions, also check the excludes
# in build matrix below.
- 2.11.12
- 2.12.6
- 2.12.7
jdk:
- oraclejdk8
- oraclejdk9
- oraclejdk10
- oraclejdk11
- oraclejdk8
- openjdk11
env:
matrix:
- SCRIPT=scripts/test-sbt
- SCRIPT=scripts/test-gradle
script:
- $SCRIPT
- $SCRIPT
cache:
directories:
- "$HOME/.ivy2/cache"
- "$HOME/.gradle/caches"
- "$HOME/.ivy2/cache"
- "$HOME/.gradle/caches"
before_cache:
- rm -rf $HOME/.ivy2/cache/com.typesafe.play/*
- rm -rf $HOME/.ivy2/cache/scala_*/sbt_*/com.typesafe.play/*
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print0 | xargs -n10 -0 rm
- rm -rf $HOME/.ivy2/cache/com.typesafe.play/*
- rm -rf $HOME/.ivy2/cache/scala_*/sbt_*/com.typesafe.play/*
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print0 | xargs -n10 -0 rm

# Exclude some combinations from build matrix. See:
# https://docs.travis-ci.com/user/customizing-the-build/#Build-Matrix
matrix:
exclude:
- scala: 2.11.12
jdk: oraclejdk9
- scala: 2.11.12
jdk: oraclejdk10
- scala: 2.11.12
jdk: oraclejdk11
fast_finish: true
allow_failures:
# We should allow failures here since Java 11 removed some modules including
# java.xml.bind which we are adding when running with Java 9+. For more details
# see http://openjdk.java.net/jeps/320
#
# Play already has a fix for that, but it needs to be backported and released
# for 2.6.x: https://github.com/playframework/playframework/pull/8382
- jdk: oraclejdk11
# Current release of Gradle still does not supports Play 2.7.x releases
# As soon as there is a release of Gradle that fixes that, we can then
# remove this allowed failure.
- env: SCRIPT=scripts/test-gradle
# Java 11 is still not fully supported. It is good that we are already
# testing our sample applications to better discover possible problems
# but we can allow failures here too.
- jdk: openjdk11

# See https://blog.travis-ci.com/2014-03-13-slack-notifications/
# created with travis encrypt command line tool
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'idea'
}

def playVersion = "2.6.20"
def playVersion = "2.7.0-RC3"
def scalaVersion = System.getProperty("scala.binary.version", /* default = */ "2.12")

model {
Expand All @@ -26,8 +26,8 @@ dependencies {
play "com.typesafe.play:play-logback_$scalaVersion:$playVersion"
play "com.typesafe.play:filters-helpers_$scalaVersion:$playVersion"

play "com.typesafe.play:play-slick_$scalaVersion:3.0.3"
play "com.typesafe.play:play-slick-evolutions_$scalaVersion:3.0.3"
play "com.typesafe.play:play-slick_$scalaVersion:4.0.0-RC1"
play "com.typesafe.play:play-slick-evolutions_$scalaVersion:4.0.0-RC1"

play "com.h2database:h2:1.4.197"

Expand Down
16 changes: 10 additions & 6 deletions build.sbt
@@ -1,17 +1,21 @@
name := """play-scala-slick-example"""

version := "2.6.x"
version := "2.7.x"

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

scalaVersion := "2.12.6"

crossScalaVersions := Seq("2.11.12", "2.12.4")
scalaVersion := "2.12.7"

libraryDependencies += guice
libraryDependencies += "com.typesafe.play" %% "play-slick" % "3.0.3"
libraryDependencies += "com.typesafe.play" %% "play-slick-evolutions" % "3.0.3"
libraryDependencies += "com.typesafe.play" %% "play-slick" % "4.0.0-RC1"
libraryDependencies += "com.typesafe.play" %% "play-slick-evolutions" % "4.0.0-RC1"

libraryDependencies += "com.h2database" % "h2" % "1.4.197"

libraryDependencies += specs2 % Test

scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-Xfatal-warnings"
)
2 changes: 1 addition & 1 deletion conf/application.conf
Expand Up @@ -63,6 +63,6 @@ db {
#default.logSql=true
}

slick.dbs.default.driver="slick.driver.H2Driver$"
slick.dbs.default.profile="slick.jdbc.H2Profile$"
slick.dbs.default.db.profile="org.h2.Driver"
slick.dbs.default.db.url="jdbc:h2:mem:play;DB_CLOSE_DELAY=-1"
2 changes: 1 addition & 1 deletion project/plugins.sbt
@@ -1,2 +1,2 @@
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0-RC3")
13 changes: 0 additions & 13 deletions scripts/script-helper

This file was deleted.

5 changes: 3 additions & 2 deletions scripts/test-gradle
@@ -1,13 +1,14 @@
#!/usr/bin/env bash

. "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/script-helper"
set -e
set -o pipefail

# Using cut because TRAVIS_SCALA_VERSION is the full Scala
# version (for example 2.12.4), but Gradle expects just the
# binary version (for example 2.12)
scala_binary_version=$(echo $TRAVIS_SCALA_VERSION | cut -c1-4)

echo "+------------------------------+"
echo "| Executing tests using Gradle |"
echo "| Executing tests using Gradle |"
echo "+------------------------------+"
./gradlew -Dscala.binary.version=$scala_binary_version check -i --stacktrace
5 changes: 3 additions & 2 deletions scripts/test-sbt
@@ -1,8 +1,9 @@
#!/usr/bin/env bash

. "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/script-helper"
set -e
set -o pipefail

echo "+----------------------------+"
echo "| Executing tests using sbt |"
echo "| Executing tests using sbt |"
echo "+----------------------------+"
sbt ++$TRAVIS_SCALA_VERSION test

0 comments on commit 5cd3249

Please sign in to comment.