apply plugin: 'com.android.application' def getGitHash = { -> def stdout = new ByteArrayOutputStream() exec { commandLine 'git', 'rev-parse', '--short', 'HEAD' standardOutput = stdout } return stdout.toString().trim() } android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "net.heartshield.neustadt" minSdkVersion 23 targetSdkVersion 25 // For fixes, additional digits may be introduced, e.g. versionName "v0.5.9.1" = versionCode 5910 // // Note that each part of a version number is single-digit, // after v0.5.9 comes v0.6.0 so alphanumeric sorting puts them in order. versionCode 7313 versionName "0.7.3" buildConfigField "String", "CODENAME", "\"neustadt\"" buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\"" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } // David: does not help to print Log messages within Android Studio // should be: http://stackoverflow.com/questions/28832144/how-to-turn-on-console-output-in-android-unit-tests testOptions { unitTests.all { // All the usual Gradle options. testLogging { events "passed", "skipped", "failed", "standardOut", "standardError" outputs.upToDateWhen {false} showStandardStreams = true } } } } allprojects { repositories { maven { url "https://jitpack.io" } // for MPAndroidChart jcenter() // for ShawnLin013/NumberPicker } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.3.0' compile 'com.android.support:support-v13:25.3.0' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.github.PhilJay:MPAndroidChart:v3.0.1' compile 'com.shawnlin:number-picker:2.4.3' compile 'com.android.volley:volley:1.0.0' compile 'com.google.code.gson:gson:2.8.0' testCompile 'junit:junit:4.12' compile project(path: ':signal') compile 'com.android.support:gridlayout-v7:25.3.0' }