Skip to content
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
491 changes: 219 additions & 272 deletions .kotlin-js-store/yarn.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 Matthew Nelson
* Copyright (c) 2024 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,8 @@
**/
import io.matthewnelson.kmp.configuration.extension.container.target.KmpTarget
import kotlinx.benchmark.gradle.BenchmarksExtension
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.konan.target.HostManager
import org.jetbrains.kotlin.konan.target.KonanTarget

Expand All @@ -27,7 +27,6 @@ plugins {
kmpConfiguration {
val benchmarks by lazy { extensions.getByType<BenchmarksExtension>() }

@OptIn(ExperimentalWasmDsl::class)
configure {
fun <T: KotlinTarget> KmpTarget<T>.register() {
target { benchmarks.targets.register(name) }
Expand All @@ -36,6 +35,7 @@ kmpConfiguration {
jvm { register() }

js { target { browser(); nodejs() }; register() }
@OptIn(ExperimentalWasmDsl::class)
wasmJs { target { browser(); nodejs() }; register() }

val nativeHost = "nativeHost"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 Matthew Nelson
* Copyright (c) 2024 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 Matthew Nelson
* Copyright (c) 2024 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 Matthew Nelson
* Copyright (c) 2024 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 Matthew Nelson
* Copyright (c) 2024 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 Matthew Nelson
* Copyright (c) 2024 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Matthew Nelson
* Copyright (c) 2023 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion bom/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 Matthew Nelson
# Copyright (c) 2023 KotlinCrypto
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Matthew Nelson
* Copyright (c) 2023 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Matthew Nelson
* Copyright (c) 2023 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
8 changes: 2 additions & 6 deletions build-logic/src/main/kotlin/-KmpConfigurationExtension.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Matthew Nelson
* Copyright (c) 2023 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,12 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
import io.matthewnelson.kmp.configuration.ExperimentalKmpConfigurationApi
import io.matthewnelson.kmp.configuration.extension.KmpConfigurationExtension
import io.matthewnelson.kmp.configuration.extension.container.target.KmpConfigurationContainerDsl
import org.gradle.api.Action
import org.gradle.api.JavaVersion
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

fun KmpConfigurationExtension.configureShared(
java9ModuleName: String? = null,
Expand All @@ -39,12 +38,10 @@ fun KmpConfigurationExtension.configureShared(
compileSourceCompatibility = JavaVersion.VERSION_1_8
compileTargetCompatibility = JavaVersion.VERSION_1_8

@OptIn(ExperimentalKmpConfigurationApi::class)
java9ModuleInfoName = java9ModuleName
}

js()

@OptIn(ExperimentalWasmDsl::class)
wasmJs {
target {
Expand All @@ -56,7 +53,6 @@ fun KmpConfigurationExtension.configureShared(
nodejs()
}
}

@OptIn(ExperimentalWasmDsl::class)
wasmWasi {
target {
Expand Down
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/configuration.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Matthew Nelson
* Copyright (c) 2023 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
48 changes: 28 additions & 20 deletions build-logic/src/main/kotlin/dokka.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Matthew Nelson
* Copyright (c) 2025 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,39 +13,47 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
import org.jetbrains.dokka.DokkaConfiguration.Visibility
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.dokka.gradle.DokkaExtension
import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier
import java.net.URI
import java.time.LocalDate

plugins {
id("org.jetbrains.dokka")
}

tasks.withType<DokkaTaskPartial>().configureEach {
suppressInheritedMembers = true
rootProject.dependencies { dokka(project(project.path)) }

extensions.configure<DokkaExtension> {
dokkaPublications.configureEach {
suppressInheritedMembers.set(true)
}

dokkaSourceSets.configureEach {
includes.from("README.md")
noStdlibLink = true
enableKotlinStdLibDocumentationLink.set(false)

externalDocumentationLink {
url = URI("https://core.kotlincrypto.org/").toURL()
}
externalDocumentationLink {
url = URI("https://error.kotlincrypto.org/").toURL()
}
externalDocumentationLink {
url = URI("https://hash.kotlincrypto.org/").toURL()
externalDocumentationLinks {
register(project.path + ":core") {
url.set(URI("https://core.kotlincrypto.org/"))
}
register(project.path + ":error") {
url.set(URI("https://error.kotlincrypto.org/"))
}
}

sourceLink {
localDirectory = rootDir
remoteUrl = URI("https://github.com/KotlinCrypto/MACs/tree/master").toURL()
remoteLineSuffix = "#L"
localDirectory.set(rootDir)
remoteUrl.set(URI("https://github.com/KotlinCrypto/MACs/tree/master"))
remoteLineSuffix.set("#L")
}

documentedVisibilities.set(setOf(
Visibility.PUBLIC,
))
documentedVisibilities(
VisibilityModifier.Public,
)
}

pluginsConfiguration.html {
footerMessage.set("© 2023-${LocalDate.now().year} Copyright KotlinCrypto")
}
}
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/publication.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Matthew Nelson
* Copyright (c) 2023 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Matthew Nelson
* Copyright (c) 2023 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
7 changes: 4 additions & 3 deletions gh-pages/publish.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (c) 2025 Matthew Nelson
# Copyright (c) 2025 KotlinCrypto
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -26,11 +26,12 @@ echo "$REPO_NAME.kotlincrypto.org" > "$DIR_SCRIPT/$REPO_NAME/CNAME"

cd ..
./gradlew clean -DKMP_TARGETS_ALL
./gradlew dokkaHtmlMultiModule --no-build-cache -DKMP_TARGETS_ALL
cp -aR build/dokka/htmlMultiModule/* gh-pages/$REPO_NAME
./gradlew dokkaGenerate --no-build-cache -DKMP_TARGETS_ALL
cp -aR build/dokka/html/* gh-pages/$REPO_NAME

cd "$DIR_SCRIPT/$REPO_NAME"
sed -i "s|module:|module:library/|g" "package-list"
sed -i "s|module:library/hmac|module:library/hmac/hmac|g" "package-list"

git add --all
git commit -S --message "Update dokka docs"
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ kotlin.mpp.applyDefaultHierarchyTemplate=false
kotlin.mpp.stability.nowarn=true
kotlin.native.ignoreDisabledTargets=true

org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=true

Expand Down
32 changes: 17 additions & 15 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
[versions]
androidx-test-runner = "1.5.2"
#noinspection GradleDependency
androidx-test-runner = "1.5.2" # Do not upgrade. Tests run for API 15+, where next version requires minSdk 19+

bouncy-castle = "1.73"
# https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk18on/
bouncy-castle = "1.80"

encoding = "2.3.1"
encoding = "2.4.0"

gradle-android = "8.2.2"
gradle-benchmark = "0.4.11"
gradle-binary-compat = "0.16.3"
gradle-dokka = "1.9.20"
gradle-kmp-configuration = "0.3.2"
gradle-kotlin = "1.9.24"
gradle-publish-maven = "0.29.0"
gradle-android = "8.7.3"
gradle-benchmark = "0.4.13"
gradle-binary-compat = "0.17.0"
gradle-dokka = "2.0.0"
gradle-kmp-configuration = "0.4.0"
gradle-kotlin = "2.1.10"
gradle-publish-maven = "0.30.0"

kotlincrypto-bitops = "0.1.2"
kotlincrypto-core = "0.6.1"
kotlincrypto-hash = "0.6.1"
kotlincrypto-sponges = "0.3.4"
kotlincrypto-bitops = "0.2.0-SNAPSHOT"
kotlincrypto-core = "0.7.0-SNAPSHOT"
kotlincrypto-hash = "0.7.0-SNAPSHOT"
kotlincrypto-sponges = "0.4.0-SNAPSHOT"

[libraries]
gradle-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradle-dokka" }
Expand All @@ -36,7 +38,7 @@ kotlincrypto-hash-sha3 = { module = "org.kotlincrypto.hash:sha3", version.r
# 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" }
bouncy-castle = { module = "org.bouncycastle:bcprov-ext-jdk15to18", version.ref = "bouncy-castle" }
bouncy-castle = { module = "org.bouncycastle:bcprov-jdk18on", version.ref = "bouncy-castle" }
encoding-base16 = { module = "io.matthewnelson.encoding:base16", version.ref = "encoding" }
encoding-base64 = { module = "io.matthewnelson.encoding:base64", version.ref = "encoding" }
kotlincrypto-bitops-bits = { module = "org.kotlincrypto.bitops:bits", version.ref = "kotlincrypto-bitops" }
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

# https://gradle.org/release-checksums/
distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
distributionSha256Sum=296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip
3 changes: 0 additions & 3 deletions library/blake2/api/blake2.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ final class org.kotlincrypto.macs.blake2/BLAKE2s : org.kotlincrypto.macs.blake2/
}

sealed class org.kotlincrypto.macs.blake2/BLAKE2Mac : org.kotlincrypto.core.mac/Mac { // org.kotlincrypto.macs.blake2/BLAKE2Mac|null[0]
constructor <init>(kotlin/ByteArray, kotlin/Int, kotlin/ByteArray?, org.kotlincrypto.macs.blake2/BLAKE2Mac.DigestFactory) // org.kotlincrypto.macs.blake2/BLAKE2Mac.<init>|<init>(kotlin.ByteArray;kotlin.Int;kotlin.ByteArray?;org.kotlincrypto.macs.blake2.BLAKE2Mac.DigestFactory){}[0]
constructor <init>(org.kotlincrypto.macs.blake2/BLAKE2Mac) // org.kotlincrypto.macs.blake2/BLAKE2Mac.<init>|<init>(org.kotlincrypto.macs.blake2.BLAKE2Mac){}[0]

abstract fun copy(): org.kotlincrypto.macs.blake2/BLAKE2Mac // org.kotlincrypto.macs.blake2/BLAKE2Mac.copy|copy(){}[0]

abstract fun interface DigestFactory { // org.kotlincrypto.macs.blake2/BLAKE2Mac.DigestFactory|null[0]
Expand Down
2 changes: 1 addition & 1 deletion library/blake2/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Matthew Nelson
* Copyright (c) 2025 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion library/blake2/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2025 Matthew Nelson
# Copyright (c) 2025 KotlinCrypto
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Matthew Nelson
* Copyright (c) 2025 KotlinCrypto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,8 @@ package org.kotlincrypto.macs.blake2

import org.kotlincrypto.core.Algorithm
import org.kotlincrypto.core.mac.Mac
import org.kotlincrypto.error.InvalidKeyException
import org.kotlincrypto.error.InvalidParameterException
import org.kotlincrypto.hash.blake2.BLAKE2Digest

/**
Expand All @@ -26,7 +28,7 @@ import org.kotlincrypto.hash.blake2.BLAKE2Digest
* */
public sealed class BLAKE2Mac: Mac {

@Throws(IllegalArgumentException::class)
@Throws(InvalidKeyException::class, InvalidParameterException::class)
protected constructor(
key: ByteArray,
bitStrength: Int,
Expand All @@ -38,7 +40,7 @@ public sealed class BLAKE2Mac: Mac {

protected fun interface DigestFactory {

@Throws(IllegalArgumentException::class)
@Throws(InvalidKeyException::class, InvalidParameterException::class)
public fun newInstance(
bitStrength: Int,
keyLength: Int,
Expand All @@ -59,7 +61,7 @@ public sealed class BLAKE2Mac: Mac {
private val factory: DigestFactory
private var digest: BLAKE2Digest

@Throws(IllegalArgumentException::class)
@Throws(InvalidKeyException::class, InvalidParameterException::class)
constructor(
key: ByteArray,
bitStrength: Int,
Expand Down
Loading
Loading