Skip to content

Migrate exceptions from module :core to KotlinCrypto/error #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![badge-latest-release]][url-latest-release]

[![badge-kotlin]][url-kotlin]
[![badge-error]][url-error]

![badge-platform-android]
![badge-platform-jvm]
Expand Down Expand Up @@ -80,6 +81,7 @@ dependencies {

<!-- TAG_DEPENDENCIES -->
[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.24-blue.svg?logo=kotlin
[badge-error]: https://img.shields.io/badge/kotlincrypto.error-0.1.0-blue.svg

<!-- TAG_PLATFORMS -->
[badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat
Expand All @@ -102,5 +104,6 @@ dependencies {
[url-latest-release]: https://github.com/KotlinCrypto/core/releases/latest
[url-license]: https://www.apache.org/licenses/LICENSE-2.0.txt
[url-kotlin]: https://kotlinlang.org
[url-error]: https://github.com/KotlinCrypto/error
[url-version-catalog]: https://github.com/KotlinCrypto/version-catalog
[url-docs]: https://core.kotlincrypto.org
4 changes: 4 additions & 0 deletions build-logic/src/main/kotlin/dokka.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ tasks.withType<DokkaTaskPartial>().configureEach {
includes.from("README.md")
noStdlibLink = true

externalDocumentationLink {
url = URI("https://error.kotlincrypto.org/").toURL()
}

sourceLink {
localDirectory = rootDir
remoteUrl = URI("https://github.com/KotlinCrypto/core/tree/master").toURL()
Expand Down
4 changes: 4 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ gradle-kmp-configuration = "0.3.2"
gradle-kotlin = "1.9.24"
gradle-publish-maven = "0.29.0"

kotlincrypto-error = "0.1.0"

[libraries]
gradle-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradle-dokka" }
gradle-kmp-configuration = { module = "io.matthewnelson:gradle-kmp-configuration-plugin", version.ref = "gradle-kmp-configuration" }
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "gradle-kotlin" }
gradle-publish-maven = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradle-publish-maven" }

kotlincrypto-error = { module = "org.kotlincrypto.error:error", version.ref = "kotlincrypto-error" }

# tests & tools
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" }
benchmark-runtime = { module = "org.jetbrains.kotlinx:kotlinx-benchmark-runtime", version.ref = "gradle-benchmark" }
Expand Down
62 changes: 0 additions & 62 deletions library/core/api/core.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -31,65 +31,3 @@ abstract interface org.kotlincrypto.core/Updatable { // org.kotlincrypto.core/Up
abstract fun update(kotlin/ByteArray) // org.kotlincrypto.core/Updatable.update|update(kotlin.ByteArray){}[0]
abstract fun update(kotlin/ByteArray, kotlin/Int, kotlin/Int) // org.kotlincrypto.core/Updatable.update|update(kotlin.ByteArray;kotlin.Int;kotlin.Int){}[0]
}

open class org.kotlincrypto.core/BadPaddingException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/BadPaddingException|null[0]
constructor <init>() // org.kotlincrypto.core/BadPaddingException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/BadPaddingException.<init>|<init>(kotlin.String?){}[0]
}

open class org.kotlincrypto.core/CertificateEncodingException : org.kotlincrypto.core/CertificateException { // org.kotlincrypto.core/CertificateEncodingException|null[0]
constructor <init>() // org.kotlincrypto.core/CertificateEncodingException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/CertificateEncodingException.<init>|<init>(kotlin.String?){}[0]
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/CertificateEncodingException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/CertificateEncodingException.<init>|<init>(kotlin.Throwable?){}[0]
}

open class org.kotlincrypto.core/CertificateException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/CertificateException|null[0]
constructor <init>() // org.kotlincrypto.core/CertificateException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/CertificateException.<init>|<init>(kotlin.String?){}[0]
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/CertificateException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/CertificateException.<init>|<init>(kotlin.Throwable?){}[0]
}

open class org.kotlincrypto.core/CertificateParsingException : org.kotlincrypto.core/CertificateException { // org.kotlincrypto.core/CertificateParsingException|null[0]
constructor <init>() // org.kotlincrypto.core/CertificateParsingException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/CertificateParsingException.<init>|<init>(kotlin.String?){}[0]
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/CertificateParsingException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/CertificateParsingException.<init>|<init>(kotlin.Throwable?){}[0]
}

open class org.kotlincrypto.core/GeneralSecurityException : kotlin/Exception { // org.kotlincrypto.core/GeneralSecurityException|null[0]
constructor <init>() // org.kotlincrypto.core/GeneralSecurityException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/GeneralSecurityException.<init>|<init>(kotlin.String?){}[0]
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/GeneralSecurityException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/GeneralSecurityException.<init>|<init>(kotlin.Throwable?){}[0]
}

open class org.kotlincrypto.core/IllegalBlockSizeException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/IllegalBlockSizeException|null[0]
constructor <init>() // org.kotlincrypto.core/IllegalBlockSizeException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/IllegalBlockSizeException.<init>|<init>(kotlin.String?){}[0]
}

open class org.kotlincrypto.core/InvalidKeyException : org.kotlincrypto.core/KeyException { // org.kotlincrypto.core/InvalidKeyException|null[0]
constructor <init>() // org.kotlincrypto.core/InvalidKeyException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/InvalidKeyException.<init>|<init>(kotlin.String?){}[0]
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/InvalidKeyException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/InvalidKeyException.<init>|<init>(kotlin.Throwable?){}[0]
}

open class org.kotlincrypto.core/InvalidParameterException : kotlin/IllegalArgumentException { // org.kotlincrypto.core/InvalidParameterException|null[0]
constructor <init>() // org.kotlincrypto.core/InvalidParameterException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/InvalidParameterException.<init>|<init>(kotlin.String?){}[0]
}

open class org.kotlincrypto.core/KeyException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/KeyException|null[0]
constructor <init>() // org.kotlincrypto.core/KeyException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/KeyException.<init>|<init>(kotlin.String?){}[0]
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/KeyException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/KeyException.<init>|<init>(kotlin.Throwable?){}[0]
}

open class org.kotlincrypto.core/ShortBufferException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/ShortBufferException|null[0]
constructor <init>() // org.kotlincrypto.core/ShortBufferException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto.core/ShortBufferException.<init>|<init>(kotlin.String?){}[0]
}
10 changes: 9 additions & 1 deletion library/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,13 @@ plugins {
}

kmpConfiguration {
configureShared(java9ModuleName = "org.kotlincrypto.core", publish = true) {}
configureShared(java9ModuleName = "org.kotlincrypto.core", publish = true) {
common {
sourceSetMain {
dependencies {
api(libs.kotlincrypto.error)
}
}
}
}
}
116 changes: 0 additions & 116 deletions library/core/src/commonMain/kotlin/org/kotlincrypto/core/Exceptions.kt

This file was deleted.

1 change: 1 addition & 0 deletions library/core/src/jvmMain/java9/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module org.kotlincrypto.core {
requires transitive kotlin.stdlib;
requires transitive org.kotlincrypto.error;

exports org.kotlincrypto.core;
}

This file was deleted.

Loading
Loading