123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- plugins {
- id 'com.android.application'
- id 'org.jetbrains.kotlin.android'
- }
- apply plugin: 'kotlin-kapt'
- android {
- compileSdk 32
- defaultConfig {
- applicationId "com.xplora.commonservice"
- minSdk 27
- targetSdk 32
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
- buildFeatures {
- viewBinding = true
- buildConfig = true
- }
- buildTypes {
- debug {
- minifyEnabled false
- zipAlignEnabled false
- shrinkResources false
- buildConfigField "boolean", "LOGGER_DEBUG", "true"
- }
- release {
- buildConfigField "boolean", "LOGGER_DEBUG", "false"
- minifyEnabled true
- zipAlignEnabled true
- shrinkResources true
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- kapt {
- arguments {
- arg("room.schemaLocation", "$projectDir/schemas".toString())
- }
- }
- packagingOptions {
- resources {
- excludes += ['META-INF/DEPENDENCIES']
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_17
- targetCompatibility JavaVersion.VERSION_17
- }
- namespace 'com.xplora.commonservice'
- lint {
- baseline = file("lint-baseline.xml")
- }
- applicationVariants.all { variant ->
- def outputFileDir = "..\\"
- variant.outputs.all {
- def fileName = outputFile.name.replace(outputFile.name, "XPCommonService.apk")
- outputFileName = fileName
- }
- variant.getAssembleProvider().configure() {
- it..doLast {
- File out = new File(outputFileDir)
- copy {
- variant.outputs.forEach { output ->
- copy {
- from output.outputFile
- into out
- }
- }
- }
- }
- }
- }
- }
- //Add this to get SystemProperties
- String SDK_DIR = System.getenv("ANDROID_SDK_HOME")
- if (SDK_DIR == null) {
- Properties properties = new Properties()
- properties.load(new FileInputStream(project.rootProject.file("local.properties")))
- SDK_DIR = properties.get('sdk.dir')
- }
- //Add this to get SystemProperties end
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
- implementation 'com.google.android.material:material:1.4.0'
- implementation 'androidx.appcompat:appcompat:1.4.2'
- implementation 'androidx.core:core-ktx:1.7.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
- implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
- implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
- implementation 'androidx.activity:activity-ktx:1.4.0'
- implementation 'androidx.fragment:fragment-ktx:1.4.1'
- implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation project(path: ':libaws-mqtt-android')
- testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
- //retrofit
- implementation 'com.squareup.retrofit2:retrofit:2.9.0'
- implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
- implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
- implementation 'com.squareup.retrofit2:retrofit-converters:2.5.0'
- implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.10'
- implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
- implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
- //gson
- implementation 'com.google.code.gson:gson:2.9.0'
- //kotlin coroutines
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0"
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0"
- //room
- def roomVersion = "2.4.2"
- implementation("androidx.room:room-runtime:$roomVersion")
- // annotationProcessor("androidx.room:room-compiler:$roomVersion")
- implementation("androidx.room:room-ktx:$roomVersion")
- // To use Kotlin annotation processing tool (kapt)
- kapt("androidx.room:room-compiler:$roomVersion")
- // AWS IOT CORE - MQTT
- // implementation 'com.amazonaws:aws-iot-device-sdk-java:1.3.9'
- // implementation project(path: ':libawsmqtt')
- // implementation project(path: ':libaws-mqtt-android')
- //Add this to get SystemProperties
- compileOnly(files("${SDK_DIR}/platforms/android-24/data/layoutlib.jar"))
- }
|