Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle is getting stuck after build #1745

Closed
FeodorFitsner opened this issue Aug 22, 2017 · 2 comments
Closed

Gradle is getting stuck after build #1745

FeodorFitsner opened this issue Aug 22, 2017 · 2 comments

Comments

@FeodorFitsner
Copy link
Member

FeodorFitsner commented Aug 22, 2017

Repro: https://github.com/FeodorFitsner/cordova-android

Try using: https://github.com/gradle/gradle/blob/master/gradlew.bat

Windows KB4033989 is the root cause of this issue: https://support.microsoft.com/en-us/help/4033989/description-of-preview-of-quality-rollup-for-the-net-framework-4-6-4-6

@FeodorFitsner FeodorFitsner added this to the 20-August-2017 milestone Aug 22, 2017
@FeodorFitsner FeodorFitsner changed the title Gradle is stuck after build Gradle is getting stuck after build Aug 22, 2017
@FeodorFitsner
Copy link
Member Author

It appears the root cause of Gradle getting stuck is a combination of two factors:

  1. When installing Gradle with Chocolatey a shim (proxy .exe put into bin folder) for gradle.bat is being generated by Chocolatey and then used as gradle command in the build.
  2. Gradle daemon is starting during the build (default Gradle behavior) and hanging there as a child process.

Gradle build spawns child process for daemon and this prevents AppVeyor flow from going further, most probably because of some shim implementation nuances (we'll let Chocolatey team know about that).

To fix the issue and make Gradle work with the current AppVeyor image you have two options:

  1. Use "original" gradle.bat, not Chocolatey shim. Add this to the build (before gradle command) - link:

    set path=C:\ProgramData\chocolatey\lib\gradle\tools\gradle-3.4.1\bin;%path%

  2. disable Gradle daemon in gradle.properties file: https://github.com/FeodorFitsner/cordova-android/blob/master/test/gradle.properties#L19 - without daemon running the build works with or without Chocolatey shim.

@danielschroder
Copy link

Sorry for the long time I was away from the gradle's chocolatey package. Very very busy at work.
I'll look into changing the gradle's installation script in the Chocolatey package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants