Kynetics/uf-android-client

View on GitHub
uf-client-service/build.gradle

Summary

Maintainability
Test Coverage
/*
 * Copyright © 2017-2023  Kynetics  LLC
 * 
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 */

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
    compileSdk 31
    defaultConfig {
        applicationId "com.kynetics.uf.service"
        minSdkVersion 19
        //noinspection ExpiredTargetSdkVersion
        targetSdkVersion 30
        versionCode 35
        versionName versionFromGit(project)
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    compileOptions {
        coreLibraryDesugaringEnabled true
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    signingConfigs {
        nxp_platform {
            storePassword "keystore"
            keyAlias "platform_nxp"
            keyPassword "keystore"
            storeFile file('../keystore/public.jks')
            v2SigningEnabled true
            v1SigningEnabled true
        }

        rockchip_platform {
            storePassword "keystore"
            keyAlias "platform_rockchip"
            keyPassword "keystore"
            storeFile file('../keystore/public.jks')
            v2SigningEnabled true
            v1SigningEnabled true
        }

        aosp_platform {
            storePassword "keystore"
            keyAlias "platform_aosp"
            keyPassword "keystore"
            storeFile file('../keystore/public.jks')
            v2SigningEnabled true
            v1SigningEnabled true
        }
    }

    defaultConfig{

        kotlinOptions {
            freeCompilerArgs += [
                    "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"

            ]
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        nxp_platform_key {
            signingConfig signingConfigs.nxp_platform
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            matchingFallbacks = ['release', 'debug']
        }

        rockchip_platform_key {
            signingConfig signingConfigs.rockchip_platform
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            matchingFallbacks = ['release', 'debug']
        }

        aosp_platform_key {
            signingConfig signingConfigs.aosp_platform
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            matchingFallbacks = ['release', 'debug']
        }

        debug{
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.nxp_platform
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation project(":uf-ddiclient")
    if (!System.env.JITPACK)
        compileOnly(project(":os-mock"))
    implementation 'de.psdev.slf4j-android-logger:slf4j-android-logger:1.0.5'
    implementation "androidx.legacy:legacy-support-v4:1.0.0"
    implementation "com.google.android.material:material:1.0.0"
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    androidTestImplementation('androidx.test.espresso:espresso-core:3.4.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation "androidx.appcompat:appcompat:1.3.0"
    implementation "androidx.preference:preference-ktx:1.1.0"
    testImplementation 'junit:junit:4.12'
    implementation project(':uf-client-service:uf-client-service-api')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

    implementation 'com.google.code.gson:gson:2.8.1'
    implementation "com.squareup.retrofit2:retrofit:2.5.0"
    implementation "com.squareup.retrofit2:converter-gson:2.5.0"
    implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
    implementation "com.squareup.okhttp3:okhttp:3.9.0"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.1.1'
    implementation 'androidx.security:security-crypto:1.0.0'
    androidTestImplementation("androidx.test.ext:junit:1.1.1")
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'com.cronutils:cron-utils:9.1.7'
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}