summaryrefslogtreecommitdiff
path: root/android/sdl_android/build.gradle
blob: e4d246c5c79f2a512781fb98216fb94b4a2f521b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
apply plugin: 'com.android.library'

android {
    compileSdkVersion 33
    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 33
        versionCode 23
        versionName new File(projectDir.path, ('/../../VERSION')).text.trim()
        buildConfigField "String", "VERSION_NAME", '\"' + versionName + '\"'
        resValue "string", "SDL_LIB_VERSION", '\"' + versionName + '\"'
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            multiDexEnabled true
        }
        debug {
            testCoverageEnabled = true
            multiDexEnabled true
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    lintOptions {
        abortOnError false
    }

    testOptions {
        unitTests.returnDefaultValues = true
    }

    sourceSets {
        main.java.srcDirs += '../../base/src/main/java'
        androidTest.assets.srcDirs += '../../generator/rpc_spec/'
    }
}

ext { VERSION_NAME = "$project.android.defaultConfig.versionName" }

dependencies {
    api fileTree(dir: 'libs', include: ['*.jar'])
    //api 'com.livio.taskmaster:taskmaster:0.6.0'
    api 'com.smartdevicelink:bson_java_port:1.2.5'
    api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    api 'androidx.annotation:annotation:1.1.0'
    annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.0'

    testImplementation 'junit:junit:4.12'
    testImplementation 'org.mockito:mockito-core:3.0.0'
    androidTestImplementation 'org.mockito:mockito-core:3.0.0'
    androidTestImplementation 'org.mockito:mockito-android:3.0.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
}

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        classpath 'com.vanniktech:gradle-maven-publish-plugin:0.13.0'
    }
}

apply plugin: "com.vanniktech.maven.publish"