Skip to content
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

Add klib api validation #20

Merged
merged 2 commits into from
Aug 30, 2024
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
7 changes: 7 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,23 @@ jobs:
distribution: 'zulu'
java-version: 11

- name: Check API Compatibility
if: matrix.os == 'macos-latest'
run: >
./gradlew apiCheck --stacktrace

- name: Run macOS Tests
if: matrix.os == 'macos-latest'
run: >
./gradlew check --stacktrace
-PKMP_TARGETS="JVM,JS,IOS_ARM64,IOS_X64,IOS_SIMULATOR_ARM64,MACOS_ARM64,MACOS_X64,TVOS_ARM64,TVOS_X64,TVOS_SIMULATOR_ARM64,WATCHOS_ARM32,WATCHOS_ARM64,WATCHOS_DEVICE_ARM64,WATCHOS_X64,WATCHOS_SIMULATOR_ARM64,WASM_JS,WASM_WASI"

- name: Run Linux Tests
if: matrix.os == 'ubuntu-latest'
run: >
./gradlew check --stacktrace
-PKMP_TARGETS="JVM,JS,ANDROID,ANDROID_ARM32,ANDROID_ARM64,ANDROID_X64,ANDROID_X86,LINUX_ARM64,LINUX_X64,WASM_JS,WASM_WASI"

- name: Run Windows Tests
if: matrix.os == 'windows-latest'
run: >
Expand Down
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ plugins.withType<YarnPlugin> {
}

apiValidation {
// Only enable when selectively enabled targets are not being passed via cli.
// See https://github.com/Kotlin/binary-compatibility-validator/issues/269
@OptIn(kotlinx.validation.ExperimentalBCVApi::class)
klib.enabled = findProperty("KMP_TARGETS") == null

if (findProperty("CHECK_PUBLICATION") != null) {
ignoredProjects.add("check-publication")
} else {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
gradle-binary-compat = "0.14.0"
gradle-binary-compat = "0.16.3"
gradle-kmp-configuration = "0.3.2"
gradle-kotlin = "1.9.24"
gradle-publish-maven = "0.29.0"
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=85719317abd2112f021d4f41f09ec370534ba288432065f4b477b6a3b652910d
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
21 changes: 21 additions & 0 deletions secure-random/api/secure-random.klib.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Klib ABI Dump
// Targets: [androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86, iosArm64, iosSimulatorArm64, iosX64, js, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, wasmJs, wasmWasi, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64, watchosX64]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
// - Show declarations: true

// Library unique name: <org.kotlincrypto:secure-random>
final class org.kotlincrypto/SecRandomCopyException : kotlin/RuntimeException { // org.kotlincrypto/SecRandomCopyException|null[0]
constructor <init>() // org.kotlincrypto/SecRandomCopyException.<init>|<init>(){}[0]
constructor <init>(kotlin/String?) // org.kotlincrypto/SecRandomCopyException.<init>|<init>(kotlin.String?){}[0]
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto/SecRandomCopyException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
constructor <init>(kotlin/Throwable?) // org.kotlincrypto/SecRandomCopyException.<init>|<init>(kotlin.Throwable?){}[0]
}

final class org.kotlincrypto/SecureRandom { // org.kotlincrypto/SecureRandom|null[0]
constructor <init>() // org.kotlincrypto/SecureRandom.<init>|<init>(){}[0]

final fun nextBytesCopyTo(kotlin/ByteArray?) // org.kotlincrypto/SecureRandom.nextBytesCopyTo|nextBytesCopyTo(kotlin.ByteArray?){}[0]
final fun nextBytesOf(kotlin/Int): kotlin/ByteArray // org.kotlincrypto/SecureRandom.nextBytesOf|nextBytesOf(kotlin.Int){}[0]
}
Loading