|
| 1 | +ext { |
| 2 | + junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' |
| 3 | + androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1' |
| 4 | + androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5' |
| 5 | + androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1' |
| 6 | +} |
| 7 | + |
| 8 | +buildscript { |
| 9 | + repositories { |
| 10 | + google() |
| 11 | + mavenCentral() |
| 12 | + } |
| 13 | + dependencies { |
| 14 | + classpath 'com.android.tools.build:gradle:8.2.1' |
| 15 | + } |
| 16 | +} |
| 17 | + |
| 18 | +apply plugin: 'com.android.library' |
| 19 | + |
| 20 | +android { |
| 21 | + namespace "com.betaflight.plugin.serial" |
| 22 | + compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34 |
| 23 | + defaultConfig { |
| 24 | + minSdk project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24 |
| 25 | + targetSdk project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34 |
| 26 | + versionCode 1 |
| 27 | + versionName "1.0" |
| 28 | + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 29 | + } |
| 30 | + buildTypes { |
| 31 | + release { |
| 32 | + minifyEnabled false |
| 33 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 34 | + } |
| 35 | + } |
| 36 | + lintOptions { |
| 37 | + abortOnError false |
| 38 | + } |
| 39 | + compileOptions { |
| 40 | + sourceCompatibility JavaVersion.VERSION_17 |
| 41 | + targetCompatibility JavaVersion.VERSION_17 |
| 42 | + } |
| 43 | +} |
| 44 | + |
| 45 | +repositories { |
| 46 | + google() |
| 47 | + mavenCentral() |
| 48 | + maven { url 'https://jitpack.io' } |
| 49 | +} |
| 50 | + |
| 51 | +dependencies { |
| 52 | + implementation fileTree(dir: 'libs', include: ['*.jar']) |
| 53 | + implementation project(':capacitor-android') |
| 54 | + implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" |
| 55 | + |
| 56 | + // USB Serial for Android library - provides comprehensive USB-to-serial driver support |
| 57 | + implementation 'com.github.mik3y:usb-serial-for-android:3.8.0' |
| 58 | + |
| 59 | + testImplementation "junit:junit:$junitVersion" |
| 60 | + androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" |
| 61 | + androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" |
| 62 | +} |
0 commit comments