From 94aa7c88c8e6d89c4dd84f5d2e763cc551232fe6 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Wed, 27 Jul 2022 21:23:22 +0200 Subject: [PATCH] Gradle: Add multiple new targets --- CHANGELOG.md | 2 ++ README.md | 26 ++++++++++++++++---------- kase64/build.gradle.kts | 9 +++++++-- scripts/inc.functions.sh | 4 ++-- scripts/secret | 4 ++-- 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2524806..48efb9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Kotlin 1.7.10](https://github.com/JetBrains/kotlin/releases/tag/v1.7.10) - [Gradle-7.5](https://docs.gradle.org/7.5/release-notes.html) - [Spotless-6.9.0](https://github.com/diffplug/spotless/blob/main/plugin-gradle/CHANGES.md#690---2022-07-28) +- Add targets: linuxX64, macosArm64, mingwX64, tvOS and watchOS + - Stop building frameworks, they aren't published by default ## [1.0.5] - 2022-05-19 ### Added diff --git a/README.md b/README.md index 1deb572..9ccdd44 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,22 @@ # Kase64 -[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) -![Maven Central](https://img.shields.io/maven-central/v/de.peilicke.sascha/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) -![badge-android](http://img.shields.io/badge/platform-android-brightgreen.svg?style=flat) -![badge-ios](http://img.shields.io/badge/platform-ios-brightgreen.svg?style=flat) -![badge-native](http://img.shields.io/badge/platform-native-lightgrey.svg?style=flat) -![badge-js](http://img.shields.io/badge/platform-js-yellow.svg?style=flat) -![badge-jvm](http://img.shields.io/badge/platform-jvm-orange.svg?style=flat) -![Kotlin Version](https://img.shields.io/badge/kotlin-v1.3.60-F88909?style=flat&logo=kotlin) - -Base64 encoder/decoder for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments. +[![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) +![badge-ios](http://img.shields.io/badge/Platform-iOS-orange.svg?logo=apple) +![badge-js](http://img.shields.io/badge/Platform-NodeJS-yellow.svg?logo=javascript) +![badge-jvm](http://img.shields.io/badge/Platform-JVM-red.svg?logo=openjdk) +![badge-linux](http://img.shields.io/badge/Platform-Linux-lightgrey.svg?logo=linux) +![badge-macos](http://img.shields.io/badge/Platform-macOS-orange.svg?logo=apple) +![badge-tvos](http://img.shields.io/badge/Platform-tvOS-orange.svg?logo=apple) +![badge-watchos](http://img.shields.io/badge/Platform-watchOS-orange.svg?logo=apple) +![badge-windows](http://img.shields.io/badge/Platform-Windows-blue.svg?logo=windows) + +Base64 encoder/decoder for Kotlin/Multiplatform. Supports Android, iOS, Linux, JavaScript, Windows, watchOS, tvOS +and plain JVM environments. **Supported encodings** diff --git a/kase64/build.gradle.kts b/kase64/build.gradle.kts index 2780408..7bcd279 100644 --- a/kase64/build.gradle.kts +++ b/kase64/build.gradle.kts @@ -7,8 +7,8 @@ plugins { kotlin { android { publishAllLibraryVariants() } - ios { binaries.framework("Kase64") } - iosSimulatorArm64 { binaries.framework("Kase64") } + ios() + iosSimulatorArm64() js { nodejs() compilations.all { @@ -17,6 +17,11 @@ kotlin { } } jvm { testRuns["test"].executionTask.configure { useJUnitPlatform() } } + linuxX64() + macosArm64() + mingwX64() // Winwhat?!? + tvos() + watchos() sourceSets["commonTest"].dependencies { implementation(kotlin("test")) diff --git a/scripts/inc.functions.sh b/scripts/inc.functions.sh index 60ec8e9..9c79ea0 100644 --- a/scripts/inc.functions.sh +++ b/scripts/inc.functions.sh @@ -31,12 +31,12 @@ function safe() { } function sed2() { - sed -i'.bak' "$1" ${@:2} + sed -i'.bak' "$1" "${@:2}" for file in "${@:2}"; do rm "${file}.bak" done } function get_version_name() { - echo $(grep "version = " $1 | xargs | cut -d"=" -f2) + grep "version = " "${1}" | xargs | cut -d"=" -f2 } diff --git a/scripts/secret b/scripts/secret index e55acb4..a953d47 100755 --- a/scripts/secret +++ b/scripts/secret @@ -58,7 +58,7 @@ case ${command} in decrypt) for file in "${files[@]}"; do approve "Decrypting ${file}.enc" - safe gpg --batch --yes ${password} --output "${file}" --decrypt "${file}.gpg" + safe gpg --batch --yes "${password}" --output "${file}" --decrypt "${file}.gpg" if [[ "$(file -b "${file}")" == "data" ]]; then rm -f "${file}" die "Failed to decrypt ${file}" @@ -68,7 +68,7 @@ decrypt) encrypt) for file in "${files[@]}"; do approve "Encrypting ${file}" - safe gpg --batch --yes ${password} --output "${file}.gpg" --symmetric "${file}" + safe gpg --batch --yes "${password}" --output "${file}.gpg" --symmetric "${file}" done ;; esac