Skip to content

Commit

Permalink
nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
forozco committed Sep 26, 2019
1 parent 9e87857 commit 0655782
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.gradle.api.Action;
import org.gradle.api.Task;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.ResolvedArtifact;
import org.gradle.api.provider.Property;
import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.work.InputChanges;

public class RefasterCompileTask extends JavaCompile {

Expand All @@ -44,8 +43,8 @@ public RefasterCompileTask() {
}

@Override
protected void compile() {
// Clear out the default error-prone providers
protected void compile(InputChanges inputs) {
// Clear out the default error-prone providers
getOptions().getCompilerArgumentProviders().clear();
getOptions().setCompilerArgs(ImmutableList.of(
"-Xplugin:BaselineRefasterCompiler --out " + refasterRulesFile.get().getAbsolutePath()));
Expand All @@ -71,7 +70,7 @@ protected void compile() {

if (!javaSources.isEmpty()) {
setSource(javaSources);
super.compile();
super.compile(inputs);
} else {
setDidWork(false);
onlyIf(t -> false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class BaselineErrorProneRefasterIntegrationTest extends AbstractPluginTest {
repositories {
mavenLocal()
jcenter()
// TODO(forozco): figure out why pTML no longer works
maven { url "http://palantir.bintray.com/releases" }
}
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Werror', '-Xlint:deprecation']
Expand All @@ -52,7 +54,7 @@ class BaselineErrorProneRefasterIntegrationTest extends AbstractPluginTest {
'''.stripIndent()

then:
BuildResult result = with('compileJava', '-i', '-PrefasterApply', '-s').build()
BuildResult result = with('compileJava', '-i', '-PrefasterApply').build()
result.task(":compileJava").outcome == TaskOutcome.SUCCESS
file('build/refaster/rules.refaster').exists()
file('src/main/java/test/Test.java').text == '''
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-6.0-20190925220032+0000-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 0655782

Please sign in to comment.