# JNI in gradle for Kotlin/Multiplatform

**URL:** <https://discuss.kotlinlang.org/t/jni-in-gradle-for-kotlin-multiplatform/23892>\
**Category:** Multiplatform\
**Created:** [January 11, 2022, 8:22pm UTC](https://discuss.kotlinlang.org/t/jni-in-gradle-for-kotlin-multiplatform/23892 "2022-01-11T20:22:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelos-project](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/angelos-project/32/9468_2.png) [@angelos-project](https://discuss.kotlinlang.org/u/angelos-project)\
**Post date:** [January 11, 2022, 8:22pm UTC](https://discuss.kotlinlang.org/t/jni-in-gradle-for-kotlin-multiplatform/23892/1 "2022-01-11T20:22:33Z")

</div>

I need to know how to do this in gradle for K/Multiplatform without Android dependencies?

```auto
android {
  ...
  defaultConfig {
    ...
    externalNativeBuild {
      cmake {...}
      // or ndkBuild {...}
    }

    // Similar to other properties in the defaultConfig block,
    // you can configure the ndk block for each product flavor
    // in your build configuration.
    ndk {
      // Specifies the ABI configurations of your native
      // libraries Gradle should build and package with your app.
      abiFilters += listOf("x86", "x86_64", "armeabi", "armeabi-v7a",
                   "arm64-v8a")
    }
  }
  buildTypes {...}
  externalNativeBuild {...}
}

```
