1.3.0 release #7
21
README.md
21
README.md
@@ -7,17 +7,10 @@ Supported encodings:
|
|||||||
- Base8 (octal)
|
- Base8 (octal)
|
||||||
- Base16 (hexadecimal)
|
- Base16 (hexadecimal)
|
||||||
- Base32
|
- Base32
|
||||||
|
- Base36
|
||||||
|
- Base62
|
||||||
- Base64
|
- Base64
|
||||||
|
|
||||||
## Targets
|
|
||||||
|
|
||||||
| Target | Status |
|
|
||||||
|------------------|---------------|
|
|
||||||
| JVM | Supported |
|
|
||||||
| JavaScript | Supported |
|
|
||||||
| Native (Linux) | Supported |
|
|
||||||
| Native (Windows) | Not Supported |
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Add the following to your `build.gradle.kts`.
|
Add the following to your `build.gradle.kts`.
|
||||||
@@ -28,23 +21,19 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.infendro:encoding:1.2.0")
|
implementation("com.infendro:encoding:1.3.0")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
import com.infendro.encoding.Base16
|
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
// the string to encode
|
// the string to encode
|
||||||
val test = "Hello World!"
|
val test = "Hello World!".encodeToByteArray()
|
||||||
.encodeToByteArray().asUByteArray()
|
|
||||||
|
|
||||||
// encode the string with the desired encoding
|
// encode the string with the desired encoding
|
||||||
val encoded = Base16.encode(test)
|
val encoded = Base16.encode(test).decodeToString()
|
||||||
.asByteArray().decodeToString()
|
|
||||||
|
|
||||||
println(encoded) // 48656c6c6f20576f726c6421
|
println(encoded) // 48656c6c6f20576f726c6421
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
@file:OptIn(ExperimentalWasmDsl::class)
|
||||||
|
|
||||||
import com.infendro.plugin.infendro
|
import com.infendro.plugin.infendro
|
||||||
import com.infendro.plugin.token
|
import com.infendro.plugin.token
|
||||||
|
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||||
|
|
||||||
group = "com.infendro"
|
group = "com.infendro"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.infendro)
|
alias(libs.plugins.infendro)
|
||||||
@@ -13,9 +16,13 @@ plugins {
|
|||||||
kotlin {
|
kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
linuxX64()
|
linuxX64()
|
||||||
js {
|
linuxArm64()
|
||||||
nodejs()
|
mingwX64()
|
||||||
}
|
macosX64()
|
||||||
|
macosArm64()
|
||||||
|
js { nodejs() }
|
||||||
|
wasmJs { nodejs() }
|
||||||
|
wasmWasi { nodejs() }
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -26,10 +33,6 @@ kotlin {
|
|||||||
implementation(libs.test)
|
implementation(libs.test)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compilerOptions {
|
|
||||||
freeCompilerArgs.add("-opt-in=kotlin.ExperimentalUnsignedTypes")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing.repositories {
|
publishing.repositories {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
infendro = "1.0.0"
|
infendro = "1.0.0"
|
||||||
kotlin = "2.2.21"
|
kotlin = "2.3.0"
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
infendro = { id = "com.infendro.plugin", version.ref = "infendro" }
|
infendro = { id = "com.infendro.plugin", version.ref = "infendro" }
|
||||||
|
|||||||
Reference in New Issue
Block a user