/*
 * Copyright 2015 Frakbot (Sebastiano Poggi and Francesco Pontillo)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.2'

    defaultConfig {
        applicationId "net.frakbot.jumpingbeans.demo"
        minSdkVersion 15
        targetSdkVersion 23

        versionName VERSION_NAME
        versionCode Integer.parseInt(VERSION_CODE)
    }

    signingConfigs {
        release {
            def Properties localProps = new Properties()
            localProps.load(new FileInputStream(file('../local.properties')))
            def Properties keyProps = new Properties()
            assert localProps['keystore.props.file'];
            keyProps.load(new FileInputStream(file(localProps['keystore.props.file'])))
            storeFile file(keyProps["store"])
            keyAlias keyProps["alias"]
            storePassword keyProps["storePass"]
            keyPassword keyProps["pass"]
        }
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':lib')

    compile 'com.android.support:appcompat-v7:23.1.1'
}
