1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- ext {
- capacitorVersion = System.getenv('CAPACITOR_VERSION')
- junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
- androidxExifInterfaceVersion = project.hasProperty('androidxExifInterfaceVersion') ? rootProject.ext.androidxExifInterfaceVersion : '1.3.7'
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
- androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.12.0'
- }
- buildscript {
- repositories {
- google()
- mavenCentral()
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:8.7.2'
- if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
- classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
- }
- }
- }
- apply plugin: 'com.android.library'
- if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
- apply plugin: 'io.github.gradle-nexus.publish-plugin'
- apply from: file('../../scripts/android/publish-root.gradle')
- apply from: file('../../scripts/android/publish-module.gradle')
- }
- android {
- namespace "com.capacitorjs.plugins.camera"
- compileSdk 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 1
- versionName "1.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_21
- targetCompatibility JavaVersion.VERSION_21
- }
- publishing {
- singleVariant("release")
- }
- }
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
- implementation "com.capacitorjs:core:$capacitorVersion"
- } else {
- implementation project(':capacitor-android')
- }
- implementation "androidx.exifinterface:exifinterface:$androidxExifInterfaceVersion"
- implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
- implementation "com.google.android.material:material:$androidxMaterialVersion"
- testImplementation "junit:junit:$junitVersion"
- androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
- androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
- }
|