Skip to content

Commit a0ea61b

Browse files
authored
Migrate exceptions from module :core to KotlinCrypto/error (#118)
1 parent e179f56 commit a0ea61b

File tree

19 files changed

+32
-330
lines changed

19 files changed

+32
-330
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![badge-latest-release]][url-latest-release]
44

55
[![badge-kotlin]][url-kotlin]
6+
[![badge-error]][url-error]
67

78
![badge-platform-android]
89
![badge-platform-jvm]
@@ -80,6 +81,7 @@ dependencies {
8081

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

8486
<!-- TAG_PLATFORMS -->
8587
[badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat
@@ -102,5 +104,6 @@ dependencies {
102104
[url-latest-release]: https://github.com/KotlinCrypto/core/releases/latest
103105
[url-license]: https://www.apache.org/licenses/LICENSE-2.0.txt
104106
[url-kotlin]: https://kotlinlang.org
107+
[url-error]: https://github.com/KotlinCrypto/error
105108
[url-version-catalog]: https://github.com/KotlinCrypto/version-catalog
106109
[url-docs]: https://core.kotlincrypto.org

build-logic/src/main/kotlin/dokka.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ tasks.withType<DokkaTaskPartial>().configureEach {
2828
includes.from("README.md")
2929
noStdlibLink = true
3030

31+
externalDocumentationLink {
32+
url = URI("https://error.kotlincrypto.org/").toURL()
33+
}
34+
3135
sourceLink {
3236
localDirectory = rootDir
3337
remoteUrl = URI("https://github.com/KotlinCrypto/core/tree/master").toURL()

gradle/libs.versions.toml

+4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ gradle-kmp-configuration = "0.3.2"
99
gradle-kotlin = "1.9.24"
1010
gradle-publish-maven = "0.29.0"
1111

12+
kotlincrypto-error = "0.1.0"
13+
1214
[libraries]
1315
gradle-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradle-dokka" }
1416
gradle-kmp-configuration = { module = "io.matthewnelson:gradle-kmp-configuration-plugin", version.ref = "gradle-kmp-configuration" }
1517
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "gradle-kotlin" }
1618
gradle-publish-maven = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradle-publish-maven" }
1719

20+
kotlincrypto-error = { module = "org.kotlincrypto.error:error", version.ref = "kotlincrypto-error" }
21+
1822
# tests & tools
1923
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" }
2024
benchmark-runtime = { module = "org.jetbrains.kotlinx:kotlinx-benchmark-runtime", version.ref = "gradle-benchmark" }

library/core/api/core.klib.api

-62
Original file line numberDiff line numberDiff line change
@@ -31,65 +31,3 @@ abstract interface org.kotlincrypto.core/Updatable { // org.kotlincrypto.core/Up
3131
abstract fun update(kotlin/ByteArray) // org.kotlincrypto.core/Updatable.update|update(kotlin.ByteArray){}[0]
3232
abstract fun update(kotlin/ByteArray, kotlin/Int, kotlin/Int) // org.kotlincrypto.core/Updatable.update|update(kotlin.ByteArray;kotlin.Int;kotlin.Int){}[0]
3333
}
34-
35-
open class org.kotlincrypto.core/BadPaddingException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/BadPaddingException|null[0]
36-
constructor <init>() // org.kotlincrypto.core/BadPaddingException.<init>|<init>(){}[0]
37-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/BadPaddingException.<init>|<init>(kotlin.String?){}[0]
38-
}
39-
40-
open class org.kotlincrypto.core/CertificateEncodingException : org.kotlincrypto.core/CertificateException { // org.kotlincrypto.core/CertificateEncodingException|null[0]
41-
constructor <init>() // org.kotlincrypto.core/CertificateEncodingException.<init>|<init>(){}[0]
42-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/CertificateEncodingException.<init>|<init>(kotlin.String?){}[0]
43-
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/CertificateEncodingException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
44-
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/CertificateEncodingException.<init>|<init>(kotlin.Throwable?){}[0]
45-
}
46-
47-
open class org.kotlincrypto.core/CertificateException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/CertificateException|null[0]
48-
constructor <init>() // org.kotlincrypto.core/CertificateException.<init>|<init>(){}[0]
49-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/CertificateException.<init>|<init>(kotlin.String?){}[0]
50-
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/CertificateException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
51-
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/CertificateException.<init>|<init>(kotlin.Throwable?){}[0]
52-
}
53-
54-
open class org.kotlincrypto.core/CertificateParsingException : org.kotlincrypto.core/CertificateException { // org.kotlincrypto.core/CertificateParsingException|null[0]
55-
constructor <init>() // org.kotlincrypto.core/CertificateParsingException.<init>|<init>(){}[0]
56-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/CertificateParsingException.<init>|<init>(kotlin.String?){}[0]
57-
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/CertificateParsingException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
58-
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/CertificateParsingException.<init>|<init>(kotlin.Throwable?){}[0]
59-
}
60-
61-
open class org.kotlincrypto.core/GeneralSecurityException : kotlin/Exception { // org.kotlincrypto.core/GeneralSecurityException|null[0]
62-
constructor <init>() // org.kotlincrypto.core/GeneralSecurityException.<init>|<init>(){}[0]
63-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/GeneralSecurityException.<init>|<init>(kotlin.String?){}[0]
64-
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/GeneralSecurityException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
65-
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/GeneralSecurityException.<init>|<init>(kotlin.Throwable?){}[0]
66-
}
67-
68-
open class org.kotlincrypto.core/IllegalBlockSizeException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/IllegalBlockSizeException|null[0]
69-
constructor <init>() // org.kotlincrypto.core/IllegalBlockSizeException.<init>|<init>(){}[0]
70-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/IllegalBlockSizeException.<init>|<init>(kotlin.String?){}[0]
71-
}
72-
73-
open class org.kotlincrypto.core/InvalidKeyException : org.kotlincrypto.core/KeyException { // org.kotlincrypto.core/InvalidKeyException|null[0]
74-
constructor <init>() // org.kotlincrypto.core/InvalidKeyException.<init>|<init>(){}[0]
75-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/InvalidKeyException.<init>|<init>(kotlin.String?){}[0]
76-
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/InvalidKeyException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
77-
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/InvalidKeyException.<init>|<init>(kotlin.Throwable?){}[0]
78-
}
79-
80-
open class org.kotlincrypto.core/InvalidParameterException : kotlin/IllegalArgumentException { // org.kotlincrypto.core/InvalidParameterException|null[0]
81-
constructor <init>() // org.kotlincrypto.core/InvalidParameterException.<init>|<init>(){}[0]
82-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/InvalidParameterException.<init>|<init>(kotlin.String?){}[0]
83-
}
84-
85-
open class org.kotlincrypto.core/KeyException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/KeyException|null[0]
86-
constructor <init>() // org.kotlincrypto.core/KeyException.<init>|<init>(){}[0]
87-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/KeyException.<init>|<init>(kotlin.String?){}[0]
88-
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.core/KeyException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
89-
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.core/KeyException.<init>|<init>(kotlin.Throwable?){}[0]
90-
}
91-
92-
open class org.kotlincrypto.core/ShortBufferException : org.kotlincrypto.core/GeneralSecurityException { // org.kotlincrypto.core/ShortBufferException|null[0]
93-
constructor <init>() // org.kotlincrypto.core/ShortBufferException.<init>|<init>(){}[0]
94-
constructor <init>(kotlin/String?) // org.kotlincrypto.core/ShortBufferException.<init>|<init>(kotlin.String?){}[0]
95-
}

library/core/build.gradle.kts

+9-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,13 @@ plugins {
1818
}
1919

2020
kmpConfiguration {
21-
configureShared(java9ModuleName = "org.kotlincrypto.core", publish = true) {}
21+
configureShared(java9ModuleName = "org.kotlincrypto.core", publish = true) {
22+
common {
23+
sourceSetMain {
24+
dependencies {
25+
api(libs.kotlincrypto.error)
26+
}
27+
}
28+
}
29+
}
2230
}

library/core/src/commonMain/kotlin/org/kotlincrypto/core/Exceptions.kt

-116
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module org.kotlincrypto.core {
22
requires transitive kotlin.stdlib;
3+
requires transitive org.kotlincrypto.error;
34

45
exports org.kotlincrypto.core;
56
}

library/core/src/jvmMain/kotlin/org/kotlincrypto/core/JvmExceptions.kt

-29
This file was deleted.

0 commit comments

Comments
 (0)