ext {
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
  androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
  androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
  androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
}

buildscript {
  repositories {
    google()
    mavenCentral()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:8.13.0'
  }
}

apply plugin: 'com.android.library'

android {
  namespace "com.aparajita.capacitor.darkmode"
  compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
  defaultConfig {
    minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
    targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
    versionCode 2
    versionName "6.0.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  }
  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
  lintOptions {
    abortOnError false
  }
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
  }
}

repositories {
  google()
  mavenCentral()
}


dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])
  implementation project(':capacitor-android')
  implementation 'androidx.appcompat:appcompat:1.7.1'
  testImplementation "junit:junit:$junitVersion"
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
  implementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
}
