Skip to content

Commit

Permalink
Add binary API validation (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt authored Feb 29, 2024
1 parent a390682 commit 5f3745c
Show file tree
Hide file tree
Showing 8 changed files with 1,638 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
include:
- os: ubuntu-latest
GRADLE_ARGS: |
apiCheck
:test:check
:colormath:compileKotlinLinuxArm64
:colormath:compileKotlinWasmJs
Expand Down
9 changes: 9 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ plugins {
alias(libs.plugins.dokka).apply(false)
alias(libs.plugins.publish).apply(false)
alias(libs.plugins.compose).apply(false)
alias(libs.plugins.kotlinBinaryCompatibilityValidator)
}

apiValidation {
// https://github.com/Kotlin/binary-compatibility-validator/issues/3
project("scripts").subprojects.mapTo(ignoredProjects) { it.name }
project("test").subprojects.mapTo(ignoredProjects) { it.name }
project("website").subprojects.mapTo(ignoredProjects) { it.name }
}


fun getPublishVersion(): String {
val versionName = project.property("VERSION_NAME") as String

Expand Down
1,602 changes: 1,602 additions & 0 deletions colormath/api/colormath.api

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public final class com/github/ajalt/colormath/extensions/android/color/ColorExtensionsKt {
public static final fun toAndroidColor (Lcom/github/ajalt/colormath/Color;)Landroid/graphics/Color;
public static final fun toColormathColor (Landroid/graphics/Color;)Lcom/github/ajalt/colormath/Color;
public static final fun toColormathSRGB (Landroid/graphics/Color;)Lcom/github/ajalt/colormath/model/RGB;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public final class com/github/ajalt/colormath/extensions/android/colorint/ColorIntExtensionsKt {
public static final fun fromColorInt (Lcom/github/ajalt/colormath/model/RGB$Companion;I)Lcom/github/ajalt/colormath/model/RGB;
public static final fun fromColorInt (Lcom/github/ajalt/colormath/model/RGBInt$Companion;I)I
public static final fun toColorInt (Lcom/github/ajalt/colormath/Color;)I
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public final class com/github/ajalt/colormath/extensions/android/composecolor/ComposeColorExtensionsKt {
public static final fun toColormathColor-8_81llA (J)Lcom/github/ajalt/colormath/Color;
public static final fun toColormathSRGB-8_81llA (J)Lcom/github/ajalt/colormath/model/RGB;
public static final fun toComposeColor (Lcom/github/ajalt/colormath/Color;)J
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public final class com/github/ajalt/colormath/extensions/android/composecolor/ComposeColorExtensionsKt {
public static final fun toColormathColor-8_81llA (J)Lcom/github/ajalt/colormath/Color;
public static final fun toColormathSRGB-8_81llA (J)Lcom/github/ajalt/colormath/model/RGB;
public static final fun toComposeColor (Lcom/github/ajalt/colormath/Color;)J
}

2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ robolectric = "org.robolectric:robolectric:4.10"
[plugins]
dokka = "org.jetbrains.dokka:1.9.10"
publish = "com.vanniktech.maven.publish:0.27.0"
kotlinBinaryCompatibilityValidator = "org.jetbrains.kotlinx.binary-compatibility-validator:0.14.0"

# used in extensions
android-library = "com.android.library:7.4.0"

Expand Down

0 comments on commit 5f3745c

Please sign in to comment.