SuperAPI AI Directory

fix-ci-binary

General & other

View repository

Updated 10-16 09:59

About this skill

fix-ci-binary

Skill for diagnosing and fixing the binary compatibility check (apiCheck)

Purpose

./gradlew apiCheck fails, check the API changes and fix them.

Diagnosing the problem

Step 1: Checking the error

Command to run:

./gradlew apiCheck --info

Information to grasp from the error message:

  • What API was changed (class, function, property)
  • Whether the change is unexpected or intentional
  • Which modules are affected

Example error message:

Expected file with API declarations 'extension/navigation3/api/android/extension-navigation3.api' does not exist.

Fix procedure

Pattern A: The API file does not exist

Cause: A new module was added, or the API file has not been committed.

How to fix:

  1. Generate the API file: ./gradlew :module:apiDump Run
  2. Check the file: api/ Confirm that the API file was generated in the directory
  3. If the module is empty: Comment out the module itself, or add a placeholder
./gradlew :extension:extension-navigation:apiDump
./gradlew :extension:extension-navigation3:apiDump

Pattern B: The API was changed intentionally

Check procedure:

  1. Check the changed API
  2. Read the source code with Read
  3. Determine whether the change is intentional

How to fix (for intentional changes):

  1. api/ Update the files in the directory
  2. Confirm that the changes are reflected in the API file

Pattern C: The API was changed unintentionally

How to fix:

  1. Check the source code with Read
  2. Revert the changes with Edit
  3. Run ./gradlew apiCheck again

Verification

After fixing, verify with the following command:

./gradlew apiCheck

Confirm that the binary compatibility check succeeds (exit code 0).

Reference information

  • The API check is a feature for guaranteeing binary compatibility in Kotlin Multiplatform
  • api/ The directory stores the API declarations for each platform (Android, JVM, Native, etc.)
  • It is recommended not to edit API files manually, but to generate them automatically with theapiDump task