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