mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 16:27:11 -07:00
More cleanups to jlink, jmod & jpackage operations, options and tests
This commit is contained in:
parent
c7ca0e263d
commit
5da9e4b3a5
9 changed files with 216 additions and 195 deletions
|
@ -97,10 +97,8 @@ public abstract class AbstractToolProviderOperation<T extends AbstractToolProvid
|
|||
* @param files one or more files
|
||||
* @return this operation instance
|
||||
*/
|
||||
@SuppressWarnings({"unchecked"})
|
||||
public T cmdFilesPaths(List<Path> files) {
|
||||
cmdFiles_.addAll(files.stream().map(Path::toFile).map(File::getAbsolutePath).toList());
|
||||
return (T) this;
|
||||
return cmdFilesStrings(files.stream().map(Path::toFile).map(File::getAbsolutePath).toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -207,7 +207,7 @@ public class JlinkOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JlinkOptions modulePath(Path path) {
|
||||
return modulePath(path.toFile());
|
||||
return modulePath(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -268,7 +268,7 @@ public class JlinkOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JlinkOptions output(Path path) {
|
||||
return output(path.toFile());
|
||||
return output(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -70,8 +70,7 @@ public class JmodOperation extends AbstractToolProviderOperation<JmodOperation>
|
|||
* @return this operation instance
|
||||
*/
|
||||
public JmodOperation jmodFile(File file) {
|
||||
jmodFile_ = file.getAbsolutePath();
|
||||
return this;
|
||||
return jmodFile(file.getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -83,7 +82,7 @@ public class JmodOperation extends AbstractToolProviderOperation<JmodOperation>
|
|||
* @return this operation instance
|
||||
*/
|
||||
public JmodOperation jmodFile(Path file) {
|
||||
return jmodFile(file.toFile());
|
||||
return jmodFile(file.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -60,7 +60,7 @@ public class JmodOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions cmds(Path path) {
|
||||
return cmds(path.toFile());
|
||||
return cmds(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -110,7 +110,7 @@ public class JmodOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions config(Path path) {
|
||||
return config(path.toFile());
|
||||
return config(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -152,7 +152,7 @@ public class JmodOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions dir(Path path) {
|
||||
return dir(path.toFile());
|
||||
return dir(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -256,7 +256,7 @@ public class JmodOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions headerFiles(Path path) {
|
||||
return headerFiles(path.toFile());
|
||||
return headerFiles(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -288,7 +288,7 @@ public class JmodOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions legalNotices(Path path) {
|
||||
return legalNotices(path.toFile());
|
||||
return legalNotices(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -320,7 +320,7 @@ public class JmodOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions libs(Path path) {
|
||||
return libs(path.toFile());
|
||||
return libs(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -363,7 +363,7 @@ public class JmodOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions manPages(Path path) {
|
||||
return manPages(path.toFile());
|
||||
return manPages(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -394,7 +394,7 @@ public class JmodOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JmodOptions modulePath(Path path) {
|
||||
return modulePath(path.toFile());
|
||||
return modulePath(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -118,7 +118,7 @@ public class JpackageOperation extends AbstractToolProviderOperation<JpackageOpe
|
|||
}
|
||||
|
||||
public Launcher(String name, Path path) {
|
||||
this(name, path.toFile());
|
||||
this(name, path.toFile().getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
*/
|
||||
@SuppressWarnings("UnusedReturnValue")
|
||||
public JpackageOptions appImage(Path path) {
|
||||
return appImage(path.toFile());
|
||||
return appImage(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -204,7 +204,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions dest(Path path) {
|
||||
return dest(path.toFile());
|
||||
return dest(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -271,7 +271,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions fileAssociationsPaths(List<Path> paths) {
|
||||
return fileAssociations(paths.stream().map(Path::toFile).toList());
|
||||
return fileAssociationsStrings(paths.stream().map(Path::toFile).map(File::getAbsolutePath).toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -316,7 +316,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions icon(Path path) {
|
||||
return icon(path.toFile());
|
||||
return icon(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -354,7 +354,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
*/
|
||||
@SuppressWarnings("UnusedReturnValue")
|
||||
public JpackageOptions input(Path path) {
|
||||
return input(path.toFile());
|
||||
return input(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -386,7 +386,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions installDir(Path path) {
|
||||
return installDir(path.toFile());
|
||||
return installDir(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -472,7 +472,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions licenseFile(Path path) {
|
||||
return licenseFile(path.toFile());
|
||||
return licenseFile(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -634,8 +634,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
*/
|
||||
@SuppressWarnings("UnusedReturnValue")
|
||||
public JpackageOptions macDmgContent(List<File> additionalContents) {
|
||||
put("--mac-dmg-content", String.join(",", additionalContents.stream().map(File::getAbsolutePath).toList()));
|
||||
return this;
|
||||
return macDmgContentStrings(additionalContents.stream().map(File::getAbsolutePath).toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -656,9 +655,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions macDmgContentPaths(List<Path> additionalContents) {
|
||||
put("--mac-dmg-content", String.join(",",
|
||||
additionalContents.stream().map(Path::toFile).map(File::getAbsolutePath).toList()));
|
||||
return this;
|
||||
return macDmgContentStrings(additionalContents.stream().map(Path::toFile).map(File::getAbsolutePath).toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -711,7 +708,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions macEntitlements(Path path) {
|
||||
return macEntitlements(path.toFile());
|
||||
return macEntitlements(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -969,7 +966,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions modulePathPaths(List<Path> paths) {
|
||||
return modulePath(paths.stream().map(Path::toFile).toList());
|
||||
return modulePathStrings(paths.stream().map(Path::toFile).map(File::getAbsolutePath).toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1031,7 +1028,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions resourceDir(Path path) {
|
||||
return resourceDir(path.toFile());
|
||||
return resourceDir(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1084,7 +1081,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions runtimeImage(Path path) {
|
||||
return runtimeImage(path.toFile());
|
||||
return runtimeImage(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1143,7 +1140,7 @@ public class JpackageOptions extends LinkedHashMap<String, String> {
|
|||
* @return this map of options
|
||||
*/
|
||||
public JpackageOptions temp(Path path) {
|
||||
return temp(path.toFile());
|
||||
return temp(path.toFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue