updated versions

This commit is contained in:
Mariotaku Lee 2015-12-28 16:06:57 +08:00
parent 54a1bcdc9c
commit 63946e2831
12 changed files with 7 additions and 2309 deletions

View File

@ -38,7 +38,7 @@ android {
dependencies {
apt 'com.bluelinelabs:logansquare-compiler:1.3.4'
apt 'com.hannesdorfmann.parcelableplease:processor:1.0.1'
apt 'com.github.mariotaku.ObjectCursor:processor:0.9.2'
apt 'com.github.mariotaku.ObjectCursor:processor:0.9.3'
compile 'com.android.support:support-annotations:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.bluelinelabs:logansquare:1.3.4'
@ -46,6 +46,6 @@ dependencies {
compile 'com.github.mariotaku.RestFu:library:0.9.8'
compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.1'
compile 'com.github.mariotaku.SQLiteQB:library:0.9.2'
compile 'com.github.mariotaku.ObjectCursor:core:0.9.2'
compile 'com.github.mariotaku.ObjectCursor:core:0.9.3'
compile fileTree(dir: 'libs', include: ['*.jar'])
}

View File

@ -39,5 +39,5 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:1.3.0'
compile 'com.google.android.gms:play-services-wearable:8.3.0'
compile 'com.google.android.gms:play-services-wearable:8.4.0'
}

View File

@ -60,7 +60,7 @@ dependencies {
apt 'com.bluelinelabs:logansquare-compiler:1.3.4'
apt 'com.hannesdorfmann.parcelableplease:processor:1.0.1'
apt 'com.google.dagger:dagger-compiler:2.0.2'
apt "com.github.mariotaku.ObjectCursor:processor:0.9.2"
apt "com.github.mariotaku.ObjectCursor:processor:0.9.3"
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-v13:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
@ -75,7 +75,7 @@ dependencies {
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.4.1'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.pnikosis:materialish-progress:1.7'
compile 'com.squareup.okhttp:okhttp:2.6.0'
compile 'com.squareup.okhttp:okhttp:2.7.0'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.7'
compile 'com.github.johnpersano:supertoasts:1.3.4.1@aar'
compile 'com.github.mariotaku:MessageBubbleView:1.2'
@ -90,7 +90,7 @@ dependencies {
compile 'com.bluelinelabs:logansquare:1.3.4'
compile 'ch.acra:acra:4.7.0'
compile 'org.jraf:android-switch-backport:2.0.1'
compile 'com.fasterxml.jackson.jr:jackson-jr-objects:2.6.3'
compile 'com.github.FasterXML:jackson-jr-trees:5baf62567e'
compile 'com.makeramen:roundedimageview:2.1.1'
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.1'
@ -110,11 +110,10 @@ dependencies {
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3'
compile project(':twidere.component.common')
compile project(':twidere.component.nyan')
compile 'com.github.mariotaku.ObjectCursor:core:0.9.2'
compile 'com.github.mariotaku.ObjectCursor:core:0.9.3'
compile fileTree(dir: 'libs/main', include: ['*.jar'])
provided 'javax.annotation:jsr250-api:1.0'
// googleCompile fileTree(dir: 'libs/google', include: ['*.jar'])
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
}
task svgToDrawable(type: SvgDrawableTask) {

View File

@ -567,11 +567,6 @@
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
</intent-filter>
</receiver>
<!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
</application>

View File

@ -1,109 +0,0 @@
package com.fasterxml.jackson.simple.tree;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonPointer;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.core.TreeNode;
import java.util.Iterator;
abstract class JsonAbstractValue implements TreeNode
{
@Override
public JsonParser.NumberType numberType() {
return null;
}
@Override
public int size() {
return 0;
}
@Override
public boolean isValueNode() {
return false;
}
@Override
public boolean isContainerNode() {
return false;
}
@Override
public boolean isMissingNode() {
return false;
}
@Override
public boolean isArray() {
return false;
}
@Override
public boolean isObject() {
return false;
}
@Override
public TreeNode get(String s) {
return null;
}
@Override
public TreeNode get(int i) {
return null;
}
@Override
public TreeNode path(String s) {
return MISSING;
}
@Override
public TreeNode path(int i) {
return MISSING;
}
@Override
public Iterator<String> fieldNames() {
return null;
}
@Override
public TreeNode at(JsonPointer jsonPointer) {
return null;
}
@Override
public TreeNode at(String s) throws IllegalArgumentException {
return null;
}
@Override
public JsonParser traverse() {
return null;
}
@Override
public JsonParser traverse(ObjectCodec objectCodec) {
return null;
}
private static class JsonMissing extends JsonAbstractValue
{
@Override
public JsonToken asToken()
{
return null;
}
@Override
public boolean isMissingNode()
{
return true;
}
}
protected static final TreeNode MISSING = new JsonMissing();
}

View File

@ -1,60 +0,0 @@
package com.fasterxml.jackson.simple.tree;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.core.TreeNode;
import java.util.Collections;
import java.util.List;
import static com.fasterxml.jackson.core.JsonToken.START_ARRAY;
public class JsonArray extends JsonAbstractValue
{
private final List<TreeNode> values;
public JsonArray()
{
this(Collections.<TreeNode>emptyList());
}
public JsonArray(List<TreeNode> values)
{
this.values = Collections.unmodifiableList(values);
}
@Override
public JsonToken asToken()
{
return START_ARRAY;
}
@Override
public int size()
{
return values.size();
}
@Override
public boolean isContainerNode()
{
return true;
}
@Override
public boolean isArray()
{
return true;
}
@Override
public TreeNode get(int i)
{
return 0 <= i && i < values.size() ? values.get(i) : null;
}
@Override
public TreeNode path(int i)
{
return 0 <= i && i < values.size() ? values.get(i) : MISSING;
}
}

View File

@ -1,26 +0,0 @@
package com.fasterxml.jackson.simple.tree;
import com.fasterxml.jackson.core.JsonToken;
public class JsonBoolean extends JsonAbstractValue
{
public static JsonBoolean TRUE = new JsonBoolean();
public static JsonBoolean FALSE = new JsonBoolean();
private JsonBoolean()
{
}
@Override
public JsonToken asToken()
{
return this == TRUE ? JsonToken.VALUE_TRUE : JsonToken.VALUE_FALSE;
}
@Override
public boolean isValueNode()
{
return true;
}
}

View File

@ -1,74 +0,0 @@
package com.fasterxml.jackson.simple.tree;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import static com.fasterxml.jackson.core.JsonToken.VALUE_NUMBER_FLOAT;
import static com.fasterxml.jackson.core.JsonToken.VALUE_NUMBER_INT;
public class JsonNumber extends JsonAbstractValue
{
private static final Map<Class<? extends Number>, JsonParser.NumberType> NUMBER_TYPES;
static
{
final Map<Class<? extends Number>, JsonParser.NumberType> numberTypes = new HashMap<Class<? extends Number>, JsonParser.NumberType>();
numberTypes.put(Byte.class, JsonParser.NumberType.INT);
numberTypes.put(Short.class, JsonParser.NumberType.INT);
numberTypes.put(Integer.class, JsonParser.NumberType.INT);
numberTypes.put(Long.class, JsonParser.NumberType.LONG);
numberTypes.put(BigInteger.class, JsonParser.NumberType.BIG_INTEGER);
numberTypes.put(Float.class, JsonParser.NumberType.FLOAT);
numberTypes.put(Double.class, JsonParser.NumberType.DOUBLE);
numberTypes.put(BigDecimal.class, JsonParser.NumberType.BIG_DECIMAL);
NUMBER_TYPES = Collections.unmodifiableMap(numberTypes);
}
private final Number _value;
private final JsonParser.NumberType _numberType;
public JsonNumber(Number value)
{
if (!NUMBER_TYPES.containsKey(value.getClass()))
throw new IllegalArgumentException("Unsupported Number type");
this._value = value;
this._numberType = NUMBER_TYPES.get(value.getClass());
}
public Number getValue()
{
return _value;
}
@Override
public JsonToken asToken() {
switch (numberType())
{
case BIG_DECIMAL:
case DOUBLE:
case FLOAT:
return VALUE_NUMBER_FLOAT;
default:
return VALUE_NUMBER_INT;
}
}
@Override
public boolean isValueNode()
{
return true;
}
@Override
public JsonParser.NumberType numberType()
{
return _numberType;
}
}

View File

@ -1,65 +0,0 @@
package com.fasterxml.jackson.simple.tree;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.core.TreeNode;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
public class JsonObject extends JsonAbstractValue
{
private final Map<String, TreeNode> _values;
public JsonObject()
{
this(Collections.<String, TreeNode>emptyMap());
}
public JsonObject(Map<String, TreeNode> values)
{
this._values = Collections.unmodifiableMap(values);
}
@Override
public JsonToken asToken()
{
return JsonToken.START_OBJECT;
}
@Override
public int size()
{
return _values.size();
}
@Override
public boolean isContainerNode()
{
return true;
}
@Override
public boolean isObject()
{
return true;
}
@Override
public Iterator<String> fieldNames()
{
return _values.keySet().iterator();
}
@Override
public TreeNode get(String name)
{
return _values.containsKey(name) ? _values.get(name) : null;
}
@Override
public TreeNode path(String name)
{
return _values.containsKey(name) ? _values.get(name) : MISSING;
}
}

View File

@ -1,32 +0,0 @@
package com.fasterxml.jackson.simple.tree;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.VALUE_STRING;
public class JsonString extends JsonAbstractValue
{
private final String value;
public JsonString(String value)
{
this.value = value;
}
public String getValue()
{
return value;
}
@Override
public JsonToken asToken()
{
return VALUE_STRING;
}
@Override
public boolean isValueNode()
{
return true;
}
}

View File

@ -1,184 +0,0 @@
/*
* Twidere - Twitter client for Android
*
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.fasterxml.jackson.simple.tree;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.TreeCodec;
import com.fasterxml.jackson.core.TreeNode;
import com.fasterxml.jackson.jr.ob.JSON;
import java.io.IOException;
import java.util.AbstractList;
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class SimpleTreeCodec extends TreeCodec {
@Override
public <T extends TreeNode> T readTree(JsonParser jsonParser) throws IOException {
return nodeFrom(JSON.std.anyFrom(jsonParser));
}
private <T extends TreeNode> T nodeFrom(Object value)
{
TreeNode node = null;
if (value instanceof Boolean)
node = ((Boolean) value ? JsonBoolean.TRUE : JsonBoolean.FALSE);
else if (value instanceof Number)
node = new JsonNumber(((Number) value));
else if (value instanceof String)
node = new JsonString((String) value);
else if (value instanceof List) {
List<TreeNode> values = new ArrayList<>();
for (Object el : (List) value) {
values.add(nodeFrom(el));
}
node = new JsonArray(values);
}
else if (value instanceof Object[]) {
List<TreeNode> values = new ArrayList<>();
for (Object el : (Object[]) value) {
values.add(nodeFrom(el));
}
node = new JsonArray(values);
}
else if (value instanceof Map) {
Map<String,TreeNode> values = new LinkedHashMap<>();
for (Map.Entry entry : ((Map<?,?>) value).entrySet()) {
values.put(entry.getKey().toString(), nodeFrom(entry.getValue()));
}
node = new JsonObject(values);
}
return (T) node;
}
@Override
public void writeTree(JsonGenerator jsonGenerator, TreeNode treeNode) throws IOException {
JSON.std.write(valueOf(treeNode), jsonGenerator);
}
private Object valueOf(final TreeNode treeNode)
{
if (treeNode == null)
return null;
else if (treeNode instanceof JsonBoolean)
return treeNode == JsonBoolean.TRUE;
else if (treeNode instanceof JsonNumber)
return ((JsonNumber) treeNode).getValue();
else if (treeNode instanceof JsonString)
return ((JsonString) treeNode).getValue();
else if (treeNode instanceof JsonArray) {
return new AbstractList<Object>() {
@Override
public Object get(int index) {
return valueOf(treeNode.get(index));
}
@Override
public int size() {
return treeNode.size();
}
};
}
else if (treeNode instanceof JsonObject) {
return new AbstractMap<String, Object>() {
@Override
public Set<Entry<String, Object>> entrySet() {
return new AbstractSet<Entry<String,Object>>() {
@Override
public Iterator<Entry<String, Object>> iterator() {
return new Iterator<Entry<String, Object>>() {
final Iterator<String> delegate = treeNode.fieldNames();
@Override
public boolean hasNext() {
return delegate.hasNext();
}
@Override
public Entry<String, Object> next() {
final String key = delegate.next();
return new Entry<String, Object>() {
@Override
public String getKey() {
return key;
}
@Override
public Object getValue() {
return valueOf(treeNode.get(key));
}
@Override
public Object setValue(Object value) {
throw new UnsupportedOperationException();
}
};
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
@Override
public int size() {
return treeNode.size();
}
};
}
};
}
else return treeNode;
}
@Override
public TreeNode createArrayNode() {
return new JsonArray();
}
@Override
public TreeNode createObjectNode() {
return new JsonObject();
}
@Override
public JsonParser treeAsTokens(TreeNode treeNode) {
final TokenBuffer buffer = new TokenBuffer(null, false);
try {
writeTree(buffer, treeNode);
} catch (IOException e) {
}
return buffer.asParser();
}
}