From 823e2ae249d772253723dc7992308c5ea0757987 Mon Sep 17 00:00:00 2001 From: Matthew Nelson Date: Mon, 26 Jun 2023 07:43:19 -0400 Subject: [PATCH] Remove sha2-256 and sha2-512 modules --- library/sha2/sha2-256/.gitignore | 1 - library/sha2/sha2-256/README.md | 4 --- library/sha2/sha2-256/api/sha2-256.api | 0 library/sha2/sha2-256/build.gradle.kts | 31 ------------------ library/sha2/sha2-256/gradle.properties | 16 ---------- .../kotlin/org/kotlincrypto/hash/Sha256.kt | 32 ------------------- library/sha2/sha2-512/.gitignore | 1 - library/sha2/sha2-512/README.md | 4 --- library/sha2/sha2-512/api/sha2-512.api | 0 library/sha2/sha2-512/build.gradle.kts | 31 ------------------ library/sha2/sha2-512/gradle.properties | 16 ---------- .../kotlin/org/kotlincrypto/hash/Sha512.kt | 32 ------------------- settings.gradle.kts | 2 -- tools/check-publication/build.gradle.kts | 2 -- 14 files changed, 172 deletions(-) delete mode 100644 library/sha2/sha2-256/.gitignore delete mode 100644 library/sha2/sha2-256/README.md delete mode 100644 library/sha2/sha2-256/api/sha2-256.api delete mode 100644 library/sha2/sha2-256/build.gradle.kts delete mode 100644 library/sha2/sha2-256/gradle.properties delete mode 100644 library/sha2/sha2-256/src/commonMain/kotlin/org/kotlincrypto/hash/Sha256.kt delete mode 100644 library/sha2/sha2-512/.gitignore delete mode 100644 library/sha2/sha2-512/README.md delete mode 100644 library/sha2/sha2-512/api/sha2-512.api delete mode 100644 library/sha2/sha2-512/build.gradle.kts delete mode 100644 library/sha2/sha2-512/gradle.properties delete mode 100644 library/sha2/sha2-512/src/commonMain/kotlin/org/kotlincrypto/hash/Sha512.kt diff --git a/library/sha2/sha2-256/.gitignore b/library/sha2/sha2-256/.gitignore deleted file mode 100644 index 567609b..0000000 --- a/library/sha2/sha2-256/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build/ diff --git a/library/sha2/sha2-256/README.md b/library/sha2/sha2-256/README.md deleted file mode 100644 index 62fc8fe..0000000 --- a/library/sha2/sha2-256/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# sha2-256 - -Old module contents were combined into `sha2`. This publication is solely to mitigate breaking -others' projects and inform them they should update their dependency. diff --git a/library/sha2/sha2-256/api/sha2-256.api b/library/sha2/sha2-256/api/sha2-256.api deleted file mode 100644 index e69de29..0000000 diff --git a/library/sha2/sha2-256/build.gradle.kts b/library/sha2/sha2-256/build.gradle.kts deleted file mode 100644 index 938905a..0000000 --- a/library/sha2/sha2-256/build.gradle.kts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2023 Matthew Nelson - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -plugins { - id("configuration") - id("bom-include") -} - -kmpConfiguration { - configureShared(publish = true) { - common { - sourceSetMain { - dependencies { - api(project(":library:sha2")) - } - } - } - } -} diff --git a/library/sha2/sha2-256/gradle.properties b/library/sha2/sha2-256/gradle.properties deleted file mode 100644 index 2b1ae35..0000000 --- a/library/sha2/sha2-256/gradle.properties +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2023 Matthew Nelson -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -POM_ARTIFACT_ID=sha2-256 -POM_NAME=KotlinCrypto SHA-256 -POM_DESCRIPTION=SHA-256 hashing diff --git a/library/sha2/sha2-256/src/commonMain/kotlin/org/kotlincrypto/hash/Sha256.kt b/library/sha2/sha2-256/src/commonMain/kotlin/org/kotlincrypto/hash/Sha256.kt deleted file mode 100644 index 2ae9e9f..0000000 --- a/library/sha2/sha2-256/src/commonMain/kotlin/org/kotlincrypto/hash/Sha256.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2023 Matthew Nelson - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -package org.kotlincrypto.hash - -import org.kotlincrypto.hash.sha2.SHA256 - -@Deprecated( - message = """ - Sha256 was renamed to SHA256 and moved to the sha2 module - - Step 1: Use ReplaceWith feature to update name to SHA256 - Step 2: Replace dependency on `sha2-256` with `sha2` - """, - replaceWith = ReplaceWith( - expression = "SHA256", - imports = [ "org.kotlincrypto.hash.sha2.SHA256" ] - ) -) -public typealias Sha256 = SHA256 diff --git a/library/sha2/sha2-512/.gitignore b/library/sha2/sha2-512/.gitignore deleted file mode 100644 index 567609b..0000000 --- a/library/sha2/sha2-512/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build/ diff --git a/library/sha2/sha2-512/README.md b/library/sha2/sha2-512/README.md deleted file mode 100644 index f0757fb..0000000 --- a/library/sha2/sha2-512/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# sha2-512 - -Old module contents were combined into `sha2`. This publication is solely to mitigate breaking -others' projects and inform them they should update their dependency. diff --git a/library/sha2/sha2-512/api/sha2-512.api b/library/sha2/sha2-512/api/sha2-512.api deleted file mode 100644 index e69de29..0000000 diff --git a/library/sha2/sha2-512/build.gradle.kts b/library/sha2/sha2-512/build.gradle.kts deleted file mode 100644 index 938905a..0000000 --- a/library/sha2/sha2-512/build.gradle.kts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2023 Matthew Nelson - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -plugins { - id("configuration") - id("bom-include") -} - -kmpConfiguration { - configureShared(publish = true) { - common { - sourceSetMain { - dependencies { - api(project(":library:sha2")) - } - } - } - } -} diff --git a/library/sha2/sha2-512/gradle.properties b/library/sha2/sha2-512/gradle.properties deleted file mode 100644 index cb63665..0000000 --- a/library/sha2/sha2-512/gradle.properties +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2023 Matthew Nelson -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -POM_ARTIFACT_ID=sha2-512 -POM_NAME=KotlinCrypto SHA-512 -POM_DESCRIPTION=SHA-512 hashing diff --git a/library/sha2/sha2-512/src/commonMain/kotlin/org/kotlincrypto/hash/Sha512.kt b/library/sha2/sha2-512/src/commonMain/kotlin/org/kotlincrypto/hash/Sha512.kt deleted file mode 100644 index 93017ed..0000000 --- a/library/sha2/sha2-512/src/commonMain/kotlin/org/kotlincrypto/hash/Sha512.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2023 Matthew Nelson - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ -package org.kotlincrypto.hash - -import org.kotlincrypto.hash.sha2.SHA512 - -@Deprecated( - message = """ - Sha512 was renamed to SHA512 and moved to the sha2 module. - - Step 1: Use ReplaceWith feature to update name to SHA512 - Step 2: Replace dependency on `sha2-512` with `sha2` - """, - replaceWith = ReplaceWith( - expression = "SHA512", - imports = [ "org.kotlincrypto.hash.sha2.SHA512" ] - ) -) -public typealias Sha512 = SHA512 diff --git a/settings.gradle.kts b/settings.gradle.kts index 95d4ee1..e2ce551 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -21,8 +21,6 @@ if (CHECK_PUBLICATION != null) { "md5", "sha1", "sha2", - "sha2:sha2-256", - "sha2:sha2-512", "sha3", ).forEach { name -> include(":library:$name") diff --git a/tools/check-publication/build.gradle.kts b/tools/check-publication/build.gradle.kts index 5f06e00..fd95717 100644 --- a/tools/check-publication/build.gradle.kts +++ b/tools/check-publication/build.gradle.kts @@ -44,8 +44,6 @@ kmpConfiguration { implementation("$group:md5") implementation("$group:sha1") implementation("$group:sha2") - implementation("$group:sha2-256") - implementation("$group:sha2-512") implementation("$group:sha3") } }