Open ursusursus opened 6 years ago
Very blocking issue for my project, since Its a modularization of a existing project I cant just drop it
The library class should be on the classpath according to the comment
So you might want to use api
instead of implementation
scope for your library dependency (but compile
should also work)
I am no that familiar with the new gradle apis. However with implementation
I can use MyLibraryItem inside :app, say new MyLibraryItem() in MainActivity, compilation fails only if its a realm child field
@ursusursus yes, but you need to change it to api
instead of implementation
.
@Zhuinden Yea sorry I forgot to add that to comment, Ive tried the api
also and same error
Its reproducable on moduleExample from realm examples, just add
public class Cow extends RealmObject {
private String name;
private Dog dog;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
and annotationProcessor "dk.ilios:realmfieldnameshelper:1.1.1". Regardless of api project(':moduleExample:library') or implementation
Hi, I am trying to get realm working inside library and app module. I get it working using the example you provide in the docs, separating libraryModule and Realm.getDefaultModule etc. Works.
However if I reference a library model inside a app model like
It will fail at compile time with ClassNotFoundException for MyLibraryItem
AS 3.0 gradle plugin 3.0.0 realm plugin 4.2.0 dk.ilios:realmfieldnameshelper:1.1.1