Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Refactor relationships between Env, App, BuildTools, AppSkeleton #44

Open
townxelliot opened this issue Mar 14, 2014 · 0 comments
Open

Comments

@townxelliot
Copy link
Contributor

The App/Env split seems to get more and more arbitrary as we go along, and there's not really any need for it. Suggest we replace it with a BuildConfig object instead, which combines all the properties from both in one place.

(We could consider moving the xwalkPieces and androidPieces into separate objects with if the BuildConfig object gets too massive.)

Also suggest that we fix the relationships between Env/App and other components:

  • Remove Env object from the BuildTools constructor (nasty sort-of circular dependency anyway).
  • Remove AppSkeleton object from the Env constructor.
  • Move the Env.build() method to a Builder object, which orchestrates between BuildTools and AppSkeleton.
  • Pass a BuildConfig to the Builder.build() method.

This makes BuildConfig entirely declarative. It also gets rid of some incestuous object relations (e.g. BuildTools is created by Env, but needs Env passed to its constructor). It potentially also makes the Builder reusable (it doesn't have a BuildConfig as part of its state, but has that passed to its build() method).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant