apply plugin: 'com.android.library'
apply plugin: 'maven'

task androidSourcesJar(type: Jar) {
    classifier = 'sources'
    from android.sourceSets.main.java.srcDirs
    include '**/*.java'
}

artifacts {
    archives androidSourcesJar
}

uploadArchives {
    repositories {
        mavenDeployer {
            pom.version = '0.2.1'
            pom.artifactId = 'react-native-stack-tracer'
            pom.groupId = 'com.github.aoriani'
            repository(url: "http://mobilebuild.homeoffice.wal-mart.com:8081/nexus/content/repositories/hosted") {
                authentication(userName: mavenUser, password: mavenPassword)
            }
        }
    }
}

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"

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

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.walmartlabs.ern:react-native:0.54.0'  // From node_modules
}
