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 #15

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")
}
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
82 changes: 82 additions & 0 deletions library/endians/api/endians.klib.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// 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.endians:endians>
final value class org.kotlincrypto.endians/BigEndian { // org.kotlincrypto.endians/BigEndian|null[0]
constructor <init>(kotlin/Byte, kotlin/Byte) // org.kotlincrypto.endians/BigEndian.<init>|<init>(kotlin.Byte;kotlin.Byte){}[0]
constructor <init>(kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte) // org.kotlincrypto.endians/BigEndian.<init>|<init>(kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte){}[0]
constructor <init>(kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte) // org.kotlincrypto.endians/BigEndian.<init>|<init>(kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte){}[0]

final val size // org.kotlincrypto.endians/BigEndian.size|{}size[0]
final fun <get-size>(): kotlin/Int // org.kotlincrypto.endians/BigEndian.size.<get-size>|<get-size>(){}[0]
final val sizeBits // org.kotlincrypto.endians/BigEndian.sizeBits|{}sizeBits[0]
final fun <get-sizeBits>(): kotlin/Int // org.kotlincrypto.endians/BigEndian.sizeBits.<get-sizeBits>|<get-sizeBits>(){}[0]

final fun copyInto(kotlin/ByteArray, kotlin/Int =..., kotlin/Int =..., kotlin/Int =...): kotlin/ByteArray // org.kotlincrypto.endians/BigEndian.copyInto|copyInto(kotlin.ByteArray;kotlin.Int;kotlin.Int;kotlin.Int){}[0]
final fun equals(kotlin/Any?): kotlin/Boolean // org.kotlincrypto.endians/BigEndian.equals|equals(kotlin.Any?){}[0]
final fun get(kotlin/Int): kotlin/Byte // org.kotlincrypto.endians/BigEndian.get|get(kotlin.Int){}[0]
final fun getOrElse(kotlin/Int, kotlin/Function1<kotlin/Int, kotlin/Byte>): kotlin/Byte // org.kotlincrypto.endians/BigEndian.getOrElse|getOrElse(kotlin.Int;kotlin.Function1<kotlin.Int,kotlin.Byte>){}[0]
final fun getOrNull(kotlin/Int): kotlin/Byte? // org.kotlincrypto.endians/BigEndian.getOrNull|getOrNull(kotlin.Int){}[0]
final fun hashCode(): kotlin/Int // org.kotlincrypto.endians/BigEndian.hashCode|hashCode(){}[0]
final fun iterator(): kotlin.collections/ByteIterator // org.kotlincrypto.endians/BigEndian.iterator|iterator(){}[0]
final fun plus(kotlin/ByteArray): kotlin/ByteArray // org.kotlincrypto.endians/BigEndian.plus|plus(kotlin.ByteArray){}[0]
final fun toByte(): kotlin/Byte // org.kotlincrypto.endians/BigEndian.toByte|toByte(){}[0]
final fun toByteArray(): kotlin/ByteArray // org.kotlincrypto.endians/BigEndian.toByteArray|toByteArray(){}[0]
final fun toInt(): kotlin/Int // org.kotlincrypto.endians/BigEndian.toInt|toInt(){}[0]
final fun toLittleEndian(): org.kotlincrypto.endians/LittleEndian // org.kotlincrypto.endians/BigEndian.toLittleEndian|toLittleEndian(){}[0]
final fun toLong(): kotlin/Long // org.kotlincrypto.endians/BigEndian.toLong|toLong(){}[0]
final fun toShort(): kotlin/Short // org.kotlincrypto.endians/BigEndian.toShort|toShort(){}[0]
final fun toString(): kotlin/String // org.kotlincrypto.endians/BigEndian.toString|toString(){}[0]

final object Companion { // org.kotlincrypto.endians/BigEndian.Companion|null[0]
final fun (kotlin/Int).toBigEndian(): org.kotlincrypto.endians/BigEndian // org.kotlincrypto.endians/BigEndian.Companion.toBigEndian|[email protected](){}[0]
final fun (kotlin/Long).toBigEndian(): org.kotlincrypto.endians/BigEndian // org.kotlincrypto.endians/BigEndian.Companion.toBigEndian|[email protected](){}[0]
final fun (kotlin/Short).toBigEndian(): org.kotlincrypto.endians/BigEndian // org.kotlincrypto.endians/BigEndian.Companion.toBigEndian|[email protected](){}[0]
final fun bytesToInt(kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte): kotlin/Int // org.kotlincrypto.endians/BigEndian.Companion.bytesToInt|bytesToInt(kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte){}[0]
final fun bytesToLong(kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte): kotlin/Long // org.kotlincrypto.endians/BigEndian.Companion.bytesToLong|bytesToLong(kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte){}[0]
final fun bytesToShort(kotlin/Byte, kotlin/Byte): kotlin/Short // org.kotlincrypto.endians/BigEndian.Companion.bytesToShort|bytesToShort(kotlin.Byte;kotlin.Byte){}[0]
}
}

final value class org.kotlincrypto.endians/LittleEndian { // org.kotlincrypto.endians/LittleEndian|null[0]
constructor <init>(kotlin/Byte, kotlin/Byte) // org.kotlincrypto.endians/LittleEndian.<init>|<init>(kotlin.Byte;kotlin.Byte){}[0]
constructor <init>(kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte) // org.kotlincrypto.endians/LittleEndian.<init>|<init>(kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte){}[0]
constructor <init>(kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte) // org.kotlincrypto.endians/LittleEndian.<init>|<init>(kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte){}[0]

final val size // org.kotlincrypto.endians/LittleEndian.size|{}size[0]
final fun <get-size>(): kotlin/Int // org.kotlincrypto.endians/LittleEndian.size.<get-size>|<get-size>(){}[0]
final val sizeBits // org.kotlincrypto.endians/LittleEndian.sizeBits|{}sizeBits[0]
final fun <get-sizeBits>(): kotlin/Int // org.kotlincrypto.endians/LittleEndian.sizeBits.<get-sizeBits>|<get-sizeBits>(){}[0]

final fun copyInto(kotlin/ByteArray, kotlin/Int =..., kotlin/Int =..., kotlin/Int =...): kotlin/ByteArray // org.kotlincrypto.endians/LittleEndian.copyInto|copyInto(kotlin.ByteArray;kotlin.Int;kotlin.Int;kotlin.Int){}[0]
final fun equals(kotlin/Any?): kotlin/Boolean // org.kotlincrypto.endians/LittleEndian.equals|equals(kotlin.Any?){}[0]
final fun get(kotlin/Int): kotlin/Byte // org.kotlincrypto.endians/LittleEndian.get|get(kotlin.Int){}[0]
final fun getOrElse(kotlin/Int, kotlin/Function1<kotlin/Int, kotlin/Byte>): kotlin/Byte // org.kotlincrypto.endians/LittleEndian.getOrElse|getOrElse(kotlin.Int;kotlin.Function1<kotlin.Int,kotlin.Byte>){}[0]
final fun getOrNull(kotlin/Int): kotlin/Byte? // org.kotlincrypto.endians/LittleEndian.getOrNull|getOrNull(kotlin.Int){}[0]
final fun hashCode(): kotlin/Int // org.kotlincrypto.endians/LittleEndian.hashCode|hashCode(){}[0]
final fun iterator(): kotlin.collections/ByteIterator // org.kotlincrypto.endians/LittleEndian.iterator|iterator(){}[0]
final fun plus(kotlin/ByteArray): kotlin/ByteArray // org.kotlincrypto.endians/LittleEndian.plus|plus(kotlin.ByteArray){}[0]
final fun toBigEndian(): org.kotlincrypto.endians/BigEndian // org.kotlincrypto.endians/LittleEndian.toBigEndian|toBigEndian(){}[0]
final fun toByte(): kotlin/Byte // org.kotlincrypto.endians/LittleEndian.toByte|toByte(){}[0]
final fun toByteArray(): kotlin/ByteArray // org.kotlincrypto.endians/LittleEndian.toByteArray|toByteArray(){}[0]
final fun toInt(): kotlin/Int // org.kotlincrypto.endians/LittleEndian.toInt|toInt(){}[0]
final fun toLong(): kotlin/Long // org.kotlincrypto.endians/LittleEndian.toLong|toLong(){}[0]
final fun toShort(): kotlin/Short // org.kotlincrypto.endians/LittleEndian.toShort|toShort(){}[0]
final fun toString(): kotlin/String // org.kotlincrypto.endians/LittleEndian.toString|toString(){}[0]

final object Companion { // org.kotlincrypto.endians/LittleEndian.Companion|null[0]
final fun (kotlin/Int).toLittleEndian(): org.kotlincrypto.endians/LittleEndian // org.kotlincrypto.endians/LittleEndian.Companion.toLittleEndian|[email protected](){}[0]
final fun (kotlin/Long).toLittleEndian(): org.kotlincrypto.endians/LittleEndian // org.kotlincrypto.endians/LittleEndian.Companion.toLittleEndian|[email protected](){}[0]
final fun (kotlin/Short).toLittleEndian(): org.kotlincrypto.endians/LittleEndian // org.kotlincrypto.endians/LittleEndian.Companion.toLittleEndian|[email protected](){}[0]
final fun bytesToInt(kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte): kotlin/Int // org.kotlincrypto.endians/LittleEndian.Companion.bytesToInt|bytesToInt(kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte){}[0]
final fun bytesToLong(kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte, kotlin/Byte): kotlin/Long // org.kotlincrypto.endians/LittleEndian.Companion.bytesToLong|bytesToLong(kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte;kotlin.Byte){}[0]
final fun bytesToShort(kotlin/Byte, kotlin/Byte): kotlin/Short // org.kotlincrypto.endians/LittleEndian.Companion.bytesToShort|bytesToShort(kotlin.Byte;kotlin.Byte){}[0]
}
}

final fun (kotlin/ByteArray).org.kotlincrypto.endians/plus(org.kotlincrypto.endians/BigEndian): kotlin/ByteArray // org.kotlincrypto.endians/plus|[email protected](org.kotlincrypto.endians.BigEndian){}[0]
final fun (kotlin/ByteArray).org.kotlincrypto.endians/plus(org.kotlincrypto.endians/LittleEndian): kotlin/ByteArray // org.kotlincrypto.endians/plus|[email protected](org.kotlincrypto.endians.LittleEndian){}[0]
Loading