diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c4d3cfe..999cb5f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,6 @@ jobs: fail-fast: false matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] - job: [ test ] runs-on: ${{ matrix.os }} @@ -50,17 +49,17 @@ jobs: java-version: 11 - name: Run macOS Tests - if: matrix.os == 'macos-latest' && matrix.job == 'test' + if: matrix.os == 'macos-latest' run: > ./gradlew check --stacktrace - -PKMP_TARGETS="JVM,JS,IOS_ARM32,IOS_ARM64,IOS_X64,IOS_SIMULATOR_ARM64,MACOS_ARM64,MACOS_X64,TVOS_ARM64,TVOS_X64,TVOS_SIMULATOR_ARM64,WATCHOS_ARM32,WATCHOS_ARM64,WATCHOS_DEVICE_ARM64,WATCHOS_X64,WATCHOS_X86,WATCHOS_SIMULATOR_ARM64,WASM,WASM_32" + -PKMP_TARGETS="JVM,JS,IOS_ARM64,IOS_X64,IOS_SIMULATOR_ARM64,MACOS_ARM64,MACOS_X64,TVOS_ARM64,TVOS_X64,TVOS_SIMULATOR_ARM64,WATCHOS_ARM32,WATCHOS_ARM64,WATCHOS_DEVICE_ARM64,WATCHOS_X64,WATCHOS_SIMULATOR_ARM64,WASM_JS,WASM_WASI" - name: Run Linux Tests - if: matrix.os == 'ubuntu-latest' && matrix.job == 'test' + if: matrix.os == 'ubuntu-latest' run: > ./gradlew check --stacktrace - -PKMP_TARGETS="JVM,JS,ANDROID,ANDROID_ARM32,ANDROID_ARM64,ANDROID_X64,ANDROID_X86,LINUX_ARM32HFP,LINUX_ARM64,LINUX_MIPS32,LINUX_MIPSEL32,LINUX_X64,WASM,WASM_32" + -PKMP_TARGETS="JVM,JS,ANDROID,ANDROID_ARM32,ANDROID_ARM64,ANDROID_X64,ANDROID_X86,LINUX_ARM64,LINUX_X64,WASM_JS,WASM_WASI" - name: Run Windows Tests - if: matrix.os == 'windows-latest' && matrix.job == 'test' + if: matrix.os == 'windows-latest' run: > ./gradlew check --stacktrace - -PKMP_TARGETS="JVM,JS,MINGW_X64,MINGW_X86,WASM,WASM_32" + -PKMP_TARGETS="JVM,JS,MINGW_X64,WASM_JS,WASM_WASI" diff --git a/.kotlin-js-store/yarn.lock b/.kotlin-js-store/yarn.lock index ff32adc..510dcd5 100644 --- a/.kotlin-js-store/yarn.lock +++ b/.kotlin-js-store/yarn.lock @@ -2,11 +2,6 @@ # yarn lockfile v1 -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -185,7 +180,7 @@ flat@^5.0.2: resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -format-util@1.0.5: +format-util@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== @@ -322,12 +317,11 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -mocha@10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" - integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== +mocha@10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== dependencies: - "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" chokidar "3.5.3" @@ -492,6 +486,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +typescript@5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== + workerpool@6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" diff --git a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt index ddb5eb2..5c63108 100644 --- a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt +++ b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt @@ -33,8 +33,8 @@ fun KmpConfigurationExtension.configureShared( } js() -// wasm() - wasmNativeAll() +// wasmJs {} +// wasmWasi {} androidNativeAll() @@ -47,9 +47,7 @@ fun KmpConfigurationExtension.configureShared( mingwAll() common { - if (publish) { - pluginIds("publication") - } + if (publish) { pluginIds("publication") } sourceSetTest { dependencies { @@ -58,11 +56,7 @@ fun KmpConfigurationExtension.configureShared( } } - if (explicitApi) { - kotlin { - explicitApi() - } - } + if (explicitApi) { kotlin { explicitApi() } } action.execute(this) } diff --git a/build-logic/src/main/kotlin/configuration.gradle.kts b/build-logic/src/main/kotlin/configuration.gradle.kts index 4064a86..7751807 100644 --- a/build-logic/src/main/kotlin/configuration.gradle.kts +++ b/build-logic/src/main/kotlin/configuration.gradle.kts @@ -17,16 +17,19 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED +import org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR +import org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_OUT import org.gradle.api.tasks.testing.logging.TestLogEvent.STARTED plugins { id("io.matthewnelson.kmp.configuration") } -tasks.withType { +tasks.withType { testLogging { exceptionFormat = TestExceptionFormat.FULL - events(STARTED, PASSED, SKIPPED, FAILED) + events(STARTED, PASSED, SKIPPED, FAILED, STANDARD_ERROR, STANDARD_OUT) showStandardStreams = true + showStackTraces = true } -} +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/publication.gradle.kts b/build-logic/src/main/kotlin/publication.gradle.kts index bebbda4..aa5916b 100644 --- a/build-logic/src/main/kotlin/publication.gradle.kts +++ b/build-logic/src/main/kotlin/publication.gradle.kts @@ -24,3 +24,8 @@ if (!version.toString().endsWith("-SNAPSHOT")) { useGpgCmd() } } + +tasks.withType().configureEach { + isPreserveFileTimestamps = false + isReproducibleFileOrder = true +} diff --git a/build.gradle.kts b/build.gradle.kts index 8838402..cfa6987 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,6 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension -@Suppress("DSL_SCOPE_VIOLATION") plugins { alias(libs.plugins.multiplatform) apply(false) alias(libs.plugins.binaryCompat) @@ -50,7 +49,7 @@ apiValidation { } fun isNonStable(version: String): Boolean { - val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) } + val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) } val regex = "^[0-9,.v-]+(-r)?$".toRegex() val isStable = stableKeyword || regex.matches(version) return isStable.not() @@ -70,11 +69,12 @@ tasks.withType { // Example 3: using the full syntax resolutionStrategy { componentSelection { - all { + @Suppress("RedundantSamConstructor") + all(Action { if (isNonStable(candidate.version) && !isNonStable(currentVersion)) { reject("Release candidate") } - } + }) } } } diff --git a/gradle.properties b/gradle.properties index e7aa929..a3b26ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,10 +3,8 @@ org.gradle.parallel=true org.gradle.caching=true kotlin.code.style=official -kotlin.js.compiler=both -kotlin.mpp.enableCompatibilityMetadataVariant=true +kotlin.mpp.applyDefaultHierarchyTemplate=false kotlin.mpp.stability.nowarn=true -kotlin.native.binary.memoryModel=experimental kotlin.native.ignoreDisabledTargets=true SONATYPE_HOST=S01 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e89d836..7c644d8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,11 @@ [versions] -binaryCompat = "0.13.0" -configuration = "0.1.0-beta02" -encoding = "1.2.1" +binaryCompat = "0.13.2" +configuration = "0.1.5" +encoding = "2.0.0" endians = "0.1.0" -gradleVersions = "0.46.0" -kotlin = "1.8.10" -publish = "0.24.0" +gradleVersions = "0.50.0" +kotlin = "1.9.20" +publish = "0.25.3" [libraries] gradle-kmp-configuration = { module = "io.matthewnelson:gradle-kmp-configuration-plugin", version.ref = "configuration" } @@ -13,7 +13,7 @@ gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version. gradle-maven-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "publish" } # Tests -encoding-base16 = { module = "io.matthewnelson.kotlin-components:encoding-base16", version.ref = "encoding" } +encoding-base16 = { module = "io.matthewnelson.encoding:base16", version.ref = "encoding" } endians-endians = { module = "org.kotlincrypto.endians:endians", version.ref = "endians" } [plugins] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bca0f67..a2b81f7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -4,5 +4,5 @@ zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME # https://gradle.org/release-checksums/ -distributionSha256Sum=948d1e4ccc2f6ae36cbfa087d827aaca51403acae5411e664a6000bb47946f22 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip +distributionSha256Sum=f2b9ed0faf8472cbe469255ae6c86eddb77076c75191741b4a462f33128dd419 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip diff --git a/library/keccak/src/commonTest/kotlin/org/kotlincrypto/sponges/keccak/KeccakPUnitTest.kt b/library/keccak/src/commonTest/kotlin/org/kotlincrypto/sponges/keccak/KeccakPUnitTest.kt index e61d8aa..98d83a0 100644 --- a/library/keccak/src/commonTest/kotlin/org/kotlincrypto/sponges/keccak/KeccakPUnitTest.kt +++ b/library/keccak/src/commonTest/kotlin/org/kotlincrypto/sponges/keccak/KeccakPUnitTest.kt @@ -15,7 +15,7 @@ **/ package org.kotlincrypto.sponges.keccak -import io.matthewnelson.encoding.builders.Base16 +import io.matthewnelson.encoding.base16.Base16 import io.matthewnelson.encoding.core.Decoder.Companion.decodeToByteArray import org.kotlincrypto.endians.BigEndian import kotlin.test.Test