Skip to content

Commit

Permalink
Merge pull request #25 from toolsplus/features/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies and add Scala 2.13 build
  • Loading branch information
tbinna authored May 31, 2020
2 parents c0e99bc + 4bc9534 commit c4d3ceb
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 38 deletions.
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@ language: scala
dist: trusty

scala:
- 2.11.12
- 2.12.6
- 2.12.11
- 2.13.2

jdk:
- oraclejdk8

cache:
directories:
- $HOME/.cache/coursier
- $HOME/.ivy2/cache
- $HOME/.sbt

before_cache:
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete

install:
- pip install --user codecov

script:
- sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport && codecov;

# See http://www.scala-sbt.org/0.13/docs/Travis-CI-with-sbt.html
# Tricks to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
- sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport && codecov

notifications:
webhooks:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ are identical to regular JWTs with the exception of a few custom claims, such as

## Quick start

atlassian-jwt is published to Maven Central for cross-built and published for Scala 2.11 and 2.12, so you can just add the following to your build:
atlassian-jwt is published to Maven Central for cross-built and published for Scala 2.11, 2.12 and 2.13, so you can just add the following to your build:

libraryDependencies += "io.toolsplus" %% "atlassian-jwt" % "x.x.x"

Expand All @@ -35,4 +35,4 @@ 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.

[apache]: http://www.apache.org/licenses/LICENSE-2.0
[apache]: http://www.apache.org/licenses/LICENSE-2.0
10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import ReleaseTransformations._

val commonSettings = Seq(
organization := "io.toolsplus",
scalaVersion := "2.12.6",
crossScalaVersions := Seq("2.11.12", "2.12.6"),
scalaVersion := "2.13.2",
crossScalaVersions := Seq("2.12.11", "2.13.2"),
resolvers ++= Seq(
"Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/",
"Typesafe repository releases" at "https://repo.typesafe.com/typesafe/releases/",
Resolver.sonatypeRepo("releases")
)
)
Expand All @@ -14,7 +14,7 @@ lazy val publishSettings = Seq(
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
homepage := Some(url("https://github.com/toolsplus/atlassian-jwt")),
licenses := Seq(
"Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
"Apache 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ =>
Expand All @@ -37,7 +37,7 @@ lazy val publishSettings = Seq(
developers := List(
Developer("tbinna",
"Tobias Binna",
"tobias.binna@toolsplus.ch",
"tobias.binna@toolsplus.io",
url("https://twitter.com/tbinna"))
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ package io.toolsplus.atlassian.jwt

import io.toolsplus.atlassian.jwt.generators.core.JwtGen
import io.toolsplus.atlassian.jwt.generators.nimbus.NimbusGen
import org.scalatest.prop.GeneratorDrivenPropertyChecks

class HttpRequestCanonicalizerSpec
extends TestSpec
with GeneratorDrivenPropertyChecks
with JwtGen
with NimbusGen {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package io.toolsplus.atlassian.jwt

import io.toolsplus.atlassian.jwt.generators.core.JwtGen
import io.toolsplus.atlassian.jwt.generators.nimbus.NimbusGen
import org.scalatest.prop.GeneratorDrivenPropertyChecks
import org.scalatest.{MustMatchers, WordSpec}
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec
import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks

abstract class TestSpec
extends WordSpec
with MustMatchers
with GeneratorDrivenPropertyChecks
extends AnyWordSpec
with Matchers
with ScalaCheckDrivenPropertyChecks
with JwtGen
with NimbusGen
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.nimbusds.jose.{JWSAlgorithm, JWSHeader}
import org.scalacheck.Gen
import org.scalacheck.Gen._

import scala.collection.JavaConversions._
import scala.collection.JavaConverters._

trait JWSHeaderGen {

Expand Down Expand Up @@ -35,6 +35,6 @@ trait JWSHeaderGen {
new JWSHeader.Builder(alg).build()

private def compatibleAlgorithms(secret: String): Set[JWSAlgorithm] =
MACSigner.getCompatibleAlgorithms(ByteUtils.bitLength(secret.length)).toSet
MACSigner.getCompatibleAlgorithms(ByteUtils.bitLength(secret.length)).asScala.toSet

}
17 changes: 10 additions & 7 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ object Dependencies {
Library.nimbusJoseJwt,
Library.bouncyCastle,
Library.scalaCheck % "test",
Library.scalaTestPlusCheck % "test",
Library.scalaCheckDateTime % "test",
Library.scalaTest % "test",
Library.circeCore % "test",
Expand All @@ -21,13 +22,14 @@ object Dependencies {
}

object Version {
val cats = "1.6.0"
val nimbusJoseJwt = "7.1"
val bouncyCastle = "1.61"
val circe = "0.11.0"
val scalaTest = "3.0.5"
val scalaCheck = "1.14.0"
val scalaCheckDateTime = "0.2.5"
val cats = "2.1.1"
val nimbusJoseJwt = "8.17.1"
val bouncyCastle = "1.65"
val circe = "0.13.0"
val scalaTest = "3.1.2"
val scalaCheck = "1.14.3"
val scalaTestPlusScalaCheck = "3.1.2.0"
val scalaCheckDateTime = "0.3.5"
}

object Library {
Expand All @@ -39,5 +41,6 @@ object Library {
val circeOptics = "io.circe" %% "circe-optics" % Version.circe
val scalaTest = "org.scalatest" %% "scalatest" % Version.scalaTest
val scalaCheck = "org.scalacheck" %% "scalacheck" % Version.scalaCheck
val scalaTestPlusCheck = "org.scalatestplus" %% "scalacheck-1-14" % Version.scalaTestPlusScalaCheck
val scalaCheckDateTime = "com.47deg" %% "scalacheck-toolbox-datetime" % Version.scalaCheckDateTime
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.2.1
sbt.version = 1.3.11
12 changes: 6 additions & 6 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.4.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.9")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.2")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0")

0 comments on commit c4d3ceb

Please sign in to comment.