Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
buildscript {
repositories {
mavenCentral()
maven { url "https://jfrog.bintray.com/jfrog-jars/" }
}
}

plugins {
id 'java'
id 'java-gradle-plugin'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class DependencyManager extends DefaultTask {
* Target attribute
*/
public static final String TARGET = "target";
public static final String FILENAME = "fileName";
static final String DEFAULT_LOCATION = "dependency-manager";
static final String DEFAULT_DEPENDENCY_BASE_FILE = "base.dependencies";
static final String BASE_CONFIGURATION = "base";
Expand Down Expand Up @@ -162,7 +163,8 @@ private DownloadedDependency copyDependency(ResolvedArtifact artifact,
if (dependencyFromArtifact != null) {
downloadedDependency.setReason(dependencyFromArtifact.getReason());
if (downloadedDependency.getReasons().containsKey(TARGET)) {
final String location = Paths.get(getProject().getBuildDir().toString(), DEFAULT_LOCATION, TARGET, downloadedDependency.getReasons().get(TARGET), downloadedDependency.getProcessedArtifactName()).toString();
final String fileName = downloadedDependency.getReasons().containsKey(FILENAME) ? downloadedDependency.getReasons().get(FILENAME)+"."+downloadedDependency.getExtension() : downloadedDependency.getProcessedArtifactName();
final String location = Paths.get(getProject().getBuildDir().toString(), DEFAULT_LOCATION, TARGET, downloadedDependency.getReasons().get(TARGET), fileName).toString();
getProject().getLogger().debug("moving to custom location: {}", location);
downloadedDependency.setLocation(location);
if (downloadedDependency.getReasons().containsKey(DECOMPRESS)) {
Expand Down
Loading