-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from raul782/issue-16-add-support-scala3
issue-16 add support for scala 3
- Loading branch information
Showing
42 changed files
with
192 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
language: scala | ||
scala: | ||
- 2.13.6 | ||
- 2.12.14 | ||
- 3.0.1 | ||
script: | ||
- sbt ++$TRAVIS_SCALA_VERSION compile test publishLocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
CHANGELOG | ||
========= | ||
|
||
3.0.0 - Add support for scala 3 | ||
|
||
Scala 2 | ||
------- | ||
0.2.0 - Upgrade sttp client 3 | ||
0.1.7 - Coingecko scala client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import ReleaseTransformations._ | ||
|
||
ThisBuild / scalaVersion := "2.13.6" | ||
ThisBuild / scalaVersion := "3.0.1" | ||
ThisBuild / organization := "com.besselstudio" | ||
ThisBuild / organizationName := "Bessel Studio" | ||
ThisBuild / homepage := Some(url("https://github.com/besselstudio/coingecko")) | ||
|
@@ -20,7 +20,9 @@ lazy val root = (project in file(".")) | |
"scm:git:[email protected]:besselstudio/coingecko.git" | ||
) | ||
), | ||
crossScalaVersions := Seq(scalaVersion.value, "2.12.14"), | ||
scalacOptions ++= Seq( | ||
"-Xmax-inlines", "64" //Solves: Maximal number of successive inlines (32) exceeded | ||
), | ||
resolvers ++= Seq( | ||
Resolver.sonatypeRepo("releases"), | ||
Resolver.sonatypeRepo("snapshots") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
import sbt._ | ||
|
||
object Version { | ||
val sttpVersion = "3.3.6" | ||
val sttpVersion = "3.3.13" | ||
val scalaTestVersion = "3.2.9" | ||
val playJsonVersion = "2.9.2" | ||
val playJsonxVersion = "0.42.0" | ||
val playJsonVersion = "2.10.0-RC5" | ||
} | ||
|
||
object Dependencies { | ||
import Version._ | ||
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.2.2" % Test | ||
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.2.9" % Test | ||
lazy val playJson = "com.typesafe.play" %% "play-json" % playJsonVersion | ||
lazy val sttpClient = "com.softwaremill.sttp.client3" %% "core" % sttpVersion | ||
lazy val playJsonx = "ai.x" %% "play-json-extensions" % playJsonxVersion | ||
|
||
lazy val common = Seq( | ||
scalaTest, | ||
playJson, | ||
sttpClient, | ||
playJsonx | ||
sttpClient | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.5.2 | ||
sbt.version=1.5.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
src/main/scala/com/besselstudio/coingecko/CoingeckoApiError.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/main/scala/com/besselstudio/coingecko/model/coins/BaseCoin.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package com.besselstudio.coingecko.model.coins | ||
|
||
import com.besselstudio.coingecko.model.response.BaseResponse | ||
import play.api.libs.json.{Json, Reads} | ||
import play.api.libs.json.{Format, Json} | ||
|
||
case class BaseCoin( | ||
id: String, | ||
symbol: String, | ||
name: String | ||
) | ||
|
||
object BaseCoin extends BaseResponse{ | ||
implicit val baseCoinReads: Reads[BaseCoin] = Json.reads[BaseCoin] | ||
object BaseCoin extends BaseResponse { | ||
given Format[BaseCoin] = Json.format[BaseCoin] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
src/main/scala/com/besselstudio/coingecko/model/coins/CoinTicker.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
package com.besselstudio.coingecko.model.coins | ||
|
||
import com.besselstudio.coingecko.model.coins.common.Ticker | ||
import play.api.libs.json.{Json, Reads} | ||
import com.besselstudio.coingecko.model.response.BaseResponse | ||
import play.api.libs.json.{Format, Json} | ||
|
||
case class CoinTicker( | ||
name: String, | ||
tickers: List[Ticker] | ||
) | ||
|
||
object CoinTicker { | ||
implicit val reads: Reads[CoinTicker] = Json.reads[CoinTicker] | ||
object CoinTicker extends BaseResponse { | ||
given Format[CoinTicker] = Json.format[CoinTicker] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.