Package nl.colorize.gradle.application
Class AppHelper
java.lang.Object
nl.colorize.gradle.application.AppHelper
Utility class with shared logic between the different tasks and sub-plugins.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidcleanDirectory(File dir) Makes sure the application bundle directory is empty before we start.static StringgetEnvironmentVariable(String name) static FilegetLibsDir(org.gradle.api.Project project) static FilegetOutputDir(org.gradle.api.Project project, String name) static FilegetProjectDir(org.gradle.api.Project project, String name) static FilegetProjectFile(org.gradle.api.Project project, String name) static StringloadResourceFile(String path) static Filestatic voidstatic voidstatic StringrewriteTemplate(String templatePath, Map<String, String> placeholders) Loads a template from the specified classpath resource, then rewrites the placeholders in the template using the actual values.
-
Method Details
-
requireWindows
public static void requireWindows() -
requireMac
public static void requireMac() -
getLibsDir
-
check
-
getEnvironmentVariable
-
getProjectDir
-
getProjectFile
-
getOutputDir
-
cleanDirectory
Makes sure the application bundle directory is empty before we start. This is necessary because Gradle uses very aggressive caching, and JLink will not work unless the directory is empty. -
walk
-
mkdir
-
loadResourceFile
-
rewriteTemplate
Loads a template from the specified classpath resource, then rewrites the placeholders in the template using the actual values. The placeholders should use the format "{{name}}".
-