Package com.iizix.run.common
Class CommonBuilder
java.lang.Object
com.iizix.run.common.CommonBuilder
Static class for common builder routines.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final StringName of the "app" directory below the OS directory of the build machine.- static booleanDebug.The required variables in the text file in an unmutable map.- static booleanVerbose mode.npm
- Constructor SummaryConstructorsConstructorDescription- CommonBuilder- (BuildEnvironment environment, RuntimeBuilderSettings settings, File buildOutputDir, int uniqueID, IPropProgressMonitor monitor, ICommonJobCreator jobCreator, IPrintAdapter printer) Constructor with the build settings.- CommonBuilder- (RuntimeBuilderSettings settings, IPropProgressMonitor monitor, ICommonJobCreator jobCreator, IPrintAdapter printer, boolean isVerbose) Constructor with the build settings.
- Method SummaryModifier and TypeMethodDescription- cleanupProcesses- (boolean isVerbose) Cleans up after Android ADB and Gradle.- createApp- (IPropProgressMonitor monitor, int ticks, CodeModifier codeModifier, List<File> filesBuilt, boolean isVerbose) Creates the application and builds it according to the BuildSettings.- void- dispose()Dispose: kills any ongoing process directly.Returns the directory that eventually needs to be fully cleaned up in remote builds.Gets the directory where to store uploaded files for the remote builder.- protected ICommonJobs- newJob- (int ticks, boolean isVerbose) Create new job.- void- openTerminalWindow- (File dir) Opens a terminal with bash or a command line window under Windows.- static void- performCordovaBuild- (RuntimeBuilderSettings settings, File outputDirForCommandPrompt, List<File> filesBuilt, boolean isVerbose) Performs the building of an Internal Cordova build.
- Field Details- DEBUGpublic static boolean DEBUGDebug.
- VERBOSEpublic static boolean VERBOSEVerbose mode.npm
- textVariablesMapThe required variables in the text file in an unmutable map.
- APP_DIR_NAMEName of the "app" directory below the OS directory of the build machine.- See Also:
 
 
- Constructor Details- CommonBuilderpublic CommonBuilder- (RuntimeBuilderSettings settings, IPropProgressMonitor monitor, ICommonJobCreator jobCreator, IPrintAdapter printer, boolean isVerbose) throws IOException Constructor with the build settings.- Parameters:
- settings- The build settings.
- monitor- The progress monitor.
- jobCreator- The Job creator.
- printer- Print redirector for e.g. console in Eclipse.
- isVerbose- If the build should be verbose or not.
- Throws:
- IOException- For I/O errors.
 
- CommonBuilderpublic CommonBuilder- (BuildEnvironment environment, RuntimeBuilderSettings settings, File buildOutputDir, int uniqueID, IPropProgressMonitor monitor, ICommonJobCreator jobCreator, IPrintAdapter printer) Constructor with the build settings.- Parameters:
- settings- The build settings.
- buildOutputDir- Build output directory.
- uniqueID- A unique ID when building on the server for a client.
- monitor- The progress monitor.
- jobCreator- The Job creator.
- printer- Print redirector for e.g. console in Eclipse.
 
 
- Method Details- performCordovaBuildpublic static void performCordovaBuild- (RuntimeBuilderSettings settings, File outputDirForCommandPrompt, List<File> filesBuilt, boolean isVerbose) Performs the building of an Internal Cordova build.- Parameters:
- settings- The builder settings.
- outputDirForCommandPrompt- Output directory.
- filesBuilt- The built files.
- isVerbose- If the job should be verbose or not.
 
- openTerminalWindowOpens a terminal with bash or a command line window under Windows.- Parameters:
- dir- Current directory.
- Throws:
- InterruptedException
- IOException
 
- getUploadsDirectoryGets the directory where to store uploaded files for the remote builder.- Returns:
- The uploads directory.
- Throws:
- IOException
 
- newJobCreate new job.- Parameters:
- ticks- Number of ticks for the job.
- isVerbose- If the job should be verbose or not.
- Returns:
- The common jobs instance.
 
- getRemoteBuildCleanupDirReturns the directory that eventually needs to be fully cleaned up in remote builds. Files may be locked when a build process has just terminated...- Returns:
- null for none,7 otherwise the directory to clean up.
 
- disposepublic void dispose()Dispose: kills any ongoing process directly.
- cleanupProcessesCleans up after Android ADB and Gradle.- Parameters:
- isVerbose- If the job should be verbose or not.
- Returns:
- Error return string, or null for success.
 
- createApppublic BuildReply createApp- (IPropProgressMonitor monitor, int ticks, CodeModifier codeModifier, List<File> filesBuilt, boolean isVerbose) Creates the application and builds it according to the BuildSettings.- Parameters:
- monitor- Progress monitor, never null.
- ticks- The number of ticks for each build to take from the main progress monitor.
- codeModifier- The instance of the code modifier.
- filesBuilt- The list of files that have been built.
- isVerbose- If the job should be verbose or not.
- Returns:
- The build reply.