apply plugin: 'com.android.library'

final int versionMajor = 1
final int versionMinor = 0
final int versionPatch = 0
final int androidVersionCode = 5

final int targetSdk = rootProject.targetSdkVersion;
final int minSdkRed = rootProject.minSdkVersion;
final String semanticVersion = "${versionMajor}.${versionMinor}.${versionPatch}"


dependencies {
    testCompile 'junit:junit:4.12'
    testCompile "org.mockito:mockito-core:1.9.5"
    compile fileTree(include: ['*.jar'], dir: 'libs')
}

ext {
    PUBLISH_GROUP_ID = 'uk.co.alt236'
    PUBLISH_ARTIFACT_ID = 'bluetooth-le-library-android'
    PUBLISH_VERSION = "${semanticVersion}"
}

android {
    compileSdkVersion rootProject.compileSdkVersion
    buildToolsVersion rootProject.buildToolsVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    defaultConfig {
        minSdkVersion minSdkRed
        targetSdkVersion targetSdk
        versionCode androidVersionCode
        versionName semanticVersion
    }

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

// Script from https://github.com/blundell/release-android-library
// execute: ./gradlew clean build generateRelease
apply from: 'https://raw.githubusercontent.com/ArthurHub/release-android-library/master/android-release-jar.gradle'