Skip to content

Commit

Permalink
1.0.3 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
josesamuel committed Sep 27, 2017
1 parent b0a7531 commit f59bca0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface ISampleService {
* No messy **.aidl**, just plain simple **interface**
* Implement the interface directly using intuitive normal java way, instead of extending Stub
* **Fully interoperable with AIDL**. Remoter creates the same serialized data as created by AIDL, so it is fully interoperable with AIDL
* Supports more data types than AIDL, everything supported by Parcelable
* Supports more data types than AIDL, everything supported by Parcel
* Remoter is an **annotation processor** that generates two helper classes during build time -- a client side Proxy and a service side Stub that allows you to wrap your interface and implementation


Expand Down Expand Up @@ -77,6 +77,7 @@ Gradle dependency

```groovy
dependencies {
//Replace "api" with "compile" for pre AndroidStudio 3
api 'com.josesamuel:remoter-annotations:1.0.2'
annotationProcessor 'com.josesamuel:remoter:1.0.2'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.josesamuel
VERSION_NAME=1.0.2
VERSION_NAME=1.0.3
VERSION_CODE=0

POM_DESCRIPTION=Remoter makes developing android remote services intuitive without messing with aidl.
Expand Down
6 changes: 6 additions & 0 deletions remoter/src/main/java/remoter/compiler/RemoterProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.Processor;
import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.TypeElement;
Expand Down Expand Up @@ -50,6 +51,11 @@ public Set<String> getSupportedAnnotationTypes() {
return types;
}

@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latestSupported();
}

/**
* Only one annotation is supported at class level - @{@link Remoter}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ public void writeParamsToStub(VariableElement param, ParamType paramType, String

private String getParcelableClassName(TypeMirror typeMirror) {
if (typeMirror.getKind() != TypeKind.ARRAY) {
return typeMirror.toString();
String pClassName = typeMirror.toString();
int genericStartIndex = pClassName.indexOf('<');
if (genericStartIndex != -1) {
pClassName = pClassName.substring(0, genericStartIndex).trim();
}
return pClassName;
} else {
return getParcelableClassName(((ArrayType) typeMirror).getComponentType());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Created by jmails on 8/20/17.
*/

public class FooParcelable implements Parcelable {
public class FooParcelable<T> implements Parcelable {

public static final Creator<FooParcelable> CREATOR = new Creator<FooParcelable>() {
@Override
Expand Down

0 comments on commit f59bca0

Please sign in to comment.