build.gradle 4.71 KB
Newer Older
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
1
apply plugin: 'com.android.application'
2
apply from: 'jacoco.gradle'
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
3 4

project.ext {
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
5 6 7 8 9 10 11 12
    appCompatVersion = "1.0.2"
    supportLibraryVersion = "1.0.0"
    constraintLayoutVersion = "1.1.3"
    materialVersion = "1.1.0-alpha01"
    lifecycleVersion = "2.0.0"
    roomVersion = "2.0.0"
    daggerVersion = "2.17"
    butterKnifeVersion = "9.0.0-rc2"
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
13 14 15 16 17 18 19
    rxJavaVersion = "2.1.0"
    rxAndroidVersion = "2.0.1"
    timberVersion = "4.7.0"
    swaggerParserVersion = "1.0.38"
    gsonVersion = "2.8.0"
    cborVersion = "3.3.0"
    spongyCastleVersion = "1.58.0.0"
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
20
    junitVersion = "4.12"
21
    mockitoVersion = "2.25.1"
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
22 23
    testRunnerVersion = "1.1.1-alpha01"
    espressoVersion = "3.1.1-alpha01"
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
24 25 26
}

android {
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
27
    compileSdkVersion 28
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
28 29 30
    defaultConfig {
        applicationId "org.openconnectivity.otgc"
        minSdkVersion 21
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
31
        targetSdkVersion 28
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
32
        versionCode 13
33
        versionName "2.7.0"
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
34
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
35 36 37 38 39 40 41

        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
    buildTypes {
42 43 44
        debug {
            testCoverageEnabled true
        }
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
45
        release {
46
            testCoverageEnabled true
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
47 48 49 50
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
51 52 53 54 55 56 57
    testOptions {
        unitTests.all {
            jacoco {
                includeNoLocationClasses = true
            }
        }
    }
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
58 59 60 61 62 63
    lintOptions {
        abortOnError false
    }
    productFlavors {
    }
}
64
//./gradlew clean connectedAndroidTest test createDebugCoverageReport jacocoTestReport sonarqube
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
65
dependencies {
66

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
67
    // local modules
68 69 70
    // IoTivity-lite
    implementation files('src/main/jniLibs/iotivity-lite.jar')

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
71 72 73 74 75 76
    // AndroidX: Support Library
    implementation "androidx.appcompat:appcompat:$project.appCompatVersion"
    implementation "androidx.recyclerview:recyclerview:$project.supportLibraryVersion"
    implementation "androidx.recyclerview:recyclerview-selection:$project.supportLibraryVersion"
    implementation "androidx.cardview:cardview:$project.supportLibraryVersion"
    implementation "androidx.legacy:legacy-support-v4:$project.supportLibraryVersion"
77

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
78 79
    // AndroidX: ConstraintLayout
    implementation "androidx.constraintlayout:constraintlayout:$project.constraintLayoutVersion"
80

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
81 82
    // Material Components
    implementation "com.google.android.material:material:$project.materialVersion"
83

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
84 85 86 87
    // AndroidX: Lifecycle
    implementation "androidx.lifecycle:lifecycle-runtime:$project.lifecycleVersion"
    implementation "androidx.lifecycle:lifecycle-extensions:$project.lifecycleVersion"
    annotationProcessor "androidx.lifecycle:lifecycle-compiler:$project.lifecycleVersion"
88

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
89 90 91 92
    // AndroidX: Room
    implementation "androidx.room:room-runtime:$project.roomVersion"
    implementation "androidx.room:room-rxjava2:$project.roomVersion"
    annotationProcessor "androidx.room:room-compiler:$project.roomVersion"
93

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
94
    // Dagger
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
95 96 97 98 99
    implementation "com.google.dagger:dagger:$project.daggerVersion"
    annotationProcessor "com.google.dagger:dagger-compiler:$project.daggerVersion"
    implementation "com.google.dagger:dagger-android:$project.daggerVersion"
    implementation "com.google.dagger:dagger-android-support:$project.daggerVersion"
    annotationProcessor "com.google.dagger:dagger-android-processor:$project.daggerVersion"
100

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
101 102 103
    // ButterKnife
    implementation "com.jakewharton:butterknife:$project.butterKnifeVersion"
    annotationProcessor "com.jakewharton:butterknife-compiler:$project.butterKnifeVersion"
104

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
105 106 107
    // ReactiveX
    implementation "io.reactivex.rxjava2:rxjava:$project.rxJavaVersion"
    implementation "io.reactivex.rxjava2:rxandroid:$project.rxAndroidVersion"
108

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
109 110
    // Timber
    implementation "com.jakewharton.timber:timber:$project.timberVersion"
111

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
112 113
    // Swagger
    implementation "io.swagger:swagger-parser:$project.swaggerParserVersion"
114

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
115 116
    // Gson
    implementation "com.google.code.gson:gson:$project.gsonVersion"
117

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
118 119
    // CBOR
    implementation "com.upokecenter:cbor:$project.cborVersion"
120

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
121
    // Spongy Castle
Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
122 123 124
    implementation "com.madgag.spongycastle:core:$project.spongyCastleVersion"
    implementation "com.madgag.spongycastle:prov:$project.spongyCastleVersion"
    implementation "com.madgag.spongycastle:bcpkix-jdk15on:$project.spongyCastleVersion"
125

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
126 127
    // JUnit
    testImplementation "junit:junit:$project.junitVersion"
128

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
129 130
    // Mockito
    testImplementation "org.mockito:mockito-core:$project.mockitoVersion"
131

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
132 133 134
    // AndroidX: Test
    androidTestImplementation "androidx.test:runner:$project.testRunnerVersion"
    androidTestImplementation "androidx.test.espresso:espresso-core:$project.espressoVersion"
135

Javier Guerra Melgares's avatar
Javier Guerra Melgares committed
136
}