cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Piotrowski (Sujan) (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-13582) Android build process outputs flawed success message
Date Thu, 16 Nov 2017 13:14:00 GMT

    [ https://issues.apache.org/jira/browse/CB-13582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16255266#comment-16255266
] 

Jan Piotrowski (Sujan) edited comment on CB-13582 at 11/16/17 1:13 PM:
-----------------------------------------------------------------------

This is (if I understood the code correctly!) because it only goes through the directory to
look for files that match what should be generated:

https://github.com/apache/cordova-android/blob/55d7cf38654157187c4a4c2b8784191acc97c8ee/bin/templates/cordova/lib/build.js#L152-L153
https://github.com/apache/cordova-android/blob/a1195cefd5ae01f918ddacbf8aedc41d26849b4b/bin/templates/cordova/lib/builders/GenericBuilder.js#L54-L60
https://github.com/apache/cordova-android/blob/a1195cefd5ae01f918ddacbf8aedc41d26849b4b/bin/templates/cordova/lib/builders/GenericBuilder.js#L108-L145

It does not check if the file is actually new.

A solution to this would probably try to track the actually generated files somehow, and not
"just" go through the output folder.

Alternatively, it could check the file creation date (or at least output it for context).

(File created before build process was started? APK can not be the result of this build)


was (Author: sujan12):
This is (if I understood the code correctly!) because it only goes through the directory to
look for files that match what should be generated:

https://github.com/apache/cordova-android/blob/55d7cf38654157187c4a4c2b8784191acc97c8ee/bin/templates/cordova/lib/build.js#L152-L153
https://github.com/apache/cordova-android/blob/a1195cefd5ae01f918ddacbf8aedc41d26849b4b/bin/templates/cordova/lib/builders/GenericBuilder.js#L54-L60
https://github.com/apache/cordova-android/blob/a1195cefd5ae01f918ddacbf8aedc41d26849b4b/bin/templates/cordova/lib/builders/GenericBuilder.js#L108-L145

It does not check if the file is actually new.

> Android build process outputs flawed success message
> ----------------------------------------------------
>
>                 Key: CB-13582
>                 URL: https://issues.apache.org/jira/browse/CB-13582
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-android
>    Affects Versions: 6.3.0
>            Reporter: Jan Piotrowski (Sujan)
>            Assignee: Joe Bowser
>
> When you build the Android platform you get a success message similar to this:
> {quote}
> [14:05:41]: ▸ BUILD SUCCESSFUL
> [14:05:41]: ▸ Total time: 3.365 secs
> Built the following apk(s):
> [14:05:42]: ▸ /Users/sujan/.../platforms/android/build/outputs/apk/android-release.apk
> [14:05:42]: ▸ /Users/sujan/.../platforms/android/build/outputs/apk/android-release-unsigned.apk
> {quote}
> Turns out this is (under specific conditions) not really true.
> If the build did not really sign the apk (as the parameters were missing) it still sometimes
outputs the signed apk in this list: If you had a successful build that signed the apk, then
another one that did _not_ you get a success message but the signed apk is still the old one.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message