diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9ad5f13..c380880 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,21 +7,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Run Spotless run: ./gradlew spotlessCheck build: - runs-on: macos-latest + runs-on: macos-12 steps: - uses: actions/checkout@v1 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Build with Gradle run: ./gradlew build - name: Archive .gradle folder @@ -42,7 +42,7 @@ jobs: publish: needs: build - runs-on: macos-latest + runs-on: macos-12 if: github.ref == 'refs/heads/main' environment: Sonatype env: @@ -51,10 +51,10 @@ jobs: SECRETS_KEY: ${{ secrets.SECRETS_KEY }} steps: - uses: actions/checkout@v1 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Download .gradle folder uses: actions/download-artifact@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 116b776..5ec4a4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +- Dependency update: + - [Android Gradle Plugin 7.2.1](https://developer.android.com/studio/releases/gradle-plugin#7-2-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 + - 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..c57b7c5 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,24 @@ # 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-windows](http://img.shields.io/badge/Platform-Windows-blue.svg?logo=windows) + +[//]: # (![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)) + +Base64 encoder/decoder for Kotlin/Multiplatform. Supports Android, iOS, Linux, JavaScript, Windows, watchOS, tvOS +and plain JVM environments. **Supported encodings** diff --git a/build.gradle.kts b/build.gradle.kts index c686ef9..edcde32 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,27 +1,30 @@ plugins { - kotlin("jvm") version "1.6.21" apply false - id("com.android.library") version "7.0.4" apply false - id("com.diffplug.spotless") version "6.7.2" + kotlin("jvm") version "1.7.10" apply false + id("com.android.library") version "7.2.1" apply false + id("com.diffplug.spotless") version "6.9.0" id("com.github.ben-manes.versions") version "0.42.0" } spotless { format("misc") { - target("*.md", "**/.gitignore") + target("**/*.gradle", "*.md", "**/.gitignore") trimTrailingWhitespace() endWithNewline() } freshmark { target("*.md") + propertiesFile("gradle.properties") } kotlin { - target("*/src/**/*.kt") - targetExclude("*/build/**/*.kt") - ktlint().userData(mapOf("disabled_rules" to "no-wildcard-imports")) + target("source/**/src/**/*.kt") + targetExclude("**/build/**/*.kt") + ktlint().editorConfigOverride( + mapOf("disabled_rules" to "filename,no-wildcard-imports", "insert_final_newline" to false) + ) } kotlinGradle { target("**/*.gradle.kts") - ktlint() + ktlint().editorConfigOverride(mapOf("insert_final_newline" to false)) } } @@ -32,4 +35,4 @@ tasks { !isStable(candidate.version) && isStable(currentVersion) } } -} +} \ No newline at end of file diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 3c866ab..5d2fee1 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -29,4 +29,4 @@ object Secrets { } } named("assemble") { dependsOn(ensureSecretsExist) } -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 954498b..db56778 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # Gradle file.encoding=utf-8 org.gradle.caching=true -org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.parallel=true org.gradle.vfs.watch=true @@ -14,4 +14,4 @@ kotlin.native.ignoreDisabledTargets=true android.enableJetifier=true android.injected.testOnly=false android.testConfig.useRelativePath=true -android.useAndroidX=true \ No newline at end of file +android.useAndroidX=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 92f06b5..2ec77e5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/kase64/build.gradle.kts b/kase64/build.gradle.kts index 88f40a3..5334654 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")) @@ -24,7 +29,12 @@ kotlin { sourceSets["iosSimulatorArm64Main"].dependsOn(sourceSets["iosMain"]) sourceSets["iosSimulatorArm64Test"].dependsOn(sourceSets["iosTest"]) - sourceSets.remove(sourceSets["androidAndroidTestRelease"]) // https://issuetracker.google.com/issues/152187160 + sourceSets { // https://issuetracker.google.com/issues/152187160 + remove(sourceSets["androidAndroidTestRelease"]) + remove(sourceSets["androidTestFixtures"]) + remove(sourceSets["androidTestFixturesDebug"]) + remove(sourceSets["androidTestFixturesRelease"]) + } targets.withType(org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithSimulatorTests::class.java) { testRuns["test"].deviceId = "iPhone 13" @@ -102,4 +112,4 @@ signing { else -> useInMemoryPgpKeys(sonatypeGpgKey, sonatypeGpgKeyPassword) } sign(publishing.publications) -} +} \ No newline at end of file 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 diff --git a/settings.gradle.kts b/settings.gradle.kts index 9f3acee..7a278c4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,4 +14,4 @@ dependencyResolutionManagement { rootProject.name = "Kase64" -include(":kase64") +include(":kase64") \ No newline at end of file