/kaidl

Generate AIDL-like android binder interface with Kotlin

Primary LanguageKotlinMIT LicenseMIT

kaidl

Generate AIDL-like android binder interface with Kotlin

Available Types

  • Primitives

    • Int
    • Long
    • Boolean
    • Float
    • Double
    • String
    • Byte
    • Char
  • Primitive Arrays

    • BooleanArray
    • ByteArray
    • CharArray
    • DoubleArray
    • FloatArray
    • IntArray
    • LongArray
    • SparseBooleanArray
  • Containers with Generic

    • List<T>
    • Array<T>
    • Map<K, V>
    • Set<T>
  • Parcelables

    • Custom Parcelable
    • Bundle
  • Active Objects

    • Binder
    • Other kaidl interfaces

Usage

  • Add 'KSP' to your project

    • Add ksp plugin repository in your project's setting.gradle(.kts)

      pluginManagement {
          repositories {
              gradlePluginPortal()
              google()
          }
      }
    • Apply plugin kotlin-processing

      plugins {
          id("com.google.devtools.ksp") version "1.5.30-1.0.0-beta09"
          // ...other plugins
      }
  • Add 'Kaidl' to your project

    • Add 'kaidl' repositories

      repositories {
          // ... other repositories
      
          maven {
              url = uri("https://maven.kr328.app/releases")
          }
      }
    • Add 'ksp' and runtime dependencies

       dependencies {
           ksp("com.github.kr328.kaidl:kaidl:1.13")
      
           implementation("com.github.kr328.kaidl:kaidl-runtime:1.13")
      
           // ...other dependencies
       }
  • Example

    See also test module

  • Make IDE Aware Of Generated Code

    See also ksp

Credit