# Aidl

[View Source](https://cs.android.com/search?q=file:com/android/build/api/variant/Aidl.kt+class:com.android.build.api.variant.Aidl) Added in 8.1.0


```
interface Aidl
```

<br />

*** ** * ** ***

Provides structured access to various AIDL tools such as the aidl compiler executable and aidl framework.

An instance of `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Aidl` can be obtained via `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AndroidComponents#sdkComponents()`

As an example , let's take a Task that runs aidl compiler:

```
abstract class MyTask: DefaultTask() {
  @get:Nested
  abstract val aidlInput: Property<com.android.build.api.variant.Aidl>

  @get:Inject
  abstract val execOperations: ExecOperations

  @TaskAction
  fun execute() {
    val aidlExecutable = aidlInput.get().executable.get().asFile
    val aidlFramework = aidlInput.get().framework.get().asFile

    // execute aidl binary with --help argument
    execOperations.exec { spec ->
      spec.commandLine(aidlExecutable)
      spec.args("--help")
    }
  }
}

tasks.register<MyTask>("myTaskName") {
  // get an instance of Aidl
  this.aidlInput.set(androidComponents.sdkComponents.aidl)
}
```

## Summary

| ### Public properties |
|---|---|
| `https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html<https://docs.gradle.org/current/javadoc/org/gradle/api/file/RegularFile.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Aidl#executable()` Path to the [AIDL](https://developer.android.com/guide/components/aidl) executable file from the Android SDK |
| `https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html<https://docs.gradle.org/current/javadoc/org/gradle/api/file/RegularFile.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Aidl#framework()` Path to the [AIDL](https://developer.android.com/guide/components/aidl) framework file from the Android SDK |
| `https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Aidl#version()` Version of build tools. |

## Public properties

### executable

Added in 8.1.0

```
val executable: Provider<RegularFile>
```

Path to the [AIDL](https://developer.android.com/guide/components/aidl) executable file from the Android SDK

### framework

Added in 8.1.0

```
val framework: Provider<RegularFile>
```

Path to the [AIDL](https://developer.android.com/guide/components/aidl) framework file from the Android SDK

### version

Added in 8.1.0

```
val version: Provider<String>
```

Version of build tools. It is used as an input to allow correct build cache behaviour across different platforms