Compare commits

...

12 Commits
0.8.1 ... 0.9.0

Author SHA1 Message Date
4cc0223fbc update dependencies 2021-08-31 11:29:46 +06:00
be292102aa start 0.9.0 2021-08-31 11:21:41 +06:00
9d473857be Merge pull request #94 from InsanusMokrassar/0.8.2
0.8.2
2021-05-26 22:37:24 +06:00
6ff3f76295 fixes of publish scripts 2021-05-26 22:36:00 +06:00
0ed1a8702b fix deprecations 2021-05-26 22:16:08 +06:00
c800a81a41 update publish scripts 2021-05-26 22:10:53 +06:00
62ceae0066 update klock 2021-05-26 22:02:16 +06:00
8619d020f6 Merge branch 'master' into 0.8.2 2021-05-26 21:58:29 +06:00
affa06905e Create build_and_publish.yml 2021-05-26 21:57:39 +06:00
cbe76b3d95 update gradle wrapper 2021-05-26 21:42:51 +06:00
9f4feeccfc update dependencies 2021-05-26 21:39:42 +06:00
037074cef6 start 0.8.2 2021-05-26 21:37:34 +06:00
10 changed files with 65 additions and 15 deletions

23
.github/workflows/build_and_publish.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Publish package to GitHub Packages
on: [push]
jobs:
publishing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Rewrite version
run: |
branch="`echo "${{ github.ref }}" | grep -o "[^/]*$"`"
cat gradle.properties | sed -e "s/^library_version=\([0-9\.]*\)/library_version=\1-branch_$branch-build${{ github.run_number }}/" > gradle.properties.tmp
rm gradle.properties
mv gradle.properties.tmp gradle.properties
- name: Build
run: ./gradlew build
- name: Publish
run: ./gradlew publishAllPublicationsToGithubPackagesRepository --no-parallel -x signJsPublication -x signJvmPublication -x signKotlinMultiplatformPublication
env:
GITHUBPACKAGES_USER: ${{ github.actor }}
GITHUBPACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,5 +1,23 @@
# SauceNaoAPI Changelog
## 0.9.0
* Versions updates:
* `Kotlin`: `1.5.10` -> `1.5.30`
* `Klock`: `2.1.2` -> `2.4.0`
* `Ktor`: `1.5.4` -> `1.6.3`
* `Serialization`: `1.2.1` -> `1.2.2`
* `Coroutines`: `1.5.0` -> `1.5.1`
## 0.8.2
* Versions updates:
* `Kotlin`: `1.4.32` -> `1.5.10`
* `Klock`: `2.0.7` -> `2.1.2`
* `Ktor`: `1.5.3` -> `1.5.4`
* `Serialization`: `1.1.0` -> `1.2.1`
* `Coroutines`: `1.4.3` -> `1.5.0`
## 0.8.1
* Versions updates:

View File

@@ -1,7 +1,6 @@
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
@@ -32,7 +31,7 @@ repositories {
kotlin {
jvm()
js(BOTH) {
js(IR) {
browser()
nodejs()
}

View File

@@ -1,10 +1,10 @@
kotlin.code.style=official
kotlin_version=1.4.32
kotlin_coroutines_version=1.4.3
kotlin_serialisation_version=1.1.0
klock_version=2.0.7
ktor_version=1.5.3
kotlin_version=1.5.30
kotlin_coroutines_version=1.5.1
kotlin_serialisation_version=1.2.2
klock_version=2.4.0
ktor_version=1.6.3
gradle_github_release_plugin_version=2.2.12
library_version=0.8.1
library_version=0.9.0

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip

View File

@@ -39,6 +39,16 @@ publishing {
}
}
repositories {
if ((project.hasProperty('GITHUBPACKAGES_USER') || System.getenv('GITHUBPACKAGES_USER') != null) && (project.hasProperty('GITHUBPACKAGES_PASSWORD') || System.getenv('GITHUBPACKAGES_PASSWORD') != null)) {
maven {
name = "GithubPackages"
url = uri("https://maven.pkg.github.com/InsanusMokrassar/SauceNaoAPI")
credentials {
username = project.hasProperty('GITHUBPACKAGES_USER') ? project.property('GITHUBPACKAGES_USER') : System.getenv('GITHUBPACKAGES_USER')
password = project.hasProperty('GITHUBPACKAGES_PASSWORD') ? project.property('GITHUBPACKAGES_PASSWORD') : System.getenv('GITHUBPACKAGES_PASSWORD')
}
}
}
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
maven {
name = "sonatype"

View File

@@ -1 +1 @@
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/SauceNaoAPI/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","includeGpgSigning":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsyannikov Alexey","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}]}}
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/SauceNaoAPI/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","includeGpgSigning":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsyannikov Alexey","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"GithubPackages","url":"https://maven.pkg.github.com/InsanusMokrassar/SauceNaoAPI"},{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}]}}

View File

@@ -158,7 +158,7 @@ data class SauceNaoAPI(
minSimilarity: Float? = null
): SauceNaoAnswer? {
return suspendCoroutine<SauceNaoAnswer> {
requestsChannel.offer(
requestsChannel.trySend(
it to HttpRequestBuilder().apply {
url(searchUrl)
@@ -212,4 +212,4 @@ data class SauceNaoAPI(
timeManager.close()
quotaManager.close()
}
}
}

View File

@@ -92,7 +92,7 @@ internal class RequestQuotaManager (
quotaActions.send(callback)
}
}
quotaActions.offer(callback)
quotaActions.trySend(callback)
}
}

View File

@@ -84,7 +84,7 @@ internal class TimeManager(
suspend fun getMostOldestInLongPeriod(): DateTime? {
return suspendCoroutine {
actionsChannel.offer(
actionsChannel.trySend(
TimeManagerMostOldestInLongGetter(it)
)
}
@@ -92,7 +92,7 @@ internal class TimeManager(
suspend fun getMostOldestInShortPeriod(): DateTime? {
return suspendCoroutine {
actionsChannel.offer(TimeManagerMostOldestInShortGetter(it))
actionsChannel.trySend(TimeManagerMostOldestInShortGetter(it))
}
}