SkateSpots/packages/skatespots-nfc/android/build.gradle
SkateSpots 8dcb19eba6 fix(nfc): add androidx.appcompat to the plugin classpath (Capacitor activity)
The APK build failed compiling the plugin: Capacitor's `activity` is an
AppCompatActivity, so the module needs appcompat. Now `npm run android:build`
succeeds, wires skatespots-nfc in, and merges the NFC permission. Still needs a
device test for the actual write.
2026-10-02 14:24:44 +07:00

51 lines
1.4 KiB
Groovy

// SkateSpots NFC writer — a local Capacitor Android plugin.
// Mirrors the official Capacitor plugin template; tune versions to match the
// app's Capacitor major if a build complains.
ext {
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
}
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24"
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
namespace "org.skatespots.nfc"
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
defaultConfig {
minSdk project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
targetSdk project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
}
repositories {
google()
mavenCentral()
}
dependencies {
implementation project(':capacitor-android')
// Capacitor's `activity` is an AppCompatActivity — needed on the classpath.
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
}