Skip to content

Commit 6da3145

Browse files
authored
Update dependencies (#34)
1 parent 69c16d9 commit 6da3145

File tree

15 files changed

+254
-294
lines changed

15 files changed

+254
-294
lines changed

.kotlin-js-store/yarn.lock

Lines changed: 169 additions & 224 deletions
Large diffs are not rendered by default.

benchmarks/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
**/
1616
import io.matthewnelson.kmp.configuration.extension.container.target.KmpTarget
1717
import kotlinx.benchmark.gradle.BenchmarksExtension
18+
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
1819
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
19-
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
2020
import org.jetbrains.kotlin.konan.target.HostManager
2121
import org.jetbrains.kotlin.konan.target.KonanTarget
2222

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

30-
@OptIn(ExperimentalWasmDsl::class)
3130
configure {
3231
fun <T: KotlinTarget> KmpTarget<T>.register() {
3332
target { benchmarks.targets.register(name) }
@@ -36,6 +35,7 @@ kmpConfiguration {
3635
jvm { register() }
3736

3837
js { target { browser(); nodejs() }; register() }
38+
@OptIn(ExperimentalWasmDsl::class)
3939
wasmJs { target { browser(); nodejs() }; register() }
4040

4141
val nativeHost = "nativeHost"

build-logic/src/main/kotlin/-KmpConfigurationExtension.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
**/
16-
import io.matthewnelson.kmp.configuration.ExperimentalKmpConfigurationApi
1716
import io.matthewnelson.kmp.configuration.extension.KmpConfigurationExtension
1817
import io.matthewnelson.kmp.configuration.extension.container.target.KmpConfigurationContainerDsl
1918
import org.gradle.api.Action
2019
import org.gradle.api.JavaVersion
21-
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
20+
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
2221

2322
fun KmpConfigurationExtension.configureShared(
2423
java9ModuleName: String? = null,
2524
publish: Boolean = false,
26-
action: Action<KmpConfigurationContainerDsl>
25+
action: Action<KmpConfigurationContainerDsl>,
2726
) {
2827
if (publish) {
2928
require(!java9ModuleName.isNullOrBlank()) { "publications must specify a module-info name" }
@@ -39,7 +38,6 @@ fun KmpConfigurationExtension.configureShared(
3938
compileSourceCompatibility = JavaVersion.VERSION_1_8
4039
compileTargetCompatibility = JavaVersion.VERSION_1_8
4140

42-
@OptIn(ExperimentalKmpConfigurationApi::class)
4341
java9ModuleInfoName = java9ModuleName
4442
}
4543

@@ -74,7 +72,7 @@ fun KmpConfigurationExtension.configureShared(
7472
mingwAll()
7573

7674
common {
77-
if (publish) pluginIds("publication")
75+
if (publish) pluginIds("publication", "dokka")
7876

7977
sourceSetTest {
8078
dependencies {

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

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,37 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
**/
16-
import org.jetbrains.dokka.DokkaConfiguration.Visibility
17-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
16+
import org.jetbrains.dokka.gradle.DokkaExtension
17+
import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier
1818
import java.net.URI
1919

2020
plugins {
2121
id("org.jetbrains.dokka")
2222
}
2323

24-
tasks.withType<DokkaTaskPartial>().configureEach {
25-
suppressInheritedMembers = true
24+
rootProject.dependencies { dokka(project(project.path)) }
25+
26+
extensions.configure<DokkaExtension> {
27+
dokkaPublications.configureEach {
28+
suppressInheritedMembers.set(true)
29+
}
2630

2731
dokkaSourceSets.configureEach {
2832
includes.from("README.md")
29-
noStdlibLink = true
33+
enableKotlinStdLibDocumentationLink.set(false)
3034

31-
externalDocumentationLink {
32-
url = URI("https://error.kotlincrypto.org/").toURL()
35+
externalDocumentationLinks.create("error") {
36+
url.set(URI("https://error.kotlincrypto.org/"))
3337
}
3438

3539
sourceLink {
36-
localDirectory = rootDir
37-
remoteUrl = URI("https://github.com/KotlinCrypto/random/tree/master").toURL()
38-
remoteLineSuffix = "#L"
40+
localDirectory.set(rootDir)
41+
remoteUrl.set(URI("https://github.com/KotlinCrypto/random/tree/master"))
42+
remoteLineSuffix.set("#L")
3943
}
4044

41-
documentedVisibilities.set(setOf(
42-
Visibility.PUBLIC,
43-
))
45+
documentedVisibilities(
46+
VisibilityModifier.Public,
47+
)
4448
}
4549
}

build.gradle.kts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ allprojects {
2929
findProperty("VERSION_NAME")?.let { version = it }
3030
findProperty("POM_DESCRIPTION")?.let { description = it.toString() }
3131

32-
repositories { mavenCentral() }
32+
repositories {
33+
mavenCentral()
34+
35+
if (version.toString().endsWith("-SNAPSHOT")) {
36+
// Only allow snapshot dependencies for non-release versions.
37+
// This would cause a build failure if attempting to make a release
38+
// while depending on a -SNAPSHOT version (such as core).
39+
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
40+
}
41+
}
3342
}
3443

3544
@Suppress("PropertyName")

gh-pages/publish.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ echo "$REPO_NAME.kotlincrypto.org" > "$DIR_SCRIPT/$REPO_NAME/CNAME"
2626

2727
cd ..
2828
./gradlew clean -DKMP_TARGETS_ALL
29-
./gradlew dokkaHtmlMultiModule --no-build-cache -DKMP_TARGETS_ALL
30-
cp -aR build/dokka/htmlMultiModule/* gh-pages/$REPO_NAME
29+
./gradlew dokkaGenerate --no-build-cache -DKMP_TARGETS_ALL
30+
cp -aR build/dokka/html/* gh-pages/$REPO_NAME
3131

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

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ kotlin.mpp.applyDefaultHierarchyTemplate=false
77
kotlin.mpp.stability.nowarn=true
88
kotlin.native.ignoreDisabledTargets=true
99

10+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
11+
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
12+
1013
SONATYPE_HOST=S01
1114
RELEASE_SIGNING_ENABLED=true
1215

gradle/libs.versions.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[versions]
2-
gradle-benchmark = "0.4.11"
3-
gradle-binary-compat = "0.16.3"
4-
gradle-dokka = "1.9.20"
5-
gradle-kmp-configuration = "0.3.2"
6-
gradle-kotlin = "1.9.24"
7-
gradle-publish-maven = "0.29.0"
2+
gradle-benchmark = "0.4.13"
3+
gradle-binary-compat = "0.17.0"
4+
gradle-dokka = "2.0.0"
5+
gradle-kmp-configuration = "0.4.0"
6+
gradle-kotlin = "2.1.10"
7+
gradle-publish-maven = "0.30.0"
88

9-
kotlincrypto-error = "0.2.0"
9+
kotlincrypto-error = "0.3.0-SNAPSHOT"
1010

1111
[libraries]
1212
gradle-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradle-dokka" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ zipStorePath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55

66
# https://gradle.org/release-checksums/
7-
distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
8-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
7+
distributionSha256Sum=296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175
8+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip

library/crypto-rand/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
# Module crypto-rand
22

3-
Obtain cryptographically secure random bytes from system sources.
3+
Procure cryptographically secure random data from system sources.
44

55
```kotlin
66
fun main() {
77
val bytes = try {
88
CryptoRand.Default.nextBytes(ByteArray(16))
99
} catch (e: RandomnessProcurementException) {
10-
// Underlying platform APIs failed to procure data
11-
// from system sources.
10+
// Underlying platform API failed to procure data from system sources.
1211
e.printStackTrace()
1312
return
1413
}
1514

1615
println(bytes.toList())
17-
//
1816
}
1917
```

0 commit comments

Comments
 (0)