Updated dependencies
This commit is contained in:
parent
416a52ec18
commit
1906a24343
8 changed files with 37 additions and 27 deletions
2
.idea/kotlinc.xml
generated
2
.idea/kotlinc.xml
generated
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.7.20" />
|
||||
<option name="version" value="1.8.0" />
|
||||
</component>
|
||||
</project>
|
5
.idea/misc.xml
generated
5
.idea/misc.xml
generated
|
@ -4,5 +4,8 @@
|
|||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="18" project-jdk-type="JavaSDK" />
|
||||
<component name="PDMPlugin">
|
||||
<option name="skipTestSources" value="false" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="19" project-jdk-type="JavaSDK" />
|
||||
</project>
|
15
README.md
15
README.md
|
@ -1,10 +1,16 @@
|
|||
[](https://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/cryptoprice/releases/latest) [](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/cryptoprice) <!-- [](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/cryptoprice/) -->
|
||||
[](https://opensource.org/licenses/BSD-3-Clause)
|
||||
[](https://kotlinlang.org/)
|
||||
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/cryptoprice/)
|
||||
[](https://github.com/ethauvin/cryptoprice/releases/latest)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/cryptoprice)
|
||||
|
||||
[](https://sonarcloud.io/dashboard?id=ethauvin_cryptoprice) [](https://github.com/ethauvin/cryptoprice/actions/workflows/gradle.yml) [](https://circleci.com/gh/ethauvin/cryptoprice/tree/master)
|
||||
[](https://sonarcloud.io/dashboard?id=ethauvin_cryptoprice)
|
||||
[](https://github.com/ethauvin/cryptoprice/actions/workflows/gradle.yml)
|
||||
[](https://circleci.com/gh/ethauvin/cryptoprice/tree/master)
|
||||
|
||||
# Retrieve cryptocurrencies current (buy, sell or spot) prices
|
||||
|
||||
A simple Kotlin/Java/Android implementation of the prices [Coinbase Public API](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices).
|
||||
A simple implementation of the prices [Coinbase Public API](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices).
|
||||
|
||||
## Examples (TL;DR)
|
||||
|
||||
|
@ -32,6 +38,7 @@ To use with [Gradle](https://gradle.org/), include the following dependency in y
|
|||
```gradle
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } // only needed for SNAPSHOT
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -85,7 +92,7 @@ val euro = CryptoPrice("BTC", "EUR", 23456.78.toBigDecimal())
|
|||
println(euro.toCurrency()) // €23,456.78
|
||||
|
||||
val krone = CryptoPrice("BTC", "DKK", 123456.78.toBigDecimal())
|
||||
println(krone.toCurrency(Locale("da", "DK"))) // 123.456,78 kr.
|
||||
println(krone.toCurrency(Locale.Builder().setLanguage("da").setRegion("DK").build())) // 123.456,78 kr.
|
||||
```
|
||||
|
||||
##### JSON
|
||||
|
|
|
@ -7,22 +7,22 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|||
|
||||
plugins {
|
||||
id("application")
|
||||
id("com.github.ben-manes.versions") version "0.42.0"
|
||||
id("io.gitlab.arturbosch.detekt") version "1.21.0"
|
||||
id("com.github.ben-manes.versions") version "0.44.0"
|
||||
id("io.gitlab.arturbosch.detekt") version "1.22.0"
|
||||
id("java")
|
||||
id("maven-publish")
|
||||
id("org.jetbrains.dokka") version "1.7.10"
|
||||
id("org.jetbrains.dokka") version "1.7.20"
|
||||
id("org.jetbrains.kotlinx.kover") version "0.6.1"
|
||||
id("org.sonarqube") version "3.4.0.2513"
|
||||
id("org.sonarqube") version "3.5.0.2730"
|
||||
id("signing")
|
||||
kotlin("jvm") version "1.7.20"
|
||||
kotlin("jvm") version "1.8.0"
|
||||
}
|
||||
|
||||
defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
|
||||
|
||||
description = "Retrieve cryptocurrencies prices."
|
||||
description = "Retrieve cryptocurrencies prices"
|
||||
group = "net.thauvin.erik"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1-SNAPSHOT"
|
||||
|
||||
val deployDir = "deploy"
|
||||
val gitHub = "ethauvin/$name"
|
||||
|
@ -168,8 +168,8 @@ publishing {
|
|||
}
|
||||
}
|
||||
scm {
|
||||
connection.set("scm:git:git://github.com/$gitHub.git")
|
||||
developerConnection.set("scm:git:git@github.com:$gitHub.git")
|
||||
connection.set("scm:git://github.com/$gitHub.git")
|
||||
developerConnection.set("scm:git@github.com:$gitHub.git")
|
||||
url.set(mavenUrl)
|
||||
}
|
||||
issueManagement {
|
||||
|
|
|
@ -2,8 +2,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|||
|
||||
plugins {
|
||||
id("application")
|
||||
id("com.github.ben-manes.versions") version "0.42.0"
|
||||
kotlin("jvm") version "1.7.20"
|
||||
id("com.github.ben-manes.versions") version "0.44.0"
|
||||
kotlin("jvm") version "1.8.0"
|
||||
}
|
||||
|
||||
// ./gradlew run
|
||||
|
@ -20,7 +20,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation("net.thauvin.erik:cryptoprice:1.0.0")
|
||||
implementation("net.thauvin.erik:cryptoprice:1.1.0-SNAPSHOT")
|
||||
implementation("org.json:json:20220924")
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
14
pom.xml
14
pom.xml
|
@ -8,9 +8,9 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.thauvin.erik</groupId>
|
||||
<artifactId>cryptoprice</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<name>cryptoprice</name>
|
||||
<description>Retrieve cryptocurrencies prices.</description>
|
||||
<description>Retrieve cryptocurrencies prices</description>
|
||||
<url>https://github.com/ethauvin/cryptoprice</url>
|
||||
<licenses>
|
||||
<license>
|
||||
|
@ -27,8 +27,8 @@
|
|||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/ethauvin/cryptoprice.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:ethauvin/cryptoprice.git</developerConnection>
|
||||
<connection>scm:git://github.com/ethauvin/cryptoprice.git</connection>
|
||||
<developerConnection>scm:git@github.com:ethauvin/cryptoprice.git</developerConnection>
|
||||
<url>https://github.com/ethauvin/cryptoprice</url>
|
||||
</scm>
|
||||
<issueManagement>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-bom</artifactId>
|
||||
<version>1.7.10</version>
|
||||
<version>1.8.0</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -50,7 +50,7 @@
|
|||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>1.7.10</version>
|
||||
<version>1.8.0</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -62,7 +62,7 @@
|
|||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20220320</version>
|
||||
<version>20220924</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue