Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16999] Restructure module projects to support parity and shared files

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-08-05T22:26:20.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.3.0
ComponentsCLI
Labelsmodule_build, planning-3.3.0, q1-2014-candidate, qe-manualtest
ReporterJeff English
AssigneeChris Barber
Created2012-07-11T12:43:26.000+0000
Updated2014-08-05T22:26:20.000+0000

Description

Currently a developer has to create 3 different projects (iOS, Android, and MobileWeb), maintain 3 copies of the source, manifest, etc., perform 3 different builds, and then package those 3 builds into a single distributable zip file. A developer should be able to: 1. Create a new module project specifying the platforms to be supported 2. A single folder structure should be created with the assets, documentation, example, build.py, LICENSE, Anvil folder, etc. 3. Separate platform specific folders containing build scripts that reference the common files in the module project root 4. The platform specific build scripts should be able to be run individually This update should also take into consideration hyperloop modules and updating the templates used for creating a new module project. Future enhancements: 5. A packaging script that is called at the end of the build that will combine all of the platform zips into a single zip (TIMOB-17002) 6. The build.py (or other CLI command) should reside in the module root and call each of the platform specific build scripts. (TIMOB-17002)

Comments

  1. Ingo Muschenetz 2014-05-20

    It sounds like most of this will be done in 3.3.0, with perhaps the exception of #4.
  2. Chris Barber 2014-05-20

    Here's the changes between the old module creation and the new module creation: Android Module
       old build script: cd /path/to/myANDROIDmodule && ant
       new build script: cd /path/to/mymodule/android && ant
       
       old output file: /path/to/myANDROIDmodule/dist/myANDROIDmodule-android-1.0.0.zip
       new output file: /path/to/mymodule/android/dist/mymodule-android-1.0.0.zip
       
    BlackBerry Module
       old build script: cd /path/to/myBLACKBERRYmodule && node build.js
       new build script: cd /path/to/mymodule/blackberry && node build.js
       
       old output file: /path/to/myBLACKBERRYmodule/myBLACKBERRYmodule-blackberry-1.0.0.zip
       new output file: /path/to/mymodule/blackberry/mymodule-blackberry-1.0.0.zip
       
    iOS Module
       old build script: cd /path/to/myIOSmodule && python build.py
       new build script: cd /path/to/mymodule/iphone && python build.py
       
       old output file: /path/to/myIOSmodule/myIOSmodule-iphone-1.0.0.zip
       new output file: /path/to/mymodule/iphone/mymodule-iphone-1.0.0.zip
       
    Mobile Web Module
       old build script: cd /path/to/myMOBILEWEBmodule && python build.py
       new bulid script: cd /path/to/mymodule/mobileweb && python build.py
       
       old output file: /path/to/myMOBILEWEBmodule/myMOBILEWEBmodule-mobileweb-1.0.0.zip
       new output file: /path/to/mymodule/mobileweb/mymodule-mobileweb-1.0.0.zip
       
    The only major difference is each platform's build script and output file is in a platform specific subdirectory.
  3. Olga Romero 2014-05-30

    How do we test this?
  4. Chris Barber 2014-05-30

    To test, create a module. Observe the assets, docs, and example directories in the root of the module project that are shared between each platform. Build a module for a platform and observer that the shared resources are bundled with the module.
  5. Olga Romero 2014-05-30

    Tested and verified the fix, following [~cbarber] comment, using Mac osx 10.9.3 Mavericks Appcelerator Studio, build: 3.3.0.201405271647 Titanium SDK, build: 3.3.0.v20140530112513 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-beta npm@1.3.2 titanium@3.3.0-beta titanium-code-processor@1.1.1 Built for ios
       [TRACE] ** BUILD SUCCEEDED **
       

JSON Source