nexmon – Rev 1

Subversion Repositories:
Rev:
apply plugin: 'com.android.application'

def getVersionCode = { ->
    try {
        def stdout = new ByteArrayOutputStream()
        exec {
            commandLine 'git', 'rev-list', '--first-parent', '--count', 'master'
            standardOutput = stdout
        }
        return Integer.parseInt(stdout.toString().trim())
    }
    catch (ignored) {
        return -1;
    }
}

def getVersionName = { ->
    try {
        def stdout = new ByteArrayOutputStream()
        exec {
           // commandLine 'git', 'describe', '--abbrev=4', '--always', '--tags'
           commandLine 'git', 'describe', '--abbrev=4', '--dirty', '--always', '--tags'

            standardOutput = stdout
        }
        return stdout.toString().trim()
    }
    catch (ignored) {
        return null;
    }
}

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.1'

    sourceSets.main {
        jniLibs.srcDir 'src/main/libs' //set libs as .so's location instead of jniLibs
        jni.srcDirs = [] //disable automatic ndk-build call with auto-generated Android.mk
    }

    defaultConfig {
        applicationId "de.tu_darmstadt.seemoo.nexmon"
        minSdkVersion 23
        targetSdkVersion 23
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }

        ndk {
            moduleName "nexpenlib"
        }

        versionCode getVersionCode()
        versionName getVersionName()
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

}

dependencies {
    compile files('libs/RootTools.jar')
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.google.code.gson:gson:2.7'
    compile 'eu.chainfire:libsuperuser:1.0.0.+'
    compile 'com.github.johnkil.print:print:1.3.1'
    compile 'com.nononsenseapps:filepicker:3.1.0'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.google.android.gms:play-services-analytics:9.2.0'
}

apply plugin: 'com.google.gms.google-services'