Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix refaster compilation on gradle 5.x #906

Merged
merged 1 commit into from
Sep 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.work.InputChanges;
import org.gradle.api.tasks.incremental.IncrementalTaskInputs;

public class CompileRefasterTask extends JavaCompile {

Expand All @@ -38,12 +38,15 @@ public CompileRefasterTask() {
// Don't care about .class files
setDestinationDir(getTemporaryDir());

// Ensure we hit the non-incremental code-path since we override it
getOptions().setIncremental(false);
// Ensure we hit the incremental code-path since we override it
getOptions().setIncremental(true);
}

@Override
protected final void compile(InputChanges inputs) {
// TODO(forozco): override compile(InputChanges inputs) once we can raise our minimum version 6.0
@SuppressWarnings("deprecated")
protected final void compile(IncrementalTaskInputs inputs) {
getProject().getLogger().warn("Doing compilation - Felipe");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DOING COMPILATION FELIPE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancelled publish to avoid people accidentally getting spammed. I'll try to be better going forward

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... I don't know how I missed this 🤦‍♂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Clear out the default error-prone providers
getOptions().getCompilerArgumentProviders().clear();
getOptions().setCompilerArgs(ImmutableList.of(
Expand Down