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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user