You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 3 modules: app (application module), depends to: basemodule and mylibrary1.
Supposed on basemodule we have these:
package com.test.basemodule;
import org.parceler.Parcel;
@Parcel
public class FieldClassParcel {
}
and
import org.parceler.Parcel;
@Parcel
public class BaseClassParcel {
//it working fine if private, but protected will cause all files recompiled
protected FieldClassParcel testField;
}
Those two class used on app module:
public class ExampleParcel extends BaseClassParcel {
private final String message;
@ParcelFactory
public static ExampleParcel create(String message) {
return new ExampleParcel(message);
}
public ExampleParcel(String message) {
this.message = message;
}
public String getMessage(){
return message;
}
}
Those classes will breaks incremental annotation processor on app module.
Step to repro:
Unzip and open the project.
Run clean build (./gradlew clean app:assembleD)
Change public ABI on LibClass.java
public void method1changed2(){
}
//uncomment this for test public ABI change (incremental), or change the method name `method1`)
// public void method2(){
//
// }
}
Run the project and print the compiled class during kapt process with this command: ./gradlew app:assembleD --debug --Pkapt.verbose=true > log1.txt
The result should be similar with file: incremental-test1.txt on attached file.
the part i: [kapt] Java source files: on module app should contains lot of files.
Change BaseClassParcel field to private
public class BaseClassParcel {
//it working fine if private, but protected will cause all files recompiled
private FieldClassParcel testField;
}
clean the project, and repeat step 1-5. The result of this test will be similar to incremental-test2.txt. the part i: [kapt] Java source files: should be empty in this test.
The files that recompile will be all java source file in the module, including another annotation processor. For a module with large annotated files it taking so long to build.
Hopefully this is clear enough to explain our issue, let me know if you need additional information.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi, i found some cases where parceler breaks the incremental compilation.
I have sample project for this issue:
Parceler-test.zip
There are 3 modules:
app
(application module), depends to: basemodule and mylibrary1.Supposed on basemodule we have these:
and
Those two class used on app module:
Those classes will breaks incremental annotation processor on app module.
Step to repro:
Run the project and print the compiled class during kapt process with this command:
./gradlew app:assembleD --debug --Pkapt.verbose=true > log1.txt
The result should be similar with file: incremental-test1.txt on attached file.
the part
i: [kapt] Java source files:
on module app should contains lot of files.Change BaseClassParcel field to private
i: [kapt] Java source files:
should be empty in this test.The files that recompile will be all java source file in the module, including another annotation processor. For a module with large annotated files it taking so long to build.
Hopefully this is clear enough to explain our issue, let me know if you need additional information.
Thanks.
The text was updated successfully, but these errors were encountered: