From a8841a537d199afde1e515ef249171f77744d52a Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Thu, 27 Aug 2020 10:19:50 +0700 Subject: [PATCH] Add build and publish the jar libra --- build.gradle.kts | 21 +++++++++++++++++++ .../libra/moneyutils/MoneyExchangeAdapter.kt | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 src/main/kotlin/com/cubetiqs/libra/moneyutils/MoneyExchangeAdapter.kt diff --git a/build.gradle.kts b/build.gradle.kts index 4e4edbc..63ce84d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,7 @@ plugins { kotlin("jvm") version "1.4.0" + `java-library` + id("de.marcphilipp.nexus-publish") version "0.4.0" } group = "com.cubetiqs.libra" @@ -13,3 +15,22 @@ dependencies { implementation(kotlin("stdlib")) testImplementation("org.junit.vintage:junit-vintage-engine:5.6.2") } + +publishing { + publications { + create("mavenJava") { + from(components["java"]) + } + } +} + +nexusPublishing { + repositories { + create("mavenJava") { + nexusUrl.set(uri("https://nexus.osa.cubetiqs.com/repository/local-maven-dev/")) + snapshotRepositoryUrl.set(uri("https://nexus.osa.cubetiqs.com/repository/local-maven-dev/")) + username.set("cubetiq") + password.set("cube17tiq") + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/com/cubetiqs/libra/moneyutils/MoneyExchangeAdapter.kt b/src/main/kotlin/com/cubetiqs/libra/moneyutils/MoneyExchangeAdapter.kt new file mode 100644 index 0000000..00d9b92 --- /dev/null +++ b/src/main/kotlin/com/cubetiqs/libra/moneyutils/MoneyExchangeAdapter.kt @@ -0,0 +1,5 @@ +package com.cubetiqs.libra.moneyutils + +interface MoneyExchangeAdapter { + fun getRate(currency: String): Double +} \ No newline at end of file