build.gradle 2.81 KB
Newer Older
Geoffrey Métais's avatar
Geoffrey Métais committed
1 2 3
apply plugin: 'com.android.application'

android {
4 5
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
Geoffrey Métais's avatar
Geoffrey Métais committed
6 7

    lintOptions {
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
8 9
        abortOnError false
        disable 'MissingTranslation', 'ExtraTranslation'
Geoffrey Métais's avatar
Geoffrey Métais committed
10 11 12 13 14 15
    }

    defaultConfig {
        applicationId "org.videolan.vlc"
        minSdkVersion 7
        targetSdkVersion 21
16 17 18 19 20 21 22 23 24 25

        //Set the build ABI according to build types
        tasks.whenTaskAdded { task ->
            if (task.name.startsWith('assemble')) {
                if (task.name.endsWith('Debug'))
                    task.dependsOn(":libvlc:buildDebugARM")
                else if (task.name.endsWith('Debugx86'))
                    task.dependsOn(":libvlc:buildDebugx86")
            }
        }
Geoffrey Métais's avatar
Geoffrey Métais committed
26 27
    }

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
28
    signingConfigs {
Geoffrey Métais's avatar
Geoffrey Métais committed
29 30 31 32 33 34 35 36 37 38 39

        release {
            /*
            To set this properties, create file gradle.properties with these 3 props.
            e.g.
            keyStoreFile=/home/<username>/.android/debug.keystore
            storealias=androiddebugkey
            storepwd=android
             */
            storeFile file(keyStoreFile)
            keyAlias storealias
40 41 42 43 44 45 46
            if (System.getenv('PASSWORD_KEYSTORE') != null){
                storePassword = System.getenv('PASSWORD_KEYSTORE')
                keyPassword = System.getenv('PASSWORD_KEYSTORE')
            } else {
                storePassword storepwd
                keyPassword storepwd
            }
Geoffrey Métais's avatar
Geoffrey Métais committed
47 48 49 50 51 52
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
53 54 55
            minifyEnabled true
            shrinkResources true
            proguardFile 'proguard.cfg'
Geoffrey Métais's avatar
Geoffrey Métais committed
56
        }
Geoffrey Métais's avatar
Geoffrey Métais committed
57 58 59
        debug {
            applicationIdSuffix ".debug"
        }
60
        debugx86.initWith(debug)
Geoffrey Métais's avatar
Geoffrey Métais committed
61
    }
62 63 64 65 66
    productFlavors {
        vanilla {
            applicationId "org.videolan.vlc"
        }
        tv {
67
            applicationId "org.videolan.vlc.tv"
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
            minSdkVersion 17
        }
    }

    sourceSets.main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
    }
    sourceSets.tv {
        manifest.srcFile 'tv/AndroidManifest.xml'
        java.srcDirs = ['tv/src']
        resources.srcDirs = ['tv/src']
        aidl.srcDirs = ['tv/src']
        renderscript.srcDirs = ['tv/src']
        res.srcDirs = ['tv/res']
        assets.srcDirs = ['tv/assets']
    }
Geoffrey Métais's avatar
Geoffrey Métais committed
90 91 92
}

dependencies {
93
    compile project(':WheelView')
94
    compile project(':libvlc')
95 96
    compile 'com.android.support:appcompat-v7:21.0.+'
    compile 'com.android.support:cardview-v7:21.0.+'
97
    compile 'com.android.support:recyclerview-v7:21.0.+'
98
    tvCompile 'com.android.support:leanback-v17:21.0.+'
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
99
}