diff --git a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt index e59deb7..3f98f51 100644 --- a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt +++ b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt @@ -17,6 +17,7 @@ import io.matthewnelson.kmp.configuration.extension.KmpConfigurationExtension import io.matthewnelson.kmp.configuration.extension.container.target.KmpConfigurationContainerDsl import org.gradle.api.Action import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion fun KmpConfigurationExtension.configureShared( java9ModuleName: String? = null, @@ -73,6 +74,15 @@ fun KmpConfigurationExtension.configureShared( if (publish) kotlin { explicitApi() } + if (publish) kotlin { + @Suppress("DEPRECATION") + compilerOptions { + freeCompilerArgs.add("-Xsuppress-version-warnings") + apiVersion.set(KotlinVersion.KOTLIN_1_8) + languageVersion.set(KotlinVersion.KOTLIN_1_8) + } + } + action.execute(this) } } diff --git a/library/core/src/jvmMain/kotlin/org/kotlincrypto/core/-AndroidSdkInt.kt b/library/core/src/jvmMain/kotlin/org/kotlincrypto/core/-AndroidSdkInt.kt index 7f5a9fe..365229c 100644 --- a/library/core/src/jvmMain/kotlin/org/kotlincrypto/core/-AndroidSdkInt.kt +++ b/library/core/src/jvmMain/kotlin/org/kotlincrypto/core/-AndroidSdkInt.kt @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ +@file:Suppress("UNNECESSARY_SAFE_CALL") + package org.kotlincrypto.core @InternalKotlinCryptoApi diff --git a/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/Digest.kt b/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/Digest.kt index 77eb62c..c2adfcc 100644 --- a/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/Digest.kt +++ b/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/Digest.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING", "UNUSED") package org.kotlincrypto.core.digest diff --git a/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/internal/-Buffer.kt b/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/internal/-Buffer.kt index c0ad2c7..efd558b 100644 --- a/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/internal/-Buffer.kt +++ b/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/internal/-Buffer.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("KotlinRedundantDiagnosticSuppress", "NOTHING_TO_INLINE") +@file:Suppress("NOTHING_TO_INLINE") package org.kotlincrypto.core.digest.internal diff --git a/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/internal/-CommonPlatform.kt b/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/internal/-CommonPlatform.kt index 598fbf4..35ea117 100644 --- a/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/internal/-CommonPlatform.kt +++ b/library/digest/src/commonMain/kotlin/org/kotlincrypto/core/digest/internal/-CommonPlatform.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("KotlinRedundantDiagnosticSuppress", "NOTHING_TO_INLINE") +@file:Suppress("NOTHING_TO_INLINE") package org.kotlincrypto.core.digest.internal diff --git a/library/digest/src/jvmMain/kotlin/org/kotlincrypto/core/digest/Digest.kt b/library/digest/src/jvmMain/kotlin/org/kotlincrypto/core/digest/Digest.kt index 0d878b6..417983e 100644 --- a/library/digest/src/jvmMain/kotlin/org/kotlincrypto/core/digest/Digest.kt +++ b/library/digest/src/jvmMain/kotlin/org/kotlincrypto/core/digest/Digest.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING", "DeprecatedCallableAddReplaceWith") +@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") package org.kotlincrypto.core.digest diff --git a/library/digest/src/nonJvmMain/kotlin/org/kotlincrypto/core/digest/Digest.kt b/library/digest/src/nonJvmMain/kotlin/org/kotlincrypto/core/digest/Digest.kt index bd33f78..8eaac68 100644 --- a/library/digest/src/nonJvmMain/kotlin/org/kotlincrypto/core/digest/Digest.kt +++ b/library/digest/src/nonJvmMain/kotlin/org/kotlincrypto/core/digest/Digest.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING", "KotlinRedundantDiagnosticSuppress") +@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") package org.kotlincrypto.core.digest diff --git a/library/mac/src/commonMain/kotlin/org/kotlincrypto/core/mac/Mac.kt b/library/mac/src/commonMain/kotlin/org/kotlincrypto/core/mac/Mac.kt index 657ae1d..1c03650 100644 --- a/library/mac/src/commonMain/kotlin/org/kotlincrypto/core/mac/Mac.kt +++ b/library/mac/src/commonMain/kotlin/org/kotlincrypto/core/mac/Mac.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING", "UNUSED", "RedundantVisibilityModifier") package org.kotlincrypto.core.mac diff --git a/library/mac/src/commonMain/kotlin/org/kotlincrypto/core/mac/internal/-CommonPlatform.kt b/library/mac/src/commonMain/kotlin/org/kotlincrypto/core/mac/internal/-CommonPlatform.kt index 15c7dd0..390a7c7 100644 --- a/library/mac/src/commonMain/kotlin/org/kotlincrypto/core/mac/internal/-CommonPlatform.kt +++ b/library/mac/src/commonMain/kotlin/org/kotlincrypto/core/mac/internal/-CommonPlatform.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("KotlinRedundantDiagnosticSuppress", "NOTHING_TO_INLINE") +@file:Suppress("NOTHING_TO_INLINE") package org.kotlincrypto.core.mac.internal diff --git a/library/mac/src/jvmMain/kotlin/org/kotlincrypto/core/mac/Mac.kt b/library/mac/src/jvmMain/kotlin/org/kotlincrypto/core/mac/Mac.kt index 674f22a..92b6b3e 100644 --- a/library/mac/src/jvmMain/kotlin/org/kotlincrypto/core/mac/Mac.kt +++ b/library/mac/src/jvmMain/kotlin/org/kotlincrypto/core/mac/Mac.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING", "DeprecatedCallableAddReplaceWith") +@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING", "RedundantVisibilityModifier") package org.kotlincrypto.core.mac @@ -325,10 +325,11 @@ public actual abstract class Mac: javax.crypto.Mac, Algorithm, Copyable, Re public actual final override fun hashCode(): Int = 17 * 31 + code.hashCode() } - private data object EmptyKey: KeySpec, SecretKey { + private object EmptyKey: KeySpec, SecretKey { override fun getAlgorithm(): String = "org.kotlincrypto.core.mac.Mac.EmptyKey" override fun getEncoded(): ByteArray? = null override fun getFormat(): String = "RAW" + @Suppress("UNUSED") private fun readResolve(): Any = EmptyKey } diff --git a/library/mac/src/nonJvmMain/kotlin/org/kotlincrypto/core/mac/Mac.kt b/library/mac/src/nonJvmMain/kotlin/org/kotlincrypto/core/mac/Mac.kt index b4f59f8..60addef 100644 --- a/library/mac/src/nonJvmMain/kotlin/org/kotlincrypto/core/mac/Mac.kt +++ b/library/mac/src/nonJvmMain/kotlin/org/kotlincrypto/core/mac/Mac.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") +@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING", "RedundantVisibilityModifier") package org.kotlincrypto.core.mac diff --git a/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/Xof.kt b/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/Xof.kt index 5c30ada..4a9286c 100644 --- a/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/Xof.kt +++ b/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/Xof.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -@file:Suppress("KotlinRedundantDiagnosticSuppress", "NOTHING_TO_INLINE") +@file:Suppress("NOTHING_TO_INLINE") package org.kotlincrypto.core.xof @@ -66,7 +66,7 @@ public sealed class Xof( /** * Helper to provide access to the instance backing [Xof], if said instance - * can be re-keyed (such as a [org.kotlincrypto.core.mac.Mac]). + * can be re-keyed (such as a `org.kotlincrypto.core.mac.Mac`). * * @throws [InvalidKeyException] if [newKey] is unacceptable. * */ diff --git a/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/XofAlgorithm.kt b/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/XofAlgorithm.kt index 9ea50dd..904a209 100644 --- a/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/XofAlgorithm.kt +++ b/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/XofAlgorithm.kt @@ -26,7 +26,7 @@ public interface XofAlgorithm: Algorithm /** * Extended functionality, specifically for a [Xof] who's backing instance - * is a [org.kotlincrypto.core.mac.Mac]. + * is a `org.kotlincrypto.core.mac.Mac`. * * * @see [Xof.Companion.reset] diff --git a/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/XofFactory.kt b/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/XofFactory.kt index 5a40fdc..3483f77 100644 --- a/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/XofFactory.kt +++ b/library/xof/src/commonMain/kotlin/org/kotlincrypto/core/xof/XofFactory.kt @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ +@file:Suppress("RedundantVisibilityModifier") + package org.kotlincrypto.core.xof import org.kotlincrypto.core.*