Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3272] Android: Build Scripts for Platform Specific Resources Don't Respect ignoreDirs and ignoreFiles

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-08-19T10:53:10.000+0000
Affected Version/sRelease 1.7.0, Release 1.6.2, Release 1.7.1
Fix Version/sSprint 2011-32, Release 1.8.0
ComponentsAndroid
Labelsn/a
ReporterDawson Toth
AssigneeBill Dawson
Created2011-04-15T03:41:02.000+0000
Updated2011-09-23T16:09:42.000+0000

Description

Problem

The Android build scripts aren't respecting the ignoreDirs and ignoreFiles builder.py when the platform specific resources are copied over.

Steps to Reproduce

  1. Create an app
  2. In the app, create a folder ".svn" in "Resources/android/images/res-long-land-hdpi".
  3. Create a file named "junk.js" with the contents "I am not valid JavaScript".
  4. Build the project, and you should see that the .svn folder get renamed to a string of characters + .svn and its contents are included in the generated output.

Trace Level Log

[DEBUG] /Library/androidsdk/platforms/android-4/tools/aapt package -m -J /Code/PlaygroundMobile/build/android/gen -M /Code/PlaygroundMobile/build/android/AndroidManifest.xml -S /Code/PlaygroundMobile/build/android/res -I /Library/androidsdk/platforms/android-4/android.jar
[WARN]     (skipping (null) file '/Code/PlaygroundMobile/build/android/res/drawable-long-land-hdpi/_3fad5f03a1.ds_store')
[WARN]     (skipping (null) file '/Code/PlaygroundMobile/build/android/res/drawable-long-land-hdpi/_svn_haha_9029eff9fd.js')
[WARN] For your density-specific images (android/images/high|medium|low|res-*) to be effective, you should put a <supports-screens> element with anyDensity="true" in the <android><manifest> section of your tiapp.xml or in a custom AndroidManifest.xml

Tested On

Titanium SDK version: 1.7.0 (03/03/11 10:45 87a2113...)

Associated Helpdesk Ticket

http://developer.appcelerator.com/helpdesk/view/76276">http://developer.appcelerator.com/helpdesk/view/76276

Comments

  1. Paul Dowsett 2011-07-07

    This has also been reported again in TC-113, and discussed in [Mobile SDK conflict with SVN](http://developer.appcelerator.com/question/120708/mobile-sdk-conflict-with-svn) and [Excluding .svn files](http://developer.appcelerator.com/question/114541/excluding-svn-files) (contains possible code fix)
  2. Paul Dowsett 2011-07-07

    Note possibly related: TIMOB-3021
  3. Paul Dowsett 2011-07-22

    Another user has expressed their need for a fix for this, in [Mobile SDK conflict with SVN](http://developer.appcelerator.com/question/120708/mobile-sdk-conflict-with-svn#answer-214015)
  4. Bill Dawson 2011-08-09

    Pull request ready: https://github.com/appcelerator/titanium_mobile/pull/354 Testing notes: * Failcase above is good to test with. * If you test the failcase first, then use the same project to test the fixed version, you'll want to do the following before building your test app with the fixed version:
       > touch tiapp.xml
       > rm -r build/android/*
       
    That cleans out the bad stuff that got in there during the failcase test.
  5. Opie Cyrus 2011-08-19

    PR work
  6. Natalie Huynh 2011-09-23

    Tested with 1.8.0.v20110922234950 After compiling check the /build/android/res/drawable-long-land-hdpi directory to make sure you dont have a _svn_junk_.js the original directory does not get renamed

JSON Source