Skip to content

Commit

Permalink
LPS-55187 Clean test outputs before running it again in order to bypa…
Browse files Browse the repository at this point in the history
…ss the up-to-date check
  • Loading branch information
Ithildir authored and brianchandotcom committed Jun 10, 2015
1 parent 47ecaac commit 59fd9e6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 137 deletions.
1 change: 1 addition & 0 deletions modules/sdk/gradle-plugins-poshi-runner/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<classpathentry kind="lib" path="/portal-master/util-bridges/util-bridges.jar" />
<classpathentry kind="lib" path="/portal-master/util-java/util-java.jar" />
<classpathentry kind="lib" path="/portal-master/util-taglib/util-taglib.jar" />
<classpathentry kind="lib" path="lib/com.liferay.gradle.util.jar" />
<classpathentry kind="lib" path="lib/groovy-all.jar" />
<classpathentry kind="lib" path="lib/org.gradle.gradle-base-services-groovy.jar" />
<classpathentry kind="lib" path="lib/org.gradle.gradle-base-services.jar" />
Expand Down
1 change: 1 addition & 0 deletions modules/sdk/gradle-plugins-poshi-runner/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</publications>

<dependencies defaultconf="default">
<dependency name="com.liferay.gradle.util" org="com.liferay" rev="1.0.6" />
<dependency conf="provided->master" name="groovy-all" org="org.codehaus.groovy" rev="2.3.9" />
<dependency conf="provided->master" name="org.gradle.gradle-base-services" org="com.liferay" rev="2.4" />
<dependency conf="provided->master" name="org.gradle.gradle-base-services-groovy" org="com.liferay" rev="2.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

package com.liferay.gradle.plugins.poshi.runner;

import com.liferay.gradle.plugins.poshi.runner.util.GradleUtil;
import com.liferay.gradle.plugins.poshi.runner.util.OSDetector;
import com.liferay.gradle.util.GradleUtil;
import com.liferay.gradle.util.StringUtil;

import java.io.File;

Expand All @@ -32,6 +33,7 @@
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.artifacts.ResolvableDependencies;
import org.gradle.api.file.FileTree;
import org.gradle.api.plugins.BasePlugin;
import org.gradle.api.reporting.DirectoryReport;
import org.gradle.api.tasks.Copy;
import org.gradle.api.tasks.JavaExec;
Expand All @@ -58,6 +60,8 @@ public class PoshiRunnerPlugin implements Plugin<Project> {

@Override
public void apply(Project project) {
GradleUtil.applyPlugin(project, BasePlugin.class);

final PoshiRunnerExtension poshiRunnerExtension =
GradleUtil.addExtension(
project, "poshiRunner", PoshiRunnerExtension.class);
Expand Down Expand Up @@ -124,8 +128,7 @@ protected void addPoshiRunnerDependenciesPoshiRunner(

GradleUtil.addDependency(
project, CONFIGURATION_NAME, "com.liferay",
"com.liferay.poshi.runner", poshiRunnerExtension.getVersion(),
null);
"com.liferay.poshi.runner", poshiRunnerExtension.getVersion());
}

protected void addPoshiRunnerDependenciesSikuli(
Expand Down Expand Up @@ -153,7 +156,8 @@ else if (OSDetector.isWindows()) {

GradleUtil.addDependency(
project, CONFIGURATION_NAME, "org.bytedeco.javacpp-presets",
"opencv", poshiRunnerExtension.getOpenCVVersion(), classifier);
"opencv", poshiRunnerExtension.getOpenCVVersion(), classifier,
true);
}

protected void addTasksExpandPoshiRunner(Project project) {
Expand All @@ -167,7 +171,10 @@ protected void addTasksRunPoshi(Project project) {
Test test = GradleUtil.addTask(
project, RUN_POSHI_TASK_NAME, Test.class);

test.dependsOn(EXPAND_POSHI_RUNNER_TASK_NAME);
test.dependsOn(
BasePlugin.CLEAN_TASK_NAME +
StringUtil.capitalize(RUN_POSHI_TASK_NAME),
EXPAND_POSHI_RUNNER_TASK_NAME);

test.include("com/liferay/poshi/runner/PoshiRunner.class");

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,20 @@ public static Dependency addDependency(
Project project, String configurationName, String group, String name,
String version, boolean transitive) {

return addDependency(
project, configurationName, group, name, version, null, transitive);
}

public static Dependency addDependency(
Project project, String configurationName, String group, String name,
String version, String classifier, boolean transitive) {

Map<String, Object> dependencyNotation = new HashMap<>();

if (Validator.isNotNull(classifier)) {
dependencyNotation.put("classifier", classifier);
}

dependencyNotation.put("group", group);
dependencyNotation.put("name", name);
dependencyNotation.put("transitive", transitive);
Expand Down

0 comments on commit 59fd9e6

Please sign in to comment.