ext { junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1' } 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.agent" compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34 defaultConfig { minSdk project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22 targetSdk project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } 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 project(':capacitor-android') // On-device instrumented test for AgentServiceLocator (#9967). androidTest-only. androidTestImplementation "androidx.test.ext:junit:1.3.0" androidTestImplementation "androidx.test:runner:1.7.0" androidTestImplementation "androidx.test:core:1.7.0" }