hu.blackbelt.flutter.maven.plugin.api.Utils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flutter-maven-plugin
Show all versions of flutter-maven-plugin
Flutter Maven plugin. It can run to flutter tasks
The newest version!
package hu.blackbelt.flutter.maven.plugin.api;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public final class Utils {
public static List merge(List first, List second) {
ArrayList result = new ArrayList(first);
result.addAll(second);
return result;
}
public static List prepend(String first, List list){
return merge(Arrays.asList(first), list);
}
public static String normalize(String path){
return path.replace("/", File.separator);
}
public static String implode(String separator, List elements){
StringBuffer s = new StringBuffer();
for(int i = 0; i < elements.size(); i++){
if(i > 0){
s.append(" ");
}
s.append(elements.get(i));
}
return s.toString();
}
public static boolean isRelative(String path) {
return !path.startsWith("/") && !path.startsWith("file:") && !path.matches("^[a-zA-Z]:\\\\.*");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy