buildscript { repositories { maven { url 'https://maven.fabric.io/public' } mavenCentral() } dependencies { //noinspection GradleDynamicVersion classpath 'io.fabric.tools:gradle:1.+' classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1' } } apply plugin: 'com.android.application' apply plugin: 'io.fabric' apply plugin: 'com.jakewharton.hugo' repositories { maven { url 'https://maven.fabric.io/public' } maven { url "https://jitpack.io" } maven { name 'glide-snapshot' url 'http://oss.sonatype.org/content/repositories/snapshots' } } android { compileSdkVersion 25 buildToolsVersion '25.0.2' defaultConfig { minSdkVersion 16 targetSdkVersion 25 renderscriptTargetApi 25 vectorDrawables.useSupportLibrary = true applicationId "com.kabouzeid.gramophone" versionCode 129 versionName "0.14.1" } buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { applicationIdSuffix '.debug' versionNameSuffix ' DEBUG' ext.enableCrashlytics = false // Disable fabric build ID generation for debug builds } } packagingOptions { exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' } lintOptions { disable 'MissingTranslation' disable 'InvalidPackage' abortOnError false } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') { transitive = true } compile('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.10.4@aar') { transitive = true } compile('com.github.kabouzeid:app-theme-helper:1.3.5') { transitive = true } compile 'com.android.support:support-compat:25.3.0' compile 'com.android.support:support-core-utils:25.3.0' compile 'com.android.support:support-core-ui:25.3.0' compile 'com.android.support:support-media-compat:25.3.0' compile 'com.android.support:support-fragment:25.3.0' compile 'com.android.support:support-v13:25.3.0' compile 'com.android.support:appcompat-v7:25.3.0' compile 'com.android.support:recyclerview-v7:25.3.0' compile 'com.android.support:gridlayout-v7:25.3.0' compile 'com.android.support:cardview-v7:25.3.0' compile 'com.android.support:palette-v7:25.3.0' compile 'com.android.support:design:25.3.0' compile 'com.android.support:support-annotations:25.3.0' compile 'com.android.support:percent:25.3.0' compile 'com.android.support:preference-v7:25.3.0' compile 'com.android.support:preference-v14:25.3.0' compile 'com.afollestad.material-dialogs:core:0.9.4.2@aar' compile 'com.afollestad.material-dialogs:commons:0.9.4.2@aar' compile 'com.afollestad:material-cab:0.1.12@aar' compile 'com.github.ksoichiro:android-observablescrollview:1.6.0' compile 'com.github.kabouzeid:SeekArc:1.2-kmod' compile 'com.github.kabouzeid:AndroidSlidingUpPanel:3.3.0-kmod3' compile 'com.squareup.retrofit2:retrofit:2.2.0' compile 'com.squareup.retrofit2:converter-gson:2.2.0' //noinspection GradleDynamicVersion compile 'com.anjlab.android.iab.v3:library:1.0.+' compile 'de.psdev.licensesdialog:licensesdialog:1.8.1' compile 'com.github.bumptech.glide:glide:3.8.0-SNAPSHOT' compile 'com.github.bumptech.glide:okhttp3-integration:1.5.0-SNAPSHOT' compile 'com.github.kabouzeid:RecyclerView-FastScroll:1.9-kmod' compile 'com.heinrichreimersoftware:material-intro:1.6' compile 'me.zhanghai.android.materialprogressbar:library:1.3.0' compile 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5' compile 'com.jakewharton:butterknife:8.5.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' } // Add support for placeholders in resource files. // Required so that packagename can be referenced in xml. https://code.google.com/p/android/issues/detail?id=69224#c12 def replacePlaceholdersInFile(basePath, fileName, placeholders) { def file = new File(basePath, fileName); if (!file.exists()) { logger.quiet("Unable to replace placeholders in " + file.toString() + ". File cannot be found.") return; } logger.debug("Replacing placeholders in " + file.toString()) logger.debug("Placeholders: " + placeholders.toString()) def content = file.getText('UTF-8') placeholders.each { entry -> content = content.replaceAll("\\\$\\{${entry.key}\\}", entry.value) } file.write(content, 'UTF-8') } afterEvaluate { android.applicationVariants.all { variant -> variant.outputs.each { output -> output.processResources.doFirst { // prepare placeholder map from manifestPlaceholders including applicationId placeholder def placeholders = variant.mergedFlavor.manifestPlaceholders + [applicationId: variant.applicationId] replacePlaceholdersInFile(resDir, 'xml/launcher_shortcuts.xml', placeholders) } } } }