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

android {
  compileSdkVersion 35

  defaultConfig {
    minSdkVersion 24
    targetSdkVersion 35
  }

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

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
  }

  kotlinOptions {
    jvmTarget = "17"
  }

  namespace "com.spacedrive.core"
}

task buildRustCode(type: Exec) {
  workingDir './build-scripts'
  commandLine './build.sh'
}

tasks.named('preBuild').configure {
  dependsOn buildRustCode
}

dependencies {
  implementation project(':expo-modules-core')
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.25"
}
