From f55744a0386dc27f128881f56d962a9bbcf31ea6 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 2 Dec 2020 14:44:25 +0600 Subject: [PATCH] update publishing --- publication.kpsb | 2 +- publish.gradle | 2 +- .../saucenaoapi/utils/SleepCalculations.kt | 18 ------------------ 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 src/commonMain/kotlin/dev/inmo/saucenaoapi/utils/SleepCalculations.kt diff --git a/publication.kpsb b/publication.kpsb index 534a053..cc2a057 100644 --- a/publication.kpsb +++ b/publication.kpsb @@ -1 +1 @@ -{"bintrayConfig":{"repo":"InsanusMokrassar","packageName":"${project.name}-mpp","packageVcs":"https://github.com/InsanusMokrassar/${project.name}","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"SauceNao API","description":"SauceNao API library","url":"https://insanusmokrassar.github.io/${project.name}","vcsUrl":"https://github.com/insanusmokrassar/${project.name}.git","developers":[{"id":"InsanusMokrassar","name":"Ovsyannikov Alexey","eMail":"ovsyannikov.alexey95@gmail.com"}]}} \ No newline at end of file +{"bintrayConfig":{"repo":"SauceNaoAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/${project.name}","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"SauceNao API","description":"SauceNao API library","url":"https://insanusmokrassar.github.io/${project.name}","vcsUrl":"https://github.com/insanusmokrassar/${project.name}.git","developers":[{"id":"InsanusMokrassar","name":"Ovsyannikov Alexey","eMail":"ovsyannikov.alexey95@gmail.com"}]}} \ No newline at end of file diff --git a/publish.gradle b/publish.gradle index 5226b91..8390074 100644 --- a/publish.gradle +++ b/publish.gradle @@ -57,7 +57,7 @@ publishing { repositories { maven { name = "bintray" - url = uri("https://api.bintray.com/maven/${project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')}/InsanusMokrassar/${project.name}-mpp/;publish=1;override=1") + url = uri("https://api.bintray.com/maven/${project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')}/SauceNaoAPI/${project.name}/;publish=1;override=1") credentials { username = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER') password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY') diff --git a/src/commonMain/kotlin/dev/inmo/saucenaoapi/utils/SleepCalculations.kt b/src/commonMain/kotlin/dev/inmo/saucenaoapi/utils/SleepCalculations.kt deleted file mode 100644 index 3e8d64c..0000000 --- a/src/commonMain/kotlin/dev/inmo/saucenaoapi/utils/SleepCalculations.kt +++ /dev/null @@ -1,18 +0,0 @@ -package dev.inmo.saucenaoapi.utils - -import dev.inmo.saucenaoapi.additional.LONG_TIME_RECALCULATING_MILLIS -import dev.inmo.saucenaoapi.additional.SHORT_TIME_RECALCULATING_MILLIS -import dev.inmo.saucenaoapi.models.Header -import com.soywiz.klock.DateTime - -internal suspend fun calculateSleepTime( - header: Header, - mostOldestInShortPeriodGetter: suspend () -> DateTime?, - mostOldestInLongPeriodGetter: suspend () -> DateTime? -): DateTime? { - return when { - header.longRemaining < 1 -> mostOldestInLongPeriodGetter() ?.plus(LONG_TIME_RECALCULATING_MILLIS) - header.shortRemaining < 1 -> mostOldestInShortPeriodGetter() ?.plus(SHORT_TIME_RECALCULATING_MILLIS) - else -> null - } -} \ No newline at end of file