[DAEMON-231] @appcd/plugin-titanium: New Titanium Build Pipeline
GitHub Issue | n/a |
---|---|
Type | Epic |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | appcd-plugin-titanium |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2018-02-07T18:11:31.000+0000 |
Updated | 2020-02-13T17:59:10.000+0000 |
Description
The current Titanium build process is duplicated for each target (iOS, Android, Windows). We need to unify this pipeline and allow hooks for platform specific logic to be executed. Things like reading the project file, compiling Alloy, transpiling source, optimizing images, encryption, etc are all common tasks that this pipeline must process.
The idea of the pipeline is implemented as a data structure. The Titanium SDK build then creates the pipeline instance and begins to process the files in the project directory.
The pipeline API will support things like adding a file, removing a file, assign metadata to a file (e.g. encrypted, minified, etc), and in some cases, the entire contents of the file. It will also need to support persisting the state to disk and "diffing" to see if the state of the pipeline has changed.
The idea is the pipeline is created, then the last build state is loaded into the pipeline and "committed" like a git commit. Then we walk the project directory finding files, processing them, and adding them to the pipeline. As the build progresses through the various stages, the state of the pipeline can be drastically changed such as when Alloy compiles views into .js files.
At the end of the build, it can see what changed and figure out what needs to be written to disk. In some cases it's copying a file. In others it's simply writing the new file contents (such as transpiled code) to disk.
The destination may not only be disk. It's possible with LiveView 2 that we ship the new files over the wire to the app or do something like TiShadow.
No comments