From 2721dfa198538aac5b745f3a0d327788984756f5 Mon Sep 17 00:00:00 2001 From: virustotalop Date: Sat, 27 Jun 2020 00:24:47 -0700 Subject: [PATCH 1/5] Refactor to builder pattern --- .../java/com/github/ravenlab/AutoGson.java | 72 +++++++++++++---- .../ravenlab/autogson/test/AutoGsonTest.java | 78 +++++++------------ .../ravenlab/autogson/test/foo/FooBar.java | 7 +- .../autogson/test/foo/FooBarChild.java | 12 ++- .../autogson/test/foo/data/ExtraFooData.java | 7 +- .../autogson/test/foo/data/FooData.java | 7 +- 6 files changed, 102 insertions(+), 81 deletions(-) diff --git a/src/main/java/com/github/ravenlab/AutoGson.java b/src/main/java/com/github/ravenlab/AutoGson.java index 72a46a1..1f74fab 100644 --- a/src/main/java/com/github/ravenlab/AutoGson.java +++ b/src/main/java/com/github/ravenlab/AutoGson.java @@ -1,18 +1,24 @@ package com.github.ravenlab; +import java.util.HashMap; +import java.util.Map; + import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonSyntaxException; -public final class AutoGson { +public class AutoGson { + + public static final String AUTO_GSON_CLASS = "auto_gson_class"; - private AutoGson() {} + private Map refactored; - public static String AUTO_GSON_CLASS = "auto_gson_class"; + private AutoGson(Map refactored) { + this.refactored = refactored; + } - public static String toJson(Gson gson, Object obj) - { + public String toJson(Gson gson, Object obj) { JsonElement element = gson.toJsonTree(obj); JsonObject jsonObject = element.getAsJsonObject(); String className = obj.getClass().getName(); @@ -20,24 +26,62 @@ public static String toJson(Gson gson, Object obj) String json = gson.toJson(jsonObject); return json; } - + @SuppressWarnings("unchecked") - public static T fromJson(Gson gson, String json) throws JsonSyntaxException, ClassNotFoundException - { - try - { + public T fromJson(Gson gson, String json) throws JsonSyntaxException{ + try { JsonObject jsonObject = gson.fromJson(json, JsonObject.class); JsonElement classElement = jsonObject.get(AUTO_GSON_CLASS); String className = classElement.getAsString(); + Class clazz = null; + try { + if(this.classExists(className)) { + clazz = Class.forName(className); + } else { + String refactoredClassName = this.refactored.get(className); + if(refactoredClassName != null && this.classExists(refactoredClassName)) { + clazz = Class.forName(refactoredClassName); + } + } + } catch (ClassNotFoundException e) {} + + if(clazz == null) { + return null; + } + jsonObject.remove(AUTO_GSON_CLASS); - Class clazz = Class.forName(className); Object fromJsonGeneric = gson.fromJson(jsonObject, clazz); T fromJson = (T) fromJsonGeneric; return fromJson; - } - catch(JsonSyntaxException ex) - { + } catch(JsonSyntaxException ex) { throw(ex); } } + + private boolean classExists(String className) { + try { + Class.forName(className); + return true; + } catch (ClassNotFoundException e) { + return false; + } + } + + public static class Builder { + + private Map refactored; + + public Builder() { + this.refactored = new HashMap<>(); + } + + public Builder addRefactoredClass(String mapFrom, String mapTo) { + this.refactored.put(mapFrom, mapTo); + return this; + } + + public AutoGson build() { + return new AutoGson(refactored); + } + } } \ No newline at end of file diff --git a/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java b/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java index df45500..d0e18bd 100644 --- a/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java +++ b/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java @@ -17,65 +17,52 @@ public class AutoGsonTest { @Test - public void testToJson() - { + public void testToJson() { Gson gson = new Gson(); FooBar foo = new FooBar(); - String json = AutoGson.toJson(gson, foo); + AutoGson autoGson = new AutoGson.Builder().build(); + String json = autoGson.toJson(gson, foo); JsonObject obj = gson.fromJson(json, JsonObject.class); String autoGsonClass = obj.get(AutoGson.AUTO_GSON_CLASS).getAsString(); assertTrue(autoGsonClass.equals(FooBar.class.getName())); } @Test - public void testFromJson() - { + public void testFromJson() { Gson gson = new Gson(); FooBar orginalFoo = new FooBar(); - String json = AutoGson.toJson(gson, orginalFoo); - try - { - FooBar fooBar = AutoGson.fromJson(gson, json); + AutoGson autoGson = new AutoGson.Builder().build(); + String json = autoGson.toJson(gson, orginalFoo); + + try { + FooBar fooBar = autoGson.fromJson(gson, json); String foo = fooBar.getFoo(); assertTrue(foo.equals("bar")); - } - catch (JsonSyntaxException | ClassNotFoundException e) - { + } catch (JsonSyntaxException e) { e.printStackTrace(); } } @Test(expected = JsonSyntaxException.class) - public void testInvalidJsonDeserialize() throws JsonSyntaxException - { + public void testInvalidJsonDeserialize() throws JsonSyntaxException { Gson gson = new Gson(); String json = "{foo/thing}"; - try - { - AutoGson.fromJson(gson, json); - } - catch (ClassNotFoundException e) - { - e.printStackTrace(); - fail("Class not found exception was thrown"); - } + AutoGson autoGson = new AutoGson.Builder().build(); + autoGson.fromJson(gson, json); } @Test - public void testInheritance() - { + public void testInheritance() { FooBar child = new FooBarChild(); Gson gson = new Gson(); - String json = AutoGson.toJson(gson, child); + AutoGson autoGson = new AutoGson.Builder().build(); + String json = autoGson.toJson(gson, child); - try - { - FooBar foo = AutoGson.fromJson(gson, json); + try { + FooBar foo = autoGson.fromJson(gson, json); assertTrue(foo instanceof FooBarChild); assertTrue(foo instanceof FooBar); - } - catch (JsonSyntaxException | ClassNotFoundException e) - { + } catch (JsonSyntaxException e) { e.printStackTrace(); fail("Class not found or an issue with the original json"); } @@ -86,37 +73,32 @@ public void testInnerCustomClass() { FooBar child = new FooBarChild(); Gson gson = new Gson(); - String json = AutoGson.toJson(gson, child); + AutoGson autoGson = new AutoGson.Builder().build(); + String json = autoGson.toJson(gson, child); - try - { - FooBarChild foo = AutoGson.fromJson(gson, json); + try { + FooBarChild foo = autoGson.fromJson(gson, json); String data = foo.getData().getData(); assertTrue(data.equals("somedata")); - } - catch (JsonSyntaxException | ClassNotFoundException e) - { + } catch (JsonSyntaxException e) { e.printStackTrace(); fail("Class not found or an issue with the original json"); } } @Test - public void testInnerCustomClassChild() - { + public void testInnerCustomClassChild() { FooBar child = new FooBarChild(); Gson gson = new Gson(); - String json = AutoGson.toJson(gson, child); + AutoGson autoGson = new AutoGson.Builder().build(); + String json = autoGson.toJson(gson, child); - try - { - FooBarChild foo = AutoGson.fromJson(gson, json); + try { + FooBarChild foo = autoGson.fromJson(gson, json); FooData fooData = foo.getData(); System.out.println(fooData.getClass().getName()); assertTrue(fooData instanceof ExtraFooData); - } - catch (JsonSyntaxException | ClassNotFoundException e) - { + } catch (JsonSyntaxException e) { e.printStackTrace(); fail("Class not found or an issue with the original json"); } diff --git a/src/test/java/com/github/ravenlab/autogson/test/foo/FooBar.java b/src/test/java/com/github/ravenlab/autogson/test/foo/FooBar.java index 7c86851..1367881 100644 --- a/src/test/java/com/github/ravenlab/autogson/test/foo/FooBar.java +++ b/src/test/java/com/github/ravenlab/autogson/test/foo/FooBar.java @@ -3,13 +3,12 @@ public class FooBar { private String foo; - public FooBar() - { + + public FooBar() { this.foo = "bar"; } - public String getFoo() - { + public String getFoo() { return this.foo; } } \ No newline at end of file diff --git a/src/test/java/com/github/ravenlab/autogson/test/foo/FooBarChild.java b/src/test/java/com/github/ravenlab/autogson/test/foo/FooBarChild.java index 8c84b3e..059bbaf 100644 --- a/src/test/java/com/github/ravenlab/autogson/test/foo/FooBarChild.java +++ b/src/test/java/com/github/ravenlab/autogson/test/foo/FooBarChild.java @@ -7,20 +7,18 @@ public class FooBarChild extends FooBar { private String fooBar; private ExtraFooData fooData; - public FooBarChild() - { + + public FooBarChild() { super(); this.fooBar = "foobar"; this.fooData = new ExtraFooData<>("somedata", "someotherdata"); } - public String getFooBar() - { + public String getFooBar() { return this.fooBar; } - public FooData getData() - { + public FooData getData() { return this.fooData; } -} +} \ No newline at end of file diff --git a/src/test/java/com/github/ravenlab/autogson/test/foo/data/ExtraFooData.java b/src/test/java/com/github/ravenlab/autogson/test/foo/data/ExtraFooData.java index 0ebfce1..3f203cd 100644 --- a/src/test/java/com/github/ravenlab/autogson/test/foo/data/ExtraFooData.java +++ b/src/test/java/com/github/ravenlab/autogson/test/foo/data/ExtraFooData.java @@ -3,13 +3,12 @@ public class ExtraFooData extends FooData { private T extraData; - public ExtraFooData(T data, T extraData) - { + + public ExtraFooData(T data, T extraData) { super(data); } - public T getExtraData() - { + public T getExtraData(){ return this.extraData; } } \ No newline at end of file diff --git a/src/test/java/com/github/ravenlab/autogson/test/foo/data/FooData.java b/src/test/java/com/github/ravenlab/autogson/test/foo/data/FooData.java index 91f7115..8d63ad1 100644 --- a/src/test/java/com/github/ravenlab/autogson/test/foo/data/FooData.java +++ b/src/test/java/com/github/ravenlab/autogson/test/foo/data/FooData.java @@ -3,13 +3,12 @@ public class FooData { private T data; - public FooData(T data) - { + + public FooData(T data){ this.data = data; } - public T getData() - { + public T getData() { return this.data; } } \ No newline at end of file From f08c78830c2d0844d3c3e03c068c89b64deb6632 Mon Sep 17 00:00:00 2001 From: virustotalop Date: Sat, 27 Jun 2020 01:01:34 -0700 Subject: [PATCH 2/5] Add missing refactor unit tests Added missing refactor class path unit tests. --- .../java/com/github/ravenlab/AutoGson.java | 30 +++++---- .../ravenlab/autogson/test/AutoGsonTest.java | 62 ++++++++++++++++++- .../autogson/test/foo/data/package-info.java | 1 - 3 files changed, 78 insertions(+), 15 deletions(-) delete mode 100644 src/test/java/com/github/ravenlab/autogson/test/foo/data/package-info.java diff --git a/src/main/java/com/github/ravenlab/AutoGson.java b/src/main/java/com/github/ravenlab/AutoGson.java index 1f74fab..59c683e 100644 --- a/src/main/java/com/github/ravenlab/AutoGson.java +++ b/src/main/java/com/github/ravenlab/AutoGson.java @@ -34,16 +34,14 @@ public T fromJson(Gson gson, String json) throws JsonSyntaxException{ JsonElement classElement = jsonObject.get(AUTO_GSON_CLASS); String className = classElement.getAsString(); Class clazz = null; - try { - if(this.classExists(className)) { - clazz = Class.forName(className); - } else { - String refactoredClassName = this.refactored.get(className); - if(refactoredClassName != null && this.classExists(refactoredClassName)) { - clazz = Class.forName(refactoredClassName); - } + if(this.classExists(className)) { + clazz = this.getClass(className); + } else { + String refactoredClassName = this.refactored.get(className); + if(this.classExists(refactoredClassName)) { + clazz = this.getClass(refactoredClassName); } - } catch (ClassNotFoundException e) {} + } if(clazz == null) { return null; @@ -58,15 +56,21 @@ public T fromJson(Gson gson, String json) throws JsonSyntaxException{ } } - private boolean classExists(String className) { + private Class getClass(String className) { + if(className == null) { + return null; + } try { - Class.forName(className); - return true; + return Class.forName(className); } catch (ClassNotFoundException e) { - return false; + return null; } } + private boolean classExists(String className) { + return getClass(className) != null; + } + public static class Builder { private Map refactored; diff --git a/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java b/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java index d0e18bd..96a7ca3 100644 --- a/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java +++ b/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java @@ -96,11 +96,71 @@ public void testInnerCustomClassChild() { try { FooBarChild foo = autoGson.fromJson(gson, json); FooData fooData = foo.getData(); - System.out.println(fooData.getClass().getName()); assertTrue(fooData instanceof ExtraFooData); } catch (JsonSyntaxException e) { e.printStackTrace(); fail("Class not found or an issue with the original json"); } } + + @Test + public void testRefactoredClass() { + Gson gson = new Gson(); + FooBar foo = new FooBar(); + AutoGson autoGson = new AutoGson.Builder().build(); + String json = autoGson.toJson(gson, foo); + JsonObject obj = gson.fromJson(json, JsonObject.class); + String className = obj.get(AutoGson.AUTO_GSON_CLASS).getAsString(); + String refactoredClassName = "refactored." + className; + obj.remove(AutoGson.AUTO_GSON_CLASS); + obj.addProperty(AutoGson.AUTO_GSON_CLASS, refactoredClassName); + String newJson = obj.toString(); + AutoGson newAutoGson = new AutoGson + .Builder() + .addRefactoredClass(refactoredClassName, className) + .build(); + FooBar newFoo = newAutoGson.fromJson(gson, newJson); + assertTrue(obj.get(AutoGson.AUTO_GSON_CLASS).getAsString().equals(refactoredClassName)); + assertTrue(newFoo != null); + } + + @Test + public void testNoRefactoredClass() { + Gson gson = new Gson(); + FooBar foo = new FooBar(); + AutoGson autoGson = new AutoGson.Builder().build(); + String json = autoGson.toJson(gson, foo); + JsonObject obj = gson.fromJson(json, JsonObject.class); + String className = obj.get(AutoGson.AUTO_GSON_CLASS).getAsString(); + String refactoredClassName = "refactored." + className; + obj.remove(AutoGson.AUTO_GSON_CLASS); + obj.addProperty(AutoGson.AUTO_GSON_CLASS, refactoredClassName); + String newJson = obj.toString(); + AutoGson newAutoGson = new AutoGson + .Builder() + .build(); + FooBar newFoo = newAutoGson.fromJson(gson, newJson); + assertTrue(newFoo == null); + } + + @Test + public void testDoesNotExistClass() { + Gson gson = new Gson(); + FooBar foo = new FooBar(); + AutoGson autoGson = new AutoGson.Builder().build(); + String json = autoGson.toJson(gson, foo); + JsonObject obj = gson.fromJson(json, JsonObject.class); + String className = obj.get(AutoGson.AUTO_GSON_CLASS).getAsString(); + String refactoredClassName = "refactored." + className; + String refactoredDoesNotExistClassName = refactoredClassName + "DoesNotExist"; + obj.remove(AutoGson.AUTO_GSON_CLASS); + obj.addProperty(AutoGson.AUTO_GSON_CLASS, refactoredDoesNotExistClassName); + String newJson = obj.toString(); + AutoGson newAutoGson = new AutoGson + .Builder() + .addRefactoredClass(refactoredClassName, refactoredDoesNotExistClassName) + .build(); + FooBar newFoo = newAutoGson.fromJson(gson, newJson); + assertTrue(newFoo == null); + } } \ No newline at end of file diff --git a/src/test/java/com/github/ravenlab/autogson/test/foo/data/package-info.java b/src/test/java/com/github/ravenlab/autogson/test/foo/data/package-info.java deleted file mode 100644 index 92c93d4..0000000 --- a/src/test/java/com/github/ravenlab/autogson/test/foo/data/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.github.ravenlab.autogson.test.foo.data; \ No newline at end of file From 6d0e03897774592f23f1c8dcda07be673290d8dc Mon Sep 17 00:00:00 2001 From: virustotalop Date: Sat, 27 Jun 2020 01:09:07 -0700 Subject: [PATCH 3/5] Class loader can now be set --- .../java/com/github/ravenlab/AutoGson.java | 37 ++++++++----------- .../ravenlab/resolver/ClassResolver.java | 25 +++++++++++++ .../ravenlab/autogson/test/AutoGsonTest.java | 18 +++++++++ 3 files changed, 59 insertions(+), 21 deletions(-) create mode 100644 src/main/java/com/github/ravenlab/resolver/ClassResolver.java diff --git a/src/main/java/com/github/ravenlab/AutoGson.java b/src/main/java/com/github/ravenlab/AutoGson.java index 59c683e..0f68ae4 100644 --- a/src/main/java/com/github/ravenlab/AutoGson.java +++ b/src/main/java/com/github/ravenlab/AutoGson.java @@ -3,6 +3,7 @@ import java.util.HashMap; import java.util.Map; +import com.github.ravenlab.resolver.ClassResolver; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -13,9 +14,11 @@ public class AutoGson { public static final String AUTO_GSON_CLASS = "auto_gson_class"; private Map refactored; + private ClassResolver resolver; - private AutoGson(Map refactored) { + private AutoGson(Map refactored, ClassLoader loader) { this.refactored = refactored; + this.resolver = new ClassResolver(loader); } public String toJson(Gson gson, Object obj) { @@ -34,12 +37,12 @@ public T fromJson(Gson gson, String json) throws JsonSyntaxException{ JsonElement classElement = jsonObject.get(AUTO_GSON_CLASS); String className = classElement.getAsString(); Class clazz = null; - if(this.classExists(className)) { - clazz = this.getClass(className); + if(this.resolver.classExists(className)) { + clazz = this.resolver.loadClass(className); } else { String refactoredClassName = this.refactored.get(className); - if(this.classExists(refactoredClassName)) { - clazz = this.getClass(refactoredClassName); + if(this.resolver.classExists(refactoredClassName)) { + clazz = this.resolver.loadClass(refactoredClassName); } } @@ -56,27 +59,14 @@ public T fromJson(Gson gson, String json) throws JsonSyntaxException{ } } - private Class getClass(String className) { - if(className == null) { - return null; - } - try { - return Class.forName(className); - } catch (ClassNotFoundException e) { - return null; - } - } - - private boolean classExists(String className) { - return getClass(className) != null; - } - public static class Builder { private Map refactored; + private ClassLoader loader; public Builder() { this.refactored = new HashMap<>(); + this.loader = this.getClass().getClassLoader(); } public Builder addRefactoredClass(String mapFrom, String mapTo) { @@ -84,8 +74,13 @@ public Builder addRefactoredClass(String mapFrom, String mapTo) { return this; } + public Builder setClassLoader(ClassLoader loader) { + this.loader = loader; + return this; + } + public AutoGson build() { - return new AutoGson(refactored); + return new AutoGson(this.refactored, this.loader); } } } \ No newline at end of file diff --git a/src/main/java/com/github/ravenlab/resolver/ClassResolver.java b/src/main/java/com/github/ravenlab/resolver/ClassResolver.java new file mode 100644 index 0000000..4fae112 --- /dev/null +++ b/src/main/java/com/github/ravenlab/resolver/ClassResolver.java @@ -0,0 +1,25 @@ +package com.github.ravenlab.resolver; + +public class ClassResolver { + + private ClassLoader loader; + + public ClassResolver(ClassLoader loader) { + this.loader = loader; + } + + public Class loadClass(String className) { + if(className == null) { + return null; + } + try { + return this.loader.loadClass(className); + } catch (ClassNotFoundException e) { + return null; + } + } + + public boolean classExists(String className) { + return this.loadClass(className) != null; + } +} \ No newline at end of file diff --git a/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java b/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java index 96a7ca3..8fedd80 100644 --- a/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java +++ b/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java @@ -163,4 +163,22 @@ public void testDoesNotExistClass() { FooBar newFoo = newAutoGson.fromJson(gson, newJson); assertTrue(newFoo == null); } + + @Test + public void testSetClassLoader() { + Gson gson = new Gson(); + FooBar orginalFoo = new FooBar(); + AutoGson autoGson = new AutoGson.Builder() + .setClassLoader(this.getClass().getClassLoader()) + .build(); + String json = autoGson.toJson(gson, orginalFoo); + + try { + FooBar fooBar = autoGson.fromJson(gson, json); + String foo = fooBar.getFoo(); + assertTrue(foo.equals("bar")); + } catch (JsonSyntaxException e) { + e.printStackTrace(); + } + } } \ No newline at end of file From 3c711c349abb6949e1e85be72919ec7bc67b8ec0 Mon Sep 17 00:00:00 2001 From: virustotalop Date: Sat, 27 Jun 2020 01:14:41 -0700 Subject: [PATCH 4/5] Explicitly test ClassResolver --- .../ravenlab/autogson/test/AutoGsonTest.java | 3 +- .../autogson/test/ClassResolverTest.java | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 src/test/java/com/github/ravenlab/autogson/test/ClassResolverTest.java diff --git a/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java b/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java index 8fedd80..349f9f9 100644 --- a/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java +++ b/src/test/java/com/github/ravenlab/autogson/test/AutoGsonTest.java @@ -69,8 +69,7 @@ public void testInheritance() { } @Test - public void testInnerCustomClass() - { + public void testInnerCustomClass() { FooBar child = new FooBarChild(); Gson gson = new Gson(); AutoGson autoGson = new AutoGson.Builder().build(); diff --git a/src/test/java/com/github/ravenlab/autogson/test/ClassResolverTest.java b/src/test/java/com/github/ravenlab/autogson/test/ClassResolverTest.java new file mode 100644 index 0000000..597d131 --- /dev/null +++ b/src/test/java/com/github/ravenlab/autogson/test/ClassResolverTest.java @@ -0,0 +1,48 @@ +package com.github.ravenlab.autogson.test; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Before; +import org.junit.Test; + +import com.github.ravenlab.AutoGson; +import com.github.ravenlab.resolver.ClassResolver; + +public class ClassResolverTest { + + private ClassResolver resolver; + + @Before + public void setup() { + this.resolver = new ClassResolver(this.getClass().getClassLoader()); + } + + @Test + public void testClassLoadNotNull() { + Class clazz = this.resolver.loadClass(AutoGson.class.getName()); + assertTrue(clazz != null); + } + + @Test + public void testClassNullString() { + Class clazz = this.resolver.loadClass(null); + assertTrue(clazz == null); + } + + @Test + public void testClassLoadNull() { + Class clazz = this.resolver.loadClass("ThiScLaSsDoEsNoTEXIST"); + assertTrue(clazz == null); + } + + @Test + public void testClassExists() { + assertTrue(this.resolver.classExists(AutoGson.class.getName())); + } + + @Test + public void testClassDoesNotExist() { + assertFalse(this.resolver.classExists("ThiScLaSsDoEsNoTEXIST")); + } +} \ No newline at end of file From d18c2844d0bd842d3362eebaea269d8f703322cf Mon Sep 17 00:00:00 2001 From: virustotalop Date: Sat, 27 Jun 2020 01:16:24 -0700 Subject: [PATCH 5/5] Prepare for 2.0.0 release --- README.md | 4 ++-- build.gradle | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7207a23..eec8ef9 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ repositories { maven { url 'https://jitpack.io' } } -compile 'com.github.ravenlab:autogson:1.0.0' +compile 'com.github.ravenlab:autogson:2.0.0' ``` ### Maven @@ -44,7 +44,7 @@ compile 'com.github.ravenlab:autogson:1.0.0' com.github.ravenlab autogson - 1.0.0 + 2.0.0 ``` diff --git a/build.gradle b/build.gradle index fee809c..2f5e6eb 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { } group = 'com.github.ravenlab' -version = '1.0.0' +version = '2.0.0' repositories { mavenCentral()