apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'

group = 'com.loqalabs.loqaaudiodsp'
version = '0.1.0'

def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useExpoPublishing()

android {
  namespace "com.loqalabs.loqaaudiodsp"
  compileSdkVersion 35

  defaultConfig {
    minSdkVersion 24
    targetSdkVersion 35
    versionCode 1
    versionName "0.1.0"
  }

  buildTypes {
    release {
      minifyEnabled false
    }
  }

  sourceSets {
    main {
      jniLibs.srcDirs = ['src/main/jniLibs']
    }
  }

  packagingOptions {
    pickFirst 'lib/*/libloqa_voice_dsp.so'
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
  }

  kotlinOptions {
    jvmTarget = '17'
  }
}

repositories {
  mavenCentral()
}

dependencies {
  implementation project(':expo-modules-core')
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"

  // Test dependencies
  testImplementation 'junit:junit:4.13.2'
  testImplementation 'org.jetbrains.kotlin:kotlin-test-junit:1.9.0'
}
