import javax.annotation.Nullable apply plugin: 'com.android.application' static def gitBranch() { def branch = 'GitHub' try { def gitcheck = 'command -v git >/dev/null 2>&1'.execute() gitcheck.waitFor() if (gitcheck.exitValue() == 0) { def proc = 'git rev-parse --abbrev-ref HEAD'.execute() proc.in.eachLine { line -> branch = line } proc.err.eachLine { line -> println line } proc.waitFor() } } catch (Exception e) { // Do nothing println e } branch } def getProperties(String fileName) { final Properties properties = new Properties() def file = file(fileName) if (file.exists()) { file.withInputStream { stream -> properties.load(stream) } } return properties } static def getProperty(@Nullable Properties properties, String name) { return properties.getProperty(name) ?: "$name missing" } android { compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { minSdkVersion 16 targetSdkVersion 28 renderscriptTargetApi 28 vectorDrawables.useSupportLibrary = true applicationId 'com.kabouzeid.gramophone' versionCode 172 versionName '1.3.0' } signingConfigs { release { Properties properties = getProperties('/Users/karim/Documents/PhonographRessources/privatekeys/keystore.properties') storeFile file(getProperty(properties, 'storeFile')) keyAlias getProperty(properties, 'keyAlias') storePassword getProperty(properties, 'storePassword') keyPassword getProperty(properties, 'keyPassword') } } buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } debug { applicationIdSuffix '.debug' versionNameSuffix ' DEBUG (' + gitBranch() + ')' } } packagingOptions { exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' } lintOptions { disable 'MissingTranslation' disable 'InvalidPackage' abortOnError false } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } // Required for IntroActivity dataBinding { enabled = true } } dependencies { implementation 'androidx.core:core:1.0.1' implementation 'androidx.legacy:legacy-support-core-utils:1.0.0' implementation 'androidx.legacy:legacy-support-core-ui:1.0.0' implementation 'androidx.media:media:1.0.1' implementation 'androidx.fragment:fragment:1.0.0' implementation 'androidx.legacy:legacy-support-v13:1.0.0' implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'androidx.gridlayout:gridlayout:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.palette:palette:1.0.0' implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.annotation:annotation:1.0.2' implementation 'androidx.percentlayout:percentlayout:1.0.0' implementation 'androidx.preference:preference:1.0.0' implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.github.kabouzeid:app-theme-helper:1.3.10' implementation 'com.github.kabouzeid:RecyclerView-FastScroll:1.0.16-kmod' implementation 'com.github.kabouzeid:SeekArc:1.2-kmod' implementation 'com.github.kabouzeid:AndroidSlidingUpPanel:3.3.3-kmod' implementation 'com.afollestad.material-dialogs:core:0.9.6.0' implementation 'com.afollestad.material-dialogs:commons:0.9.6.0' implementation 'com.afollestad:material-cab:0.1.12' implementation 'com.github.ksoichiro:android-observablescrollview:1.6.0' implementation 'com.heinrichreimersoftware:material-intro:1.6' implementation 'me.zhanghai.android.materialprogressbar:library:1.4.2' implementation('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0@aar') { transitive = true } implementation 'com.jakewharton:butterknife:10.1.0' annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0' implementation 'com.squareup.retrofit2:retrofit:2.5.0' implementation 'com.squareup.retrofit2:converter-gson:2.5.0' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.anjlab.android.iab.v3:library:1.0.44' implementation 'de.psdev.licensesdialog:licensesdialog:2.0.0' implementation 'com.github.bumptech.glide:glide:3.8.0' implementation 'com.github.bumptech.glide:okhttp3-integration:1.5.0' implementation 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5' implementation 'com.github.AdrienPoupa:jaudiotagger:2.2.3' }