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
8 changes: 5 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Upload Test Reports
uses: actions/upload-artifact@v4
if: ${{ always() }}
if: always()
with:
name: test-report-${{ matrix.os }}
path: '**/build/reports/tests/**'
Expand Down Expand Up @@ -151,8 +151,10 @@ jobs:

- name: Upload Test Reports
uses: actions/upload-artifact@v4
if: ${{ always() }}
if: always()
with:
name: test-report-android-${{ matrix.api-level }}-${{ matrix.arch }}
path: '**/build/reports/androidTests/**'
path: |
**/build/reports/androidTests/**
**/build/outputs/androidTest-results/connected/debug/*/logcat-*.txt
retention-days: 1
684 changes: 390 additions & 294 deletions .kotlin-js-store/yarn.lock → .kotlin-js-store/js/yarn.lock

Large diffs are not rendered by default.

2,161 changes: 2,161 additions & 0 deletions .kotlin-js-store/wasm/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Releasing
# RELEASING

See [KotlinCrypto/documentation/RELEASING.md][url-kotlincrypto-releasing]

Expand Down
5 changes: 0 additions & 5 deletions build-logic/src/main/kotlin/-KmpConfigurationExtension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
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.ExperimentalWasmDsl
import org.jetbrains.kotlin.konan.target.HostManager

Expand All @@ -35,10 +34,6 @@ fun KmpConfigurationExtension.configureShared(
}

jvm {
kotlinJvmTarget = JavaVersion.VERSION_1_8
compileSourceCompatibility = JavaVersion.VERSION_1_8
compileTargetCompatibility = JavaVersion.VERSION_1_8

// Windows cries if Java 11 is not installed...
if (!HostManager.hostIsMingw) {
java9ModuleInfoName = java9ModuleName
Expand Down
8 changes: 0 additions & 8 deletions build-logic/src/main/kotlin/publication.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
import org.gradle.plugins.signing.SigningExtension

plugins {
id("com.vanniktech.maven.publish")
}

if (!version.toString().endsWith("-SNAPSHOT")) {
extensions.configure<SigningExtension>("signing") {
useGpgCmd()
}
}

tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
Expand Down
17 changes: 13 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockMismatchReport
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension
import org.jetbrains.kotlin.gradle.targets.wasm.yarn.WasmYarnPlugin
import org.jetbrains.kotlin.gradle.targets.wasm.yarn.WasmYarnRootExtension

plugins {
alias(libs.plugins.android.library) apply(false)
Expand All @@ -38,7 +40,7 @@ allprojects {
// Only allow snapshot dependencies for non-release versions.
// This would cause a build failure if attempting to make a release
// while depending on a -SNAPSHOT version (such as core).
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://central.sonatype.com/repository/maven-snapshots/")
}
}
}
Expand All @@ -47,9 +49,16 @@ allprojects {
val CHECK_PUBLICATION = findProperty("CHECK_PUBLICATION") != null

plugins.withType<YarnPlugin> {
the<YarnRootExtension>().lockFileDirectory = rootDir.resolve(".kotlin-js-store")
if (CHECK_PUBLICATION) {
the<YarnRootExtension>().yarnLockMismatchReport = YarnLockMismatchReport.NONE
the<YarnRootExtension>().apply {
lockFileDirectory = rootDir.resolve(".kotlin-js-store").resolve("js")
if (CHECK_PUBLICATION) yarnLockMismatchReport = YarnLockMismatchReport.NONE
}
}

plugins.withType<WasmYarnPlugin> {
the<WasmYarnRootExtension>().apply {
lockFileDirectory = rootDir.resolve(".kotlin-js-store").resolve("wasm")
if (CHECK_PUBLICATION) yarnLockMismatchReport = YarnLockMismatchReport.NONE
}
}

Expand Down
3 changes: 2 additions & 1 deletion gh-pages/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ cd ..
cp -aR build/dokka/html/* gh-pages/$REPO_NAME

cd "$DIR_SCRIPT/$REPO_NAME"
sed -i '' "s|module:|module:library/|g" "package-list"
PACKAGE_LIST="$(sed "s|module:|module:library/|g" "package-list")"
echo "$PACKAGE_LIST" > package-list

git add --all
git commit -S --message "Update dokka docs"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ kotlin.native.ignoreDisabledTargets=true
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

SONATYPE_HOST=S01
SONATYPE_HOST=CENTRAL_PORTAL
RELEASE_SIGNING_ENABLED=true

GROUP=org.kotlincrypto.random
Expand Down
22 changes: 11 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[versions]
androidx-test-core = "1.6.1"
androidx-test-runner = "1.6.2"
androidx-test-core = "1.7.0"
androidx-test-runner = "1.7.0"

gradle-android = "8.7.3"
gradle-benchmark = "0.4.13"
gradle-binary-compat = "0.17.0"
gradle-cklib = "0.3.3"
gradle-android = "8.10.0"
gradle-benchmark = "0.4.14"
gradle-binary-compat = "0.18.1"
gradle-cklib = "0.3.4"
gradle-dokka = "2.0.0"
gradle-kmp-configuration = "0.4.0"
gradle-kotlin = "2.1.10"
gradle-publish-maven = "0.30.0"
gradle-kmp-configuration = "0.5.2"
gradle-kotlin = "2.2.10"
gradle-publish-maven = "0.34.0"

kmp-process = "0.2.1"
kotlincrypto-error = "0.3.0"
kmp-process = "0.3.2"
kotlincrypto-error = "0.3.0" # TODO: Update

[libraries]
gradle-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradle-dokka" }
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=296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip
distributionSha256Sum=ed1a8d686605fd7c23bdf62c7fc7add1c5b23b2bbc3721e661934ef4a4911d7c
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
13 changes: 7 additions & 6 deletions library/crypto-rand/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -114,28 +114,29 @@ kmpConfiguration {
// the -dev llvm compiler for the current kotlin version.
//
// The following info can be found in ~/.konan/kotlin-native-prebuild-{os}-{arch}-{kotlin version}/konan/konan.properties
@Suppress("ConstPropertyName")
private object LLVM {
const val URL: String = "https://download.jetbrains.com/kotlin/native/resources/llvm"
const val VERSION: String = "16.0.0"
const val VERSION: String = "19"

// llvm-{llvm version}-{arch}-{host}-dev-{id}
object DevID {
object Linux {
const val x86_64: Int = 80
const val x86_64: Int = 103
}
object MacOS {
const val aarch64: Int = 63
const val x86_64: Int = 50
const val aarch64: Int = 75
const val x86_64: Int = 72
}
object MinGW {
const val x86_64: Int = 56
const val x86_64: Int = 135
}
}
}

private fun CKlibGradleExtension.configure(libs: LibrariesForLibs) {
kotlinVersion = libs.versions.gradle.kotlin.get()
check(kotlinVersion == "2.1.10") {
check(kotlinVersion == "2.2.10") {
"Kotlin version out of date! Download URLs for LLVM need to be updated for ${project.path}"
}

Expand Down
4 changes: 0 additions & 4 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ kmpConfiguration {
mainClass.set("MainKt")
}
}

kotlinJvmTarget = JavaVersion.VERSION_1_8
compileSourceCompatibility = JavaVersion.VERSION_1_8
compileTargetCompatibility = JavaVersion.VERSION_1_8
}

fun <T: KotlinNativeTarget> KmpTarget<T>.setup() {
Expand Down
11 changes: 4 additions & 7 deletions test-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ repositories { google() }

kmpConfiguration {
configure {
val jniLibsDir = projectDir
val jniLibsDir = project
.projectDir
.resolve("src")
.resolve("androidInstrumentedTest")
.resolve("jniLibs")
Expand All @@ -35,8 +36,8 @@ kmpConfiguration {

androidLibrary {
android {
buildToolsVersion = "34.0.0"
compileSdk = 34
buildToolsVersion = "35.0.1"
compileSdk = 35
namespace = "org.kotlincrypto.random.test.android"

defaultConfig {
Expand All @@ -58,10 +59,6 @@ kmpConfiguration {
implementation(libs.kmp.process)
}
}

kotlinJvmTarget = JavaVersion.VERSION_1_8
compileSourceCompatibility = JavaVersion.VERSION_1_8
compileTargetCompatibility = JavaVersion.VERSION_1_8
}

common {
Expand Down
20 changes: 12 additions & 8 deletions tools/check-publication/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
import kotlin.io.encoding.Base64
import kotlin.io.encoding.ExperimentalEncodingApi

plugins {
id("configuration")
}

repositories {
val host = "https://s01.oss.sonatype.org"

if (version.toString().endsWith("-SNAPSHOT")) {
maven("$host/content/repositories/snapshots/")
maven("https://central.sonatype.com/repository/maven-snapshots/")
} else {
maven("$host/content/groups/staging") {
maven("https://central.sonatype.com/api/v1/publisher/deployments/download/") {
val p = rootProject.properties

credentials {
username = p["mavenCentralUsername"]?.toString()
password = p["mavenCentralPassword"]?.toString()
authentication.create("Authorization", HttpHeaderAuthentication::class.java)
credentials(HttpHeaderCredentials::class.java) {
val username = p["mavenCentralUsername"]?.toString() ?: throw NullPointerException()
val password = p["mavenCentralPassword"]?.toString() ?: throw NullPointerException()
name = "Authorization"
@OptIn(ExperimentalEncodingApi::class)
value = "Bearer " + Base64.Mime.encode("$username:$password".encodeToByteArray())
}
}
}
Expand Down
Loading