Skip to content

Commit adf7a5e

Browse files
committed
migrate to jasync
- drop Scala 2.11 support - add Scala 2.13 support
1 parent 4b09684 commit adf7a5e

25 files changed

+237
-201
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dist: xenial
33
jdk:
44
- openjdk8
55
scala:
6-
- 2.11.12
6+
- 2.13.0
77
- 2.12.8
88
sudo: false
99
script:

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
ScalikeJDBC-Async provides non-blocking APIs to talk with PostgreSQL and MySQL in the JDBC way.
66

7-
This library is built with [postgrsql-async and mysql-async,incredible works by @mauricio](https://github.com/mauricio/postgresql-async).
7+
This library is built with [jasync-sql](https://github.com/jasync-sql/jasync-sql).
88

99
![ScalikeJDBC Logo](http://scalikejdbc.org/img/logo.png)
1010

@@ -30,10 +30,10 @@ Add `scalikejdbc-async` to your dependencies.
3030

3131
```scala
3232
libraryDependencies ++= Seq(
33-
"org.scalikejdbc" %% "scalikejdbc-async" % "0.11.+",
34-
"com.github.mauricio" %% "postgresql-async" % "0.2.+",
35-
"com.github.mauricio" %% "mysql-async" % "0.2.+",
36-
"org.slf4j" % "slf4j-simple" % "1.7.+" // slf4j implementation
33+
"org.scalikejdbc" %% "scalikejdbc-async" % "0.12.+",
34+
"com.github.jasync-sql" % "jasync-postgresql" % "1.0.+",
35+
"com.github.jasync-sql" % "jasync-mysql" % "1.0.+",
36+
"org.slf4j" % "slf4j-simple" % "1.7.+" // slf4j implementation
3737
)
3838
```
3939

@@ -94,7 +94,7 @@ Transactional queries should be executed in series. You cannot use `Future.trave
9494

9595
#### Is it production-ready?
9696

97-
ScalikeJDBC-Async and [postgrsql-async and mysql-async](https://github.com/mauricio/postgresql-async) basically works fine. However, to be honest, ScalikeJBDC-Async doesn't have much of a record of production applications.
97+
ScalikeJDBC-Async and [jasync-sql](https://github.com/jasync-sql/jasync-sql) basically works fine. However, to be honest, ScalikeJBDC-Async doesn't have much of a record of production applications.
9898

9999
#### Is it possible to combine scalikejdbc-async with normal scalikejdbc?
100100

build.sbt

+28-20
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,51 @@
11
lazy val _version = "0.11.1-SNAPSHOT"
22
lazy val scalikejdbcVersion = "3.3.5"
3-
lazy val mauricioVersion = "0.2.21" // provided
3+
lazy val jasyncVersion = "1.0.2" // provided
44
lazy val postgresqlVersion = "42.2.2"
55
lazy val testContainer = "1.11.3"
6-
val Scala211 = "2.11.12"
76
val Scala212 = "2.12.8"
7+
val Scala213 = "2.13.0"
88

9-
crossScalaVersions := Seq(Scala212, Scala211)
9+
crossScalaVersions := Seq(Scala213, Scala212)
1010

1111
lazy val core = (project in file("core")).settings(
1212
organization := "org.scalikejdbc",
1313
name := "scalikejdbc-async",
1414
version := _version,
15-
scalaVersion := Scala211,
16-
crossScalaVersions := Seq(Scala212, Scala211),
15+
scalaVersion := Scala212,
16+
crossScalaVersions := Seq(Scala213, Scala212),
1717
publishTo := _publishTo(version.value),
1818
publishMavenStyle := true,
1919
resolvers ++= _resolvers,
2020
libraryDependencies := {
2121
Seq (
22-
"org.scalikejdbc" %% "scalikejdbc" % scalikejdbcVersion % "compile",
23-
"org.scalikejdbc" %% "scalikejdbc-interpolation" % scalikejdbcVersion % "compile",
24-
"org.scalikejdbc" %% "scalikejdbc-syntax-support-macro" % scalikejdbcVersion % "compile",
25-
"org.scalikejdbc" %% "scalikejdbc-joda-time" % scalikejdbcVersion % "test",
26-
"com.github.mauricio" %% "postgresql-async" % mauricioVersion % "provided",
27-
"com.github.mauricio" %% "mysql-async" % mauricioVersion % "provided",
28-
"com.dimafeng" %% "testcontainers-scala" % "0.27.0" % "test",
29-
"org.testcontainers" % "mysql" % testContainer % "test",
30-
"org.testcontainers" % "postgresql" % testContainer % "test",
31-
"org.postgresql" % "postgresql" % postgresqlVersion % "test",
32-
"mysql" % "mysql-connector-java" % "5.1.+" % "test",
33-
"org.scalatest" %% "scalatest" % "3.0.+" % "test",
34-
"ch.qos.logback" % "logback-classic" % "1.2.+" % "test"
22+
"org.scala-lang.modules" %% "scala-java8-compat" % "0.9.0",
23+
"org.scalikejdbc" %% "scalikejdbc" % scalikejdbcVersion % "compile",
24+
"org.scalikejdbc" %% "scalikejdbc-interpolation" % scalikejdbcVersion % "compile",
25+
"org.scalikejdbc" %% "scalikejdbc-syntax-support-macro" % scalikejdbcVersion % "compile",
26+
"org.scalikejdbc" %% "scalikejdbc-joda-time" % scalikejdbcVersion % "test",
27+
"com.github.jasync-sql" % "jasync-postgresql" % jasyncVersion % "provided",
28+
"com.github.jasync-sql" % "jasync-mysql" % jasyncVersion % "provided",
29+
"com.dimafeng" %% "testcontainers-scala" % "0.27.0" % "test",
30+
"org.testcontainers" % "mysql" % testContainer % "test",
31+
"org.testcontainers" % "postgresql" % testContainer % "test",
32+
"org.postgresql" % "postgresql" % postgresqlVersion % "test",
33+
"mysql" % "mysql-connector-java" % "5.1.+" % "test",
34+
"org.scalatest" %% "scalatest" % "3.0.+" % "test",
35+
"ch.qos.logback" % "logback-classic" % "1.2.+" % "test"
3536
)
3637
},
3738
sbtPlugin := false,
3839
transitiveClassifiers in Global := Seq(Artifact.SourceClassifier),
39-
scalacOptions ++= _scalacOptions,
40+
scalacOptions ++= Seq("-deprecation", "-unchecked"),
41+
scalacOptions ++= {
42+
CrossVersion.partialVersion(scalaVersion.value) match {
43+
case Some((2, v)) if v <= 12 =>
44+
Seq("-Xfuture")
45+
case _ =>
46+
Nil
47+
}
48+
},
4049
publishMavenStyle := true,
4150
publishArtifact in Test := false,
4251
parallelExecution in Test := false,
@@ -52,7 +61,6 @@ def _publishTo(v: String) = {
5261
val _resolvers = Seq(
5362
"sonatype releases" at "https://oss.sonatype.org/content/repositories/releases"
5463
)
55-
val _scalacOptions = Seq("-deprecation", "-unchecked", "-Xfuture")
5664
val _pomExtra = <url>http://scalikejdbc.org/</url>
5765
<licenses>
5866
<license>

core/src/main/scala/scalikejdbc/async/AsyncConnectionPoolSettings.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package scalikejdbc.async
1717

1818
import java.nio.charset.Charset
1919

20-
import com.github.mauricio.async.db.SSLConfiguration
20+
import com.github.jasync.sql.db.SSLConfiguration
2121
import io.netty.buffer.ByteBufAllocator
2222

2323
import scala.concurrent.duration.Duration

0 commit comments

Comments
 (0)