Skip to content

Instantly share code, notes, and snippets.

View ArthurSav's full-sized avatar
😎

Arthur ArthurSav

😎
View GitHub Profile
@polbins
polbins / README.md
Last active September 6, 2019 11:08
Android Response Caching using Retrofit 1.9 + OkHttp 2.2

Android REST Controller with Cache-Control

Android REST Controller with Simple Cache Control Headers using Retrofit 1.9.0 + OkHttp 2.2.0

@Nilzor
Nilzor / ApkVersionPostfix.build.gradle
Last active August 29, 2015 14:08
build.gradle snippet for automatically adding version code postfix to APK file name
import javax.xml.xpath.XPathConstants
import javax.xml.xpath.XPathFactory
// Set output filename of APK based on version code from manifest when doing release build
// Note: This script will add a couple of seconds to the build script build time
gradle.projectsEvaluated {
preReleaseBuild.doFirst {
android.applicationVariants.all { variant ->
// Check version number configured in AndroidManifest
if (variant.name != "release") return