Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.6.1 release #14

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
574564b
Use and debug "com.huanshankeji.team:gradle-plugins:0.6.1-SNAPSHOT"
ShreckYe Oct 20, 2024
9ce9e60
Merge branch 'main' into gradle-plugins-0.6.1-snapshot
ShreckYe Nov 7, 2024
1384528
Use the new `com.huanshankeji.team.dokka.github-dokka-convention` plugin
ShreckYe Nov 7, 2024
6ce9852
Debug the changes in the `com.huanshankeji.team.dokka.github-dokka-co…
ShreckYe Nov 7, 2024
642c2c9
Bump Arrow to v2.0.0-beta.1
ShreckYe Nov 14, 2024
e072f5c
Bump our Gradle plugins to the stable version of v0.7.0
ShreckYe Nov 29, 2024
7bb60c4
Merge pull request #13 from huanshankeji/dependent-on-snapshots
ShreckYe Nov 29, 2024
477978d
Add change log for v0.6.0 and deprecate `PgPoolOptions.setUpConventio…
ShreckYe Nov 29, 2024
42d926a
Bump Kotlin to 2.1.0
ShreckYe Dec 1, 2024
6bebf69
Run `kotlinUpgradeYarnLock`
ShreckYe Dec 1, 2024
4c1a5de
Bump the Gradle wrapper to the latest version of v8.11.1 which depend…
ShreckYe Dec 2, 2024
3efd5fa
Merge branch 'gradlew-v8.11.1' into kotlin-2.1.0-and-above
ShreckYe Dec 2, 2024
91e7bb0
Make the project version explicit
ShreckYe Dec 2, 2024
5c23386
Bump our dependencies the latest snapshots using Kotlin 2.1.0
ShreckYe Dec 2, 2024
50f49b8
Bump the project version
ShreckYe Dec 2, 2024
729d1bb
Merge branch 'main' into kotlin-2.1.0-and-above
ShreckYe Dec 2, 2024
206d6df
Bump our Gradle plugins to the latest stable version and remove the e…
ShreckYe Dec 3, 2024
ac6a2ec
Merge pull request #15 from huanshankeji/kotlin-2.1.0-and-above
ShreckYe Dec 3, 2024
f22a943
Exclude the unneeded subprojects in API validation, remove their "api…
ShreckYe Dec 3, 2024
4f302f0
Bump Arrow to v2.0.0-rc.1
ShreckYe Dec 4, 2024
0c919c1
Merge branch 'main' into arrow-v2.0.0-beta.1
ShreckYe Dec 4, 2024
f06449d
Replace deprecated `ExperimentalWasmDsl` opt-ins
ShreckYe Dec 4, 2024
4b2a826
Remove the `multiplatform-conventions-without-ios` "buildSrc" Gradle …
ShreckYe Dec 4, 2024
2f14583
Merge pull request #16 from huanshankeji/arrow-v2.0.0-beta.1
ShreckYe Dec 4, 2024
b47943d
Remove an obsolete comment
ShreckYe Dec 4, 2024
038b7c8
Bump common-gradle-dependencies to v0.9.0-20241203-SNAPSHOT
ShreckYe Dec 4, 2024
2fb3d82
Fix Kotest `Arb.default` deprecations and remove an explicit type arg…
ShreckYe Dec 4, 2024
bf515c8
Merge branch 'main' into use-common-gradle-dependencies-0.9.0-2024120…
ShreckYe Dec 4, 2024
08298ed
Bump our common-gradle-dependencies to v0.9.0-20241203 and our Gradle…
ShreckYe Dec 4, 2024
adec16f
Merge branch 'use-common-gradle-dependencies-0.9.0-20241203-or-above'
ShreckYe Dec 4, 2024
2db5602
Add change log for v0.6.1
ShreckYe Dec 5, 2024
b2dba3a
Update a link README.md
ShreckYe Jan 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Change log

## v0.6.1 / 2024-12-05

* bump Kotlin to 2.1.0 and our library and build dependencies to the latest (including pre-release versions except for Vert.x 5)
* deprecate `PgPoolOptions.setUpConventionally`, which should've been included in v0.6.0 but was not

## v0.6.0 / 2024-11-29

* add conversion functions to convert Vert.x `Buffer`s to kotlinx-io `RawSink`s and `Sink`s and Okio `Sink`s and `BufferedSink`s

The `Source` conversion functions are not provided because Vert.x `Buffer` doesn't provide reading methods with a reader index.

* adapt to the [Exposed SELECT DSL design changes](https://github.com/JetBrains/Exposed/pull/1916) and bump Exposed to v0.56.0

The old `deleteWhereStatement` that conflicts with the new one is removed, causing a source and binary incompatible change.

* add API documentation generated by Dokka hosted at <https://huanshankeji.github.io/kotlin-common/>
* add CODE_OF_CONDUCT.md and CONTRIBUTING.md
* use the Kotlin binary compatibility validator
* add some experimental plus operators for nullable functions/lambdas
* add some common functions for Exposed and Vert.x SQL Client such as `jdbcUrl`, `ClientBuilder<*>.withCoConnectHandler`, and `SqlConnectOptions.setUpConventionally`
* add a `CoroutineAutoCloseable` interface like `AutoCloseable` and its version of the `use` extension function

## v0.5.1 / 2024-10-19

* enable the iOS targets for the "coroutines" module, which was disabled due to a compiler bug
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Huanshankeji's common code libraries in Kotlin

These include a core library to extend the Kotlin language and its standard library, and extension libraries for various Kotlin and Java libraries such as [Λrrow](https://arrow-kt.io/), Coroutines ([docs here](https://kotlinlang.org/docs/coroutines-overview.html) and [repository here](https://github.com/Kotlin/kotlinx.coroutines)), [Exposed](https://github.com/JetBrains/Exposed), [Ktor](https://ktor.io/), [reflection](https://kotlinlang.org/docs/reflection.html), Serialization ([docs here](https://kotlinlang.org/docs/serialization.html) and [repository here](https://github.com/Kotlin/kotlinx.serialization)), [Vert.x](https://vertx.io/) (along with extensions for [kotlinx-io](https://github.com/Kotlin/kotlinx-io) and [Okio](https://square.github.io/okio/)), etc. For common extensions for Compose Multiplatform, check out [compose-multiplatform-common](https://github.com/huanshankeji/compose-multiplatform-material/tree/main/compose-multiplatform-common).
These include a core library to extend the Kotlin language and its standard library, and extension libraries for various Kotlin and Java libraries such as [Λrrow](https://arrow-kt.io/), Coroutines ([docs here](https://kotlinlang.org/docs/coroutines-overview.html) and [repository here](https://github.com/Kotlin/kotlinx.coroutines)), [Exposed](https://github.com/JetBrains/Exposed), [Ktor](https://ktor.io/), [reflection](https://kotlinlang.org/docs/reflection.html), Serialization ([docs here](https://kotlinlang.org/docs/serialization.html) and [repository here](https://github.com/Kotlin/kotlinx.serialization)), [Vert.x](https://vertx.io/) (along with extensions for [kotlinx-io](https://github.com/Kotlin/kotlinx-io) and [Okio](https://square.github.io/okio/)), etc. For common extensions for Compose Multiplatform, check out [compose-multiplatform-common](https://github.com/huanshankeji/compose-multiplatform-html-unified/tree/main/common).

Currently supported targets by multiplatform libraries: JVM, JS (browser), iOS (`iosX64`, `iosArm64`, and `iosSimulatorArm64`), and Wasm JS.

Expand Down
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ apiValidation {
klib {
enabled = true
}

ignoredProjects += "kotlin-common".let {
"$it-serialization-benchmark".let {
listOf(it, "$it-jvm-only")
} + "$it-vertx-with-context-receivers"
}
}
7 changes: 3 additions & 4 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ repositories {
}

dependencies {
// With Kotlin 2.0.20, a "Could not parse POM" build error occurs in the JVM projects of some dependent projects.
implementation(kotlin("gradle-plugin", "2.0.10"))
implementation("com.huanshankeji:common-gradle-dependencies:0.8.0-20241016") // don't use a snapshot version in a main branch
implementation("com.huanshankeji.team:gradle-plugins:0.6.0") // don't use a snapshot version in a main branch
implementation(kotlin("gradle-plugin", "2.1.0"))
implementation("com.huanshankeji:common-gradle-dependencies:0.9.0-20241203") // don't use a snapshot version in a main branch
implementation("com.huanshankeji.team:gradle-plugins:0.9.0") // don't use a snapshot version in a main branch
implementation("org.jetbrains.dokka:dokka-gradle-plugin:2.0.0-Beta")
}
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/VersionsAndDependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import com.huanshankeji.CommonDependencies
import com.huanshankeji.CommonGradleClasspathDependencies
import com.huanshankeji.CommonVersions

val projectVersion = "0.6.0-SNAPSHOT"
val projectVersion = "0.6.1-SNAPSHOT"

val commonVersions = CommonVersions(arrow = "2.0.0-alpha.4" /* for Wasm JS*/, exposed = "0.56.0")
val commonVersions = CommonVersions()
val commonDependencies = CommonDependencies(commonVersions)
val commonGradleClasspathDependencies = CommonGradleClasspathDependencies(commonVersions)

Expand Down
3 changes: 1 addition & 2 deletions buildSrc/src/main/kotlin/common-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ plugins {
id("com.huanshankeji.team.with-group")
id("maven-central")
id("com.huanshankeji.team.default-github-packages-maven-publish")
id("version")
id("dokka-convention")
}

version = projectVersion

afterEvaluate {
publishing.publications.withType<MavenPublication> {
pomForTeamDefaultOpenSource(
Expand Down
13 changes: 1 addition & 12 deletions buildSrc/src/main/kotlin/dokka-convention.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
plugins {
id("org.jetbrains.dokka")
id("com.huanshankeji.team.dokka.github-dokka-convention")
}

dokka {
//moduleName.set("Huanshankeji Kotlin Common")
dokkaSourceSets.all {
//includes.from("README.md")
sourceLink {
//localDirectory.set(file("src/main/kotlin"))
remoteUrl(
"https://github.com/huanshankeji/kotlin-common/tree/v${version}/${
with(project) {
name.removePrefix(parent!!.name + '-')
}
}"
)
remoteLineSuffix.set("#L")
}
/*pluginsConfiguration.html {
footerMessage.set("(c) Yongshun Ye")
}*/
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
id("common-conventions")
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/version.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// extracted into a separate script so the version can be set before `dokka-convention`

version = projectVersion
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,31 @@ package com.huanshankeji.codec
import io.kotest.property.Arb
import io.kotest.property.Exhaustive
import io.kotest.property.arbitrary.byteArray
import io.kotest.property.arbitrary.default
import io.kotest.property.arbitrary.list
import io.kotest.property.checkAll
import io.kotest.property.exhaustive.of
import kotlinx.coroutines.ExperimentalCoroutinesApi
import io.kotest.property.resolution.default
import kotlinx.coroutines.test.TestResult
import kotlinx.coroutines.test.runTest
import kotlin.test.Test
import kotlin.test.assertContentEquals
import kotlin.test.assertEquals

class BasicCodecsTest {
@OptIn(ExperimentalUnsignedTypes::class, ExperimentalCoroutinesApi::class)
@OptIn(ExperimentalUnsignedTypes::class)
@Test
fun testConversionBetweenLongAndBigEndianBytes(): TestResult {
val long = 0x0123456789ABCDEFU.toLong()
val bytes = ubyteArrayOf(0x01U, 0x23U, 0x45U, 0x67U, 0x89U, 0xABU, 0xCDU, 0xEFU).asByteArray()
assertContentEquals(bytes, long.toBigEndianBytes())
assertEquals(long, bytes.bigEndianToLong())

@OptIn(ExperimentalCoroutinesApi::class)
return runTest {
checkAll<Long> {
assertEquals(it, it.toBigEndianBytes().bigEndianToLong())
assertEquals(it, it.toBigEndianBytes().asList().bigEndianToLong())
}
checkAll<ByteArray>(Arb.byteArray(Exhaustive.of(8), Arb.default())) {
checkAll(Arb.byteArray(Exhaustive.of(8), Arb.default())) {
assertContentEquals(it, it.bigEndianToLong().toBigEndianBytes())
}
checkAll<List<Byte>>(Arb.list(Arb.default(), 8..8)) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading
Loading