Skip to content

Commit

Permalink
[sdks] Rename Tool to DownloadableTool
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Feb 20, 2022
1 parent 495d869 commit e9f041b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
*/
public class AbstractTool {
protected final JReleaserContext context;
protected final Tool tool;
protected final DownloadableTool tool;
protected final String name;

public AbstractTool(JReleaserContext context, String name, String version) {
requireNonBlank(version, "'version' must not be blank");
this.name = requireNonBlank(version, "'name' must not be blank");
this.context = context;
this.tool = new Tool(context.getLogger(), name, version, PlatformUtils.getCurrentFull());
this.tool = new DownloadableTool(context.getLogger(), name, version, PlatformUtils.getCurrentFull());
}

public boolean setup() throws ToolException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* @author Andres Almiray
* @since 1.0.0
*/
public class Tool {
public class DownloadableTool {
private static final String BASE_TEMPLATE_PREFIX = "META-INF/jreleaser/tools/";
private static final String DOWNLOAD_URL = "download.url";
private static final String VERSION = "version";
Expand All @@ -66,7 +66,7 @@ public class Tool {
private final Properties properties;
private Path executable;

public Tool(JReleaserLogger logger, String name, String version, String platform) throws ToolException {
public DownloadableTool(JReleaserLogger logger, String name, String version, String platform) throws ToolException {
this.logger = logger;
this.name = name;
this.version = version;
Expand All @@ -75,7 +75,7 @@ public Tool(JReleaserLogger logger, String name, String version, String platform
String key = name + ".properties";
try {
properties = new Properties();
properties.load(Tool.class.getClassLoader()
properties.load(DownloadableTool.class.getClassLoader()
.getResourceAsStream(BASE_TEMPLATE_PREFIX + key));
enabled = properties.containsKey(platform + EXECUTABLE);
if (enabled) {
Expand Down

0 comments on commit e9f041b

Please sign in to comment.