From 9be32b6a53fc68ae654a3e86d372a5d54dd6cbf1 Mon Sep 17 00:00:00 2001 From: rnentjes Date: Tue, 17 Dec 2024 20:40:07 +0100 Subject: [PATCH] Fix size calculation and update build configuration Corrected the `size` property in `SlicedByteArray` to account for offset. Bumped the version to 0.2.7 and added a custom Maven repository to the build script. Adjusted the `settings.gradle.kts` file to clean up formatting. --- build.gradle.kts | 5 ++++- settings.gradle.kts | 2 +- src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c6efc8a..7fccb65 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,10 +6,13 @@ plugins { } group = "nl.astraeus" -version = "0.2.6" +version = "0.2.8" repositories { mavenCentral() + maven { + url = uri("https://gitea.astraeus.nl:8443/api/packages/rnentjes/maven") + } } kotlin { diff --git a/settings.gradle.kts b/settings.gradle.kts index 7f6ca2a..8b53baa 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } -rootProject.name = "typed-byte-arrays" +rootProject.name = "typed-byte-arrays" diff --git a/src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt b/src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt index 13cfdcc..115c381 100644 --- a/src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt +++ b/src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt @@ -6,7 +6,7 @@ class SlicedByteArray( val length: Int ) { val size: Int - get() = length + get() = length - offset constructor(array: ByteArray) : this(array, 0, array.size)