From 55e856e933a1c61907f31921495d0cb1a97bfe02 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 5 Sep 2023 13:46:15 +0200 Subject: [PATCH 1/3] Update Kotlin to 1.9.10 Resolves: #8 --- CHANGELOG.md | 1 + build.gradle.kts | 2 +- gradle.properties | 3 +-- kase64/build.gradle.kts | 11 ++--------- settings.gradle.kts | 3 ++- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bcd1c8..14132df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Dependency update: - [Android Gradle Plugin 7.2.2](https://developer.android.com/studio/releases/gradle-plugin#7-2-0) - [Gradle-7.5.1](https://docs.gradle.org/7.5.1/release-notes.html) + - [Kotlin 1.9.10](https://github.com/JetBrains/kotlin/releases/tag/v1.9.10) ## [1.0.6] - 2022-07-31 - Dependency update: diff --git a/build.gradle.kts b/build.gradle.kts index b7dd341..16f830f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - kotlin("jvm") version "1.7.10" apply false + kotlin("jvm") version "1.9.10" apply false id("com.android.library") version "7.2.2" apply false id("com.diffplug.spotless") version "6.9.0" id("com.github.ben-manes.versions") version "0.42.0" diff --git a/gradle.properties b/gradle.properties index db56778..e4cff2e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,13 @@ # Gradle file.encoding=utf-8 org.gradle.caching=true +org.gradle.configuration-cache=true org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.parallel=true -org.gradle.vfs.watch=true # Kotlin kotlin.code.style=official kotlin.mpp.stability.nowarn=true -kotlin.native.ignoreDisabledTargets=true # Android android.enableJetifier=true diff --git a/kase64/build.gradle.kts b/kase64/build.gradle.kts index fcaac08..ed21358 100644 --- a/kase64/build.gradle.kts +++ b/kase64/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } kotlin { - android { publishAllLibraryVariants() } + androidTarget { publishAllLibraryVariants() } ios() iosSimulatorArm64() js { @@ -29,15 +29,8 @@ kotlin { sourceSets["iosSimulatorArm64Main"].dependsOn(sourceSets["iosMain"]) sourceSets["iosSimulatorArm64Test"].dependsOn(sourceSets["iosTest"]) - 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" + testRuns["test"].deviceId = "iPhone 14" } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 7a278c4..21f8673 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -2,9 +2,10 @@ pluginManagement { repositories { gradlePluginPortal() google() - mavenCentral() } } + +@Suppress("UnstableApiUsage") dependencyResolutionManagement { repositories { mavenCentral() From 3ef64ef87e7fa8eb8e73202e4be9faae16364f53 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 5 Sep 2023 13:50:05 +0200 Subject: [PATCH 2/3] Gradle: Update Spotless plugin to 6.21.0 --- build.gradle.kts | 22 +++++------------- .../saschpe/kase64/Base64InternalTest.kt | Bin 1055 -> 1056 bytes .../kotlin/saschpe/kase64/Base64Test.kt | 18 +++++++------- .../kotlin/saschpe/kase64/Base64UrlTest.kt | 18 +++++++------- settings.gradle.kts | 2 +- 5 files changed, 25 insertions(+), 35 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 16f830f..ba4bcbd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,30 +1,20 @@ plugins { - kotlin("jvm") version "1.9.10" apply false + kotlin("jvm") version "1.9.10" id("com.android.library") version "7.2.2" apply false - id("com.diffplug.spotless") version "6.9.0" + id("com.diffplug.spotless") version "6.21.0" id("com.github.ben-manes.versions") version "0.42.0" } spotless { - format("misc") { - target("**/*.gradle", "*.md", "**/.gitignore") - trimTrailingWhitespace() - endWithNewline() - } freshmark { - target("*.md") + target("**/*.md") propertiesFile("gradle.properties") } kotlin { - target("source/**/src/**/*.kt") - targetExclude("**/build/**/*.kt") - ktlint().editorConfigOverride( - mapOf("disabled_rules" to "filename,no-wildcard-imports", "insert_final_newline" to false) - ) + ktlint() } kotlinGradle { - target("**/*.gradle.kts") - ktlint().editorConfigOverride(mapOf("insert_final_newline" to false)) + ktlint() } } @@ -35,4 +25,4 @@ tasks { !isStable(candidate.version) && isStable(currentVersion) } } -} \ No newline at end of file +} diff --git a/kase64/src/commonTest/kotlin/saschpe/kase64/Base64InternalTest.kt b/kase64/src/commonTest/kotlin/saschpe/kase64/Base64InternalTest.kt index 7ba0acb3c489c6e42559cee681857aa4234e4bec..600725f5e15915dde44c21e90ee4b927b1beaaed 100644 GIT binary patch delta 28 acmbQwv4CR(4~vKnmjV=Mf?2g(wOjyE=mi@9 delta 27 ZcmZ3$F`r`t4~sCD0u*S1S+!iXTmVc$1nvL; diff --git a/kase64/src/commonTest/kotlin/saschpe/kase64/Base64Test.kt b/kase64/src/commonTest/kotlin/saschpe/kase64/Base64Test.kt index c040f55..05cd202 100644 --- a/kase64/src/commonTest/kotlin/saschpe/kase64/Base64Test.kt +++ b/kase64/src/commonTest/kotlin/saschpe/kase64/Base64Test.kt @@ -27,9 +27,9 @@ class Base64Test { byteArrayOf( -94, 124, -26, -112, -72, -84, 16, 11, 67, -45, 107, 38, -99, 79, 62, -49, 83, 26, -85, -70, -122, 53, 67, 42, -94, -87, 61, -74, 66, 0, 80, -125, -17, -11, -125, 63, 109, -15, 56, -95, -33, 18, 110, 47, - 47, -20, -72, -34, 53, -69, 49, -45, 54, 53, -21, 43, 9, -84, -125, 72, -61, 76, 31, -46 + 47, -20, -72, -34, 53, -69, 49, -45, 54, 53, -21, 43, 9, -84, -125, 72, -61, 76, 31, -46, ), - "onzmkLisEAtD02smnU8+z1Maq7qGNUMqoqk9tkIAUIPv9YM/bfE4od8Sbi8v7LjeNbsx0zY16ysJrINIw0wf0g==".base64DecodedBytes + "onzmkLisEAtD02smnU8+z1Maq7qGNUMqoqk9tkIAUIPv9YM/bfE4od8Sbi8v7LjeNbsx0zY16ysJrINIw0wf0g==".base64DecodedBytes, ) } @@ -37,15 +37,15 @@ class Base64Test { fun byteArray_base64Encoded() { assertEquals( "xvrp9DBWlei2mG0ov9MN+A==", // value1 - byteArrayOf(-58, -6, -23, -12, 48, 86, -107, -24, -74, -104, 109, 40, -65, -45, 13, -8).base64Encoded + byteArrayOf(-58, -6, -23, -12, 48, 86, -107, -24, -74, -104, 109, 40, -65, -45, 13, -8).base64Encoded, ) assertEquals( "IkYJxF8nIQD9RY7Yk6r26A==", // value222 - byteArrayOf(34, 70, 9, -60, 95, 39, 33, 0, -3, 69, -114, -40, -109, -86, -10, -24).base64Encoded + byteArrayOf(34, 70, 9, -60, 95, 39, 33, 0, -3, 69, -114, -40, -109, -86, -10, -24).base64Encoded, ) assertEquals( "U0GeVBi2dNcdL2IO0nJo5Q==", // value555 - byteArrayOf(83, 65, -98, 84, 24, -74, 116, -41, 29, 47, 98, 14, -46, 114, 104, -27).base64Encoded + byteArrayOf(83, 65, -98, 84, 24, -74, 116, -41, 29, 47, 98, 14, -46, 114, 104, -27).base64Encoded, ) } @@ -58,12 +58,12 @@ class Base64Test { assertEquals("Hello, world!", "SGVsbG8sIHdvcmxkIQ==".base64Decoded) assertEquals( Encoding.Standard.alphabet, - "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLw==".base64Decoded + "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLw==".base64Decoded, ) assertEquals("abcd", "YWJjZA==".base64Decoded) assertEquals( "1234567890-=!@#\$%^&*()_+qwertyuiop[];'\\,./?><|\":}{P`~", - "MTIzNDU2Nzg5MC09IUAjJCVeJiooKV8rcXdlcnR5dWlvcFtdOydcLC4vPz48fCI6fXtQYH4=".base64Decoded + "MTIzNDU2Nzg5MC09IUAjJCVeJiooKV8rcXdlcnR5dWlvcFtdOydcLC4vPz48fCI6fXtQYH4=".base64Decoded, ) assertEquals("saschpe", "c2FzY2hwZQ==".base64Decoded) } @@ -78,12 +78,12 @@ class Base64Test { assertEquals("SGVsbG8sIHdvcmxkIQ==", "Hello, world!".encodeToByteArray().base64Encoded) assertEquals( "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLw==", - Encoding.Standard.alphabet.base64Encoded + Encoding.Standard.alphabet.base64Encoded, ) assertEquals("YWJjZA==", "abcd".base64Encoded) assertEquals( "MTIzNDU2Nzg5MC09IUAjJCVeJiooKV8rcXdlcnR5dWlvcFtdOydcLC4vPz48fCI6fXtQYH4=", - "1234567890-=!@#\$%^&*()_+qwertyuiop[];'\\,./?><|\":}{P`~".base64Encoded + "1234567890-=!@#\$%^&*()_+qwertyuiop[];'\\,./?><|\":}{P`~".base64Encoded, ) assertEquals("c2FzY2hwZQ==", "saschpe".base64Encoded) } diff --git a/kase64/src/commonTest/kotlin/saschpe/kase64/Base64UrlTest.kt b/kase64/src/commonTest/kotlin/saschpe/kase64/Base64UrlTest.kt index 8bc6c74..50634ec 100644 --- a/kase64/src/commonTest/kotlin/saschpe/kase64/Base64UrlTest.kt +++ b/kase64/src/commonTest/kotlin/saschpe/kase64/Base64UrlTest.kt @@ -27,9 +27,9 @@ class Base64UrlTest { byteArrayOf( -94, 124, -26, -112, -72, -84, 16, 11, 67, -45, 107, 38, -99, 79, 62, -49, 83, 26, -85, -70, -122, 53, 67, 42, -94, -87, 61, -74, 66, 0, 80, -125, -17, -11, -125, 63, 109, -15, 56, -95, -33, 18, 110, 47, - 47, -20, -72, -34, 53, -69, 49, -45, 54, 53, -21, 43, 9, -84, -125, 72, -61, 76, 31, -46 + 47, -20, -72, -34, 53, -69, 49, -45, 54, 53, -21, 43, 9, -84, -125, 72, -61, 76, 31, -46, ), - "onzmkLisEAtD02smnU8-z1Maq7qGNUMqoqk9tkIAUIPv9YM_bfE4od8Sbi8v7LjeNbsx0zY16ysJrINIw0wf0g==".base64UrlDecodedBytes + "onzmkLisEAtD02smnU8-z1Maq7qGNUMqoqk9tkIAUIPv9YM_bfE4od8Sbi8v7LjeNbsx0zY16ysJrINIw0wf0g==".base64UrlDecodedBytes, ) } @@ -37,15 +37,15 @@ class Base64UrlTest { fun byteArray_base64UrlEncoded() { assertEquals( "xvrp9DBWlei2mG0ov9MN-A", // value1 - byteArrayOf(-58, -6, -23, -12, 48, 86, -107, -24, -74, -104, 109, 40, -65, -45, 13, -8).base64UrlEncoded + byteArrayOf(-58, -6, -23, -12, 48, 86, -107, -24, -74, -104, 109, 40, -65, -45, 13, -8).base64UrlEncoded, ) assertEquals( "IkYJxF8nIQD9RY7Yk6r26A", // value222 - byteArrayOf(34, 70, 9, -60, 95, 39, 33, 0, -3, 69, -114, -40, -109, -86, -10, -24).base64UrlEncoded + byteArrayOf(34, 70, 9, -60, 95, 39, 33, 0, -3, 69, -114, -40, -109, -86, -10, -24).base64UrlEncoded, ) assertEquals( "U0GeVBi2dNcdL2IO0nJo5Q", // value555 - byteArrayOf(83, 65, -98, 84, 24, -74, 116, -41, 29, 47, 98, 14, -46, 114, 104, -27).base64UrlEncoded + byteArrayOf(83, 65, -98, 84, 24, -74, 116, -41, 29, 47, 98, 14, -46, 114, 104, -27).base64UrlEncoded, ) } @@ -59,14 +59,14 @@ class Base64UrlTest { assertEquals("Hello, world!", "SGVsbG8sIHdvcmxkIQ==".base64UrlDecoded) assertEquals( Encoding.Standard.alphabet, - "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLw==".base64UrlDecoded + "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLw==".base64UrlDecoded, ) assertEquals("Salt", "U2FsdA==".base64UrlDecoded) assertEquals("Pepper", "UGVwcGVy".base64UrlDecoded) assertEquals("abcd", "YWJjZA".base64UrlDecoded) assertEquals( "1234567890-=!@#\$%^&*()_+qwertyuiop[];'\\,./?><|\":}{P`~", - "MTIzNDU2Nzg5MC09IUAjJCVeJiooKV8rcXdlcnR5dWlvcFtdOydcLC4vPz48fCI6fXtQYH4".base64UrlDecoded + "MTIzNDU2Nzg5MC09IUAjJCVeJiooKV8rcXdlcnR5dWlvcFtdOydcLC4vPz48fCI6fXtQYH4".base64UrlDecoded, ) assertEquals("saschpe", "c2FzY2hwZQ".base64UrlDecoded) } @@ -81,14 +81,14 @@ class Base64UrlTest { assertEquals("SGVsbG8sIHdvcmxkIQ", "Hello, world!".encodeToByteArray().base64UrlEncoded) assertEquals( "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLw", - Encoding.Standard.alphabet.base64UrlEncoded + Encoding.Standard.alphabet.base64UrlEncoded, ) assertEquals("U2FsdA", "Salt".base64UrlEncoded) assertEquals("UGVwcGVy", "Pepper".base64UrlEncoded) assertEquals("YWJjZA", "abcd".base64UrlEncoded) assertEquals( "MTIzNDU2Nzg5MC09IUAjJCVeJiooKV8rcXdlcnR5dWlvcFtdOydcLC4vPz48fCI6fXtQYH4", - "1234567890-=!@#\$%^&*()_+qwertyuiop[];'\\,./?><|\":}{P`~".base64UrlEncoded + "1234567890-=!@#\$%^&*()_+qwertyuiop[];'\\,./?><|\":}{P`~".base64UrlEncoded, ) assertEquals("c2FzY2hwZQ", "saschpe".base64UrlEncoded) } diff --git a/settings.gradle.kts b/settings.gradle.kts index 21f8673..aef08a6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,4 +15,4 @@ dependencyResolutionManagement { rootProject.name = "Kase64" -include(":kase64") \ No newline at end of file +include(":kase64") From e680d6f270776de2699d009560df5992d4537ef4 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 5 Sep 2023 13:51:24 +0200 Subject: [PATCH 3/3] Gradle: Update versions plugin to 0.47.0 See https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.47.0 --- build.gradle.kts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ba4bcbd..d95be10 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,7 @@ plugins { kotlin("jvm") version "1.9.10" id("com.android.library") version "7.2.2" apply false id("com.diffplug.spotless") version "6.21.0" - id("com.github.ben-manes.versions") version "0.42.0" + id("com.github.ben-manes.versions") version "0.47.0" } spotless { @@ -17,12 +17,3 @@ spotless { ktlint() } } - -tasks { - withType { - rejectVersionIf { - fun isStable(version: String) = Regex("^[0-9,.v-]+(-r)?$").matches(version) - !isStable(candidate.version) && isStable(currentVersion) - } - } -}