sbt-travisci is an sbt plugin to integrate with Travis CI.
Add this to your sbt build plugins, in either
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.1")
Then make sure to NOT set the
crossScalaVersions setting, otherwise you will override
Other than that, as
sbt-travisci is an AutoPlugin that is all that is required.
isTravisBuild in Globalwill be automatically be set to
trueif the current build is running under Travis CI.
travisPrNumber in Globalwill be automatically set to the number of the pull request, in case the build is a pull request build. Otherwise, it will have a value of
crossScalaVersions in ThisBuildwill be automatically set to the scala versions in
.travis.yml, falling back (with warnings) to the value of
crossScalaVersions in Globalif it can't be found or parsed properly.
scalaVersion in ThisBuildwill be automatically set to
isTravisBuildis true, otherwise to the
crossScalaVersions, and so by default, sbt will assume you want to develop under the last version listed in
scala: - 2.11.8 - 2.12.0
scalaVersion in ThisBuild will be
Copyright 2016 Dale Wijnand
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
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.