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' coroutinesVersion = project.hasProperty('coroutinesVersion') ? rootProject.ext.coroutinesVersion : '1.10.2' } apply plugin: 'com.android.library' // Explicitly apply the Kotlin Android plugin. The kotlin-gradle-plugin is on // the root buildscript classpath, but without applying it here AGP 8.13 falls // back to its "built-in Kotlin" compile path (build/intermediates/ // built_in_kotlinc), which compiles the .kt sources but does NOT bundle the // resulting .class files into the *release* library jar. The app's // :app:assembleRelease then links a library AAR with zero plugin classes, so // the Capacitor plugin (and any manifest-declared component) is absent from // the release dex. Applying the standard Kotlin plugin wires Kotlin // compilation into both the debug and release jar-bundling tasks. apply plugin: 'org.jetbrains.kotlin.android' android { namespace = "ai.eliza.plugins.screencapture" compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34 defaultConfig { minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24 targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_21 targetCompatibility JavaVersion.VERSION_21 } kotlinOptions { jvmTarget = "21" } } repositories { google() maven { url = uri(rootProject.ext.has('mavenCentralMirrorUrl') ? rootProject.ext.mavenCentralMirrorUrl : 'https://repo.maven.apache.org/maven2') } mavenCentral() } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':capacitor-android') implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion" testImplementation "junit:junit:$junitVersion" androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" }