Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

Commit

Permalink
Compiling plugin with Java 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
manupsunny committed Jun 23, 2016
1 parent ccf94d0 commit e0c5b7e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion plugin.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
siteUrl='https://github.com/manupsunny/gauge-gradle-plugin'
gitUrl='https://github.com/manupsunny/gauge-gradle-plugin.git'

version=1.4.3
version=1.4.4
name=gauge-gradle-plugin
description='Gradle plugin for Gauge, the open source test automation tool developed by ThoughtWorks.'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import com.thoughtworks.gauge.gradle.GaugeExtension;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;

import java.io.File;
import java.util.Arrays;
Expand Down Expand Up @@ -114,17 +115,18 @@ private void setClasspath() {
}

private void addRuntimeClasspaths(HashSet<String> classPaths) {
project.getConfigurations().stream()
.filter(configuration -> configuration.getName()
.toLowerCase().endsWith(RUNTIME))
.forEach(configuration -> {
String fileList = configuration.getAsFileTree().getAsPath();
classPaths.addAll(Arrays.asList(fileList.split(File.pathSeparator)));
});
for (Configuration configuration : project.getConfigurations()) {
if(configuration.getName().toLowerCase().endsWith(RUNTIME)){
String fileList = configuration.getAsFileTree().getAsPath();
classPaths.addAll(Arrays.asList(fileList.split(File.pathSeparator)));
}
}
}

private void addBuildClasspaths(HashSet<String> classPaths) {
File classFolders = new File(project.getBuildDir().getAbsolutePath() + CLASSES);
Arrays.stream(classFolders.listFiles()).forEach(file -> classPaths.add(file.getAbsolutePath()));
for (File file : classFolders.listFiles()){
classPaths.add(file.getAbsolutePath());
}
}
}

0 comments on commit e0c5b7e

Please sign in to comment.