Don't need every SWC with a version. Just one for the whole SDK would be fine. I proposed just a single one stored in the core. We can modify the build file to just point to the single file instead of doing a path search. See the start of my example [1].
[1] https://github.com/KesslerConsulting/royale-asjs/commit/84262f3a2e56cc6b58ccdf283d039c94fb10cafb -Mark K On Tue, Apr 30, 2019 at 6:42 PM Alex Harui <aha...@adobe.com.invalid> wrote: > > To be more specific: > > Version.as in Flex was included into every class. I do not recommend doing > that in Royale. It didn't have enough value for the cost. > > FlexVersion.as in Flex was used for runtime versioning. Code could use it to > take different paths. I hope we don't need that in Royale. > > The Flex and Royale compilers will put the compiler version in SWFs but do > not put any string in JS output. Someday, the Royale compiler may be > released separately from the SWCs. Royale may stop releasing certain SWCs in > the future if there is no interest in maintaining them. Then we will have to > decide whether to update the version of those SWCs after they are frozen. > Royale SWCs do not carry version information on a per-SWC basis. But in some > future, you could be using some version of the Royale compiler to compile > with SWCs from different versions of the Royale SDKs. > > This version information is defined in the pom for folks using Maven. It is > not defined at all for other build mechanisms (Ant, command-line, IDEs) > because the non-Maven artifacts do not have versions in the file names. > That's on purpose. We want to make it easy for non-Maven users to swap > versions of SDKs. Maven users prioritize explicit dependency information > over swapping of SDK versions. > > In summary, Royale may not be released like Flex where all SWCs are updated > for each release along with a compiler. So I'm not exactly sure what problem > is trying to be solved, but it won't hurt to have a version bead or version > constant. And if someone wants to propose a way to get the compiler to > inject a version string in JS output, that's fine too, but keep in mind that > all of these verions strings might get removed during minification so they > will probably need to be an exported public variable/constant. > > It would be great to have the version automatically updated for each release, > but I think the number of places we currently change are small so having one > more place probably is ok. All it takes is a volunteer to create the PRs or > commit the code. > > My 2 cents, > -Alex > >