Skip to content

Instantly share code, notes, and snippets.

Avatar

Dario Marcato dmarcato

View GitHub Profile
@dmarcato
dmarcato / strip_play_services.gradle
Last active Sep 15, 2020
Gradle task to strip unused packages on Google Play Services library
View strip_play_services.gradle
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
@dmarcato
dmarcato / Main.java
Last active May 21, 2020
De/Serialization of generic SparseArray using Gson library
View Main.java
import android.util.SparseArray;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
public class Main {
public static class MyCustomClass {
public int a;
View build_intellij_sync.gradle
/**
* apply this plugin after doing all dependency and repo stuff. It will create two idea 'libraries' per subproject
* and add them to your .iml files
*
* Forked from https://gist.github.com/360092
*
* Plugin-ified and made to support multiple modules per root build.gradle and multiple build.gradles per idea project.
*/
class IntelliJSync implements Plugin<Project> {
def sep = File.separator
You can’t perform that action at this time.