Using the Hosted VS2017 machines for an ionic / cordova build job and no matter what I seem to change it just gets stuck:
Queueing build for platform android w/options: --release,--device,--gradleArg=--no-daemon
Processing res/native for android
add to body class: platform-android
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_172
Welcome to Gradle 4.8!
Here are the highlights of this release:
- Dependency locking
- Maven Publish and Ivy Publish plugins improved and marked stable
- Incremental annotation processing enhancements
- APIs to configure tasks at creation time
For more details see https://docs.gradle.org/4.8/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :wrapper
BUILD SUCCESSFUL in 34s
1 actionable task: 1 executed
I read in the VSTS documentation that the gradle daemon will get stuck so your supposed to add a hook into the after_compile folder
IF EXIST platforms\android platforms\android\gradlew --stop
But that doesn't seem to work either. I've tried removing the code signing in my build.json but that also doesn't seem to help, I've even tried bootstrapping the entire process through npm
npm run cordova -- build android --release --device --gradleArg=--no-daemon
same issue. I've tried Cordova 6.5.0, 7.1.0 and 8.0.0 in my taco.json, same issue. I really feel like it's the gradle daemon getting stuck but the hooks are being ignored, or they were changed and I just can't find what or where they should go now.
Build definition:
{
"badgeEnabled": null,
"buildNumberFormat": null,
"comment": null,
"createdDate": "2018-07-18T15:31:11.333000+00:00",
"demands": null,
"description": null,
"draftOf": null,
"dropLocation": null,
"id": ,
"jobAuthorizationScope": "projectCollection",
"jobCancelTimeoutInMinutes": 5,
"jobTimeoutInMinutes": 60,
"latestBuild": null,
"latestCompletedBuild": null,
"metrics": null,
"name": "Mobile Builds",
"path": "\\project",
"process": {
"phases": [
{
"condition": "succeeded()",
"jobAuthorizationScope": "projectCollection",
"jobCancelTimeoutInMinutes": 1,
"name": "Android",
"refName": "Phase_1",
"steps": [
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "install",
"enabled": true,
"environment": {},
"inputs": {
"command": "install",
"customCommand": "",
"customEndpoint": "",
"customFeed": "",
"customRegistry": "useNpmrc",
"publishEndpoint": "",
"publishFeed": "",
"publishRegistry": "useExternalRegistry",
"verbose": "false",
"workingDir": "WorkDir"
},
"task": {
"definitionType": "task",
"id": "fe47e961-9fa8-4106-8639-368c022d43ad",
"versionSpec": "1.*"
},
"timeoutInMinutes": 0
},
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "gulp sass",
"enabled": true,
"environment": {},
"inputs": {
"command": "custom",
"customCommand": "run gulp -- sass",
"customEndpoint": "",
"customFeed": "",
"customRegistry": "useNpmrc",
"publishEndpoint": "",
"publishFeed": "",
"publishRegistry": "useExternalRegistry",
"verbose": "false",
"workingDir": "WorkDir"
},
"task": {
"definitionType": "task",
"id": "fe47e961-9fa8-4106-8639-368c022d43ad",
"versionSpec": "1.*"
},
"timeoutInMinutes": 0
},
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "Cordova Build android",
"enabled": true,
"environment": {},
"inputs": {
"antBuild": "false",
"archs": "",
"configuration": "release",
"cordovaArgs": "",
"cordovaVersion": "",
"cwd": "WorkDir",
"defaultKeychainPassword": "",
"iosSignMethod": "file",
"iosSigningIdentity": "",
"keyPass": "",
"keystoreAlias": "",
"keystoreFile": "",
"keystorePass": "",
"outputPattern": "bin",
"p12": "",
"p12pwd": "",
"platform": "android",
"provProfile": "",
"provProfileUuid": "",
"removeProfile": "false",
"targetEmulator": "false",
"unlockDefaultKeychain": "false",
"windowsAppx": "",
"windowsOnly": "false",
"windowsPhoneOnly": "false",
"xcodeDeveloperDir": ""
},
"task": {
"definitionType": "task",
"id": "70e94267-15dc-434d-8973-023d766825d7",
"versionSpec": "1.*"
},
"timeoutInMinutes": 0
},
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "Copy Release Notes to Android Build Folder",
"enabled": true,
"environment": {},
"inputs": {
"CleanTargetFolder": "false",
"Contents": "release-notes.txt",
"OverWrite": "false",
"SourceFolder": "WorkDir",
"TargetFolder": "bin/Android/Release",
"flattenFolders": "false"
},
"task": {
"definitionType": "task",
"id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c",
"versionSpec": "2.*"
},
"timeoutInMinutes": 0
},
{
"alwaysRun": false,
"condition": "succeeded()",
"continueOnError": false,
"displayName": "Publish Artifact: Android",
"enabled": true,
"environment": {},
"inputs": {
"ArtifactName": "Android",
"ArtifactType": "Container",
"Parallel": "false",
"ParallelCount": "8",
"PathtoPublish": "WorkDir/bin/Android/Release",
"TargetPath": ""
},
"task": {
"definitionType": "task",
"id": "2ff763a7-ce83-4e1f-bc89-0ae63477cebe",
"versionSpec": "1.*"
},
"timeoutInMinutes": 0
}
],
"target": {
"allowScriptsAuthAccessOption": false,
"executionOptions": {
"type": 0
},
"type": 1
}
}
],
"type": 1
},
"processParameters": {
"additionalProperties": {},
"dataSourceBindings": null,
"inputs": null,
"sourceDefinitions": null
},
"properties": {},
"quality": "definition",
"queue": {
"additionalProperties": {},
"id": 288,
"name": "Hosted VS2017",
"pool": {
"additionalProperties": {},
"id": 10,
"isHosted": true,
"name": "Hosted VS2017"
},
"url": "https://account.visualstudio.com/_apis/build/Queues/288"
},
"queueStatus": "enabled",
"repository": {
"additionalProperties": {},
"checkoutSubmodules": false,
"clean": "false",
"defaultBranch": "refs/heads/master",
"id": "ce667db8-941e-47a6-b191-3cb5cf478f69",
"name": "repo",
"properties": {
"checkoutNestedSubmodules": "false",
"cleanOptions": "0",
"fetchDepth": "0",
"gitLfsSupport": "false",
"labelSources": "0",
"labelSourcesFormat": "$(build.buildNumber)",
"reportBuildStatus": "true",
"skipSyncSource": "false"
},
"rootFolder": null,
"type": "TfsGit",
"url": "https://account.visualstudio.com/project/_git/repo"
},
"revision": 15,
"tags": [],
"triggers": null,
"type": "build",
"uri": "vstfs:///Build/Definition/160",
"url": "https://account.visualstudio.com/guid/_apis/build/Definitions/160?revision=15",
"variableGroups": null,
"variables": {
"system.debug": {
"additionalProperties": {},
"allowOverride": true,
"isSecret": null,
"value": "false"
}
}
}
Our ionic 1 project had a bunch of weird hook scripts in the hooks directory that i think at this point have been implemented in the cordova build process. Cleaning our hooks directory up to only what was necessary fixed this.