grunt-phonegap
grunt-phonegap copied to clipboard
Remote Build no longer triggering
Prior to 0.13, I would get the following output:
Running "build-phonegap" task
Running "phonegap:build" task
Cleaning ./phonegap-build/
Creating directory tree
Cloning root directory
Cloning .cordova directory
Compiling config.xml
Copying static ./phonegap/config.xml
Adding plugins
Building platforms
Running: phonegap remote build android -V
[phonegap] compressing the app...
[phonegap] uploading the app...
[phonegap] building the app...
[phonegap] Android build complete
No post-build tasks at 'D:\projects\givit-app\node_modules\grunt-phonegap\tasks\build\after\remote\android.js'
Done, without errors.
In 0.13 I get
Running "build-phonegap" task
Running "phonegap:build" task
Skipping platform 'android' (SDK not compatible)
Cleaning ./phonegap-build/
Creating directory tree
Cloning root directory
Cloning .cordova directory
Compiling config.xml
Copying static ./phonegap/config.xml
Adding plugins
Building platforms
Done, without errors.
I would try and fix this myself, but node-inspector is being funny on this machine so I can't step through; and I'm not familiar enough with the source to know exactly where to look.
Can you tell me
- what platform you're running on?
- what platform your remote build is targeting?
@breandr
Windows and targeting android, ios, and win8. I took it back to just try android and I had the same result. Here's the config:
phonegap: {
config: {
root: './app',
config: './phonegap/config.xml',
cordova: './phonegap/.cordova',
path: './phonegap-build/',
platforms: ['android'],
maxBuffer: 200, // You may need to raise this for iOS.
verbose: true,
// Android-only integer version to increase with each release.
// See http://developer.android.com/tools/publishing/versioning.html
versionCode: function () {
return (1);
},
// Android-only options that will override the defaults set by Phonegap in the
// generated AndroidManifest.xml
// See https://developer.android.com/guide/topics/manifest/uses-sdk-element.html
minSdkVersion: function () {
return (10);
},
targetSdkVersion: function () {
return (19);
},
// iOS7-only options that will make the status bar white and transparent
iosWhiteStatusBar: true,
// If you want to use the Phonegap Build service to build one or more
// of the platforms specified above, include these options.
// See https://build.phonegap.com/
remote: {
username: '[email protected],
password: 'xxxxxxxxxxxxx',
platforms: ['android', 'ios', 'winphone']
}
}
}
Thanks @breandr, unfortunately I won't be able to get back to you about this until next week.
I'll send a pull request if I get time.
That would be awesome. I still won't be able to review it until Tuesday, but perhaps one of the other collaborators can merge it and cut a patch release while I'm gone.
So I'm still trying to figure out how to debug grunt tasks. I've been trying Node-inspector using node-debug Gruntfile.js grunt build-phonegap and its opening gruntfile.js through node-inspector and breaking on the first line but I can't get it to break in the phonegap task. What am I doing wrong?
Ok, I found the issue. 163b9ed added reducePlatforms and canBuild to helpers.js which check to see if the current operating system can build each requested target platform. The compatibility object in canBuild uses "windows" to check if the OS is Windows, but my system reported as "win32" (which is odd since I'm on 64 bit).
More importantly though, this check should be skipped for remote builds.
Hey @breandr thanks for tracking that down. By dumb luck we already had a fix in the no-npm-platform branch (#71) that got blocked for a few days due to something entirely unrelated.
https://github.com/logankoester/grunt-phonegap/commit/feb7be60505519165d8b9872f488cbdba8c06664 only solves the first part of this issue, though.
If for example, your win32 host is being blocked by canBuild() while trying to run a remote build for iOS, that is still a problem indeed. I haven't checked yet whether that is the case.