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

Publishing fixes #14

Merged
merged 4 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Kase64

![Kotlin Version](https://img.shields.io/badge/Kotlin-1.7.10-B125EA?logo=kotlin)
[![Maven Central](https://img.shields.io/maven-central/v/de.peilicke.sascha/kase64.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22de.peilicke.sascha%22%20AND%20a:%22kase64%22)
[![Build Status](https://github.com/saschpe/kase64/workflows/Main%20CI/badge.svg)](https://github.com/saschpe/kase64/actions)
[![Kotlin Version](https://img.shields.io/badge/Kotlin-1.9.10-B125EA?logo=kotlin)](https://kotlinlang.org)
[![Maven Central](https://img.shields.io/maven-central/v/de.peilicke.sascha/kase64.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/de.peilicke.sascha/kase64)
[![Build Status](https://github.com/saschpe/kase64/workflows/Main/badge.svg)](https://github.com/saschpe/kase64/actions)
[![License](http://img.shields.io/:License-Apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)

![badge-android](http://img.shields.io/badge/Platform-Android-brightgreen.svg?logo=android)
Expand Down
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
plugins {
kotlin("jvm") version "1.9.10"
id("com.android.library") version "8.1.0-rc01" apply false
id("com.diffplug.spotless") version "6.21.0"
id("com.github.ben-manes.versions") version "0.47.0"
id("com.github.ben-manes.versions") version "0.48.0"
}

spotless {
Expand All @@ -11,6 +9,7 @@ spotless {
propertiesFile("gradle.properties")
}
kotlin {
target("**/*.kt")
ktlint()
}
kotlinGradle {
Expand Down
18 changes: 4 additions & 14 deletions kase64/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("multiplatform")
id("com.android.library")
kotlin("multiplatform") version "1.9.10"
id("com.android.library") version "8.1.0-rc01"
`maven-publish`
signing
}
Expand Down Expand Up @@ -34,17 +34,13 @@ kotlin {
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))

android {
compileSdk = 33
namespace = "saschpe.kase64"

defaultConfig {
compileSdk = 33
minSdk = 17
}

Expand All @@ -54,14 +50,8 @@ android {
group = "de.peilicke.sascha"
version = "1.0.7"

val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}

publishing {
publications.withType<MavenPublication> {
artifact(javadocJar.get())

pom {
name.set("Kase64")
description.set("Base64 encoder/decoder for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments.")
Expand Down
4 changes: 2 additions & 2 deletions kase64/src/commonMain/kotlin/saschpe/kase64/Base64Internal.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ internal sealed interface Encoding {
val alphabet: String
val requiresPadding: Boolean

object Standard : Encoding {
data object Standard : Encoding {
override val alphabet: String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
override val requiresPadding: Boolean = true
}

object UrlSafe : Encoding {
data object UrlSafe : Encoding {
override val alphabet: String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
override val requiresPadding: Boolean = false // Padding is optional
}
Expand Down