Skip to content

Instantly share code, notes, and snippets.

View mricefox's full-sized avatar
🎯
Focusing

issac.zeng mricefox

🎯
Focusing
View GitHub Profile
@mricefox
mricefox / gradle-bintray-push.gradle
Created April 27, 2018 04:03
Gradle bintray push script for android and java, must apply gradle-mvn-push.gradle before this file
//add classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0' to buildscript.dependencies
apply plugin: 'com.jfrog.bintray'
bintray {
user = BINTRAY_USER
key = BINTRAY_KEY
configurations = ['archives']
publish = true
override = false
@mricefox
mricefox / gradle-mvn-push.gradle
Created March 26, 2018 11:08
Gradle maven push script for android and java, support publish to maven local
apply plugin: 'maven'
apply plugin: 'signing'
version = VERSION_NAME
group = GROUP
def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}
@mricefox
mricefox / BulkInBundle.java
Last active March 26, 2018 11:13
Put bulk data into bundle
import android.os.Bundle;
import android.text.TextUtils;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.stream.JsonReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@mricefox
mricefox / TimeoutWatcher.java
Last active May 22, 2017 14:01
Android timeout watcher, for multi async tasks which need notification when timed out, inspired by okio.AsyncTimeout
/**
* <p>Author:MrIcefox
* <p>Email:extremetsa@gmail.com
* <p>Description:
* <p>Date:2017/5/22
*/
public class TimeoutWatcher {
private static TimeoutWatcher head;