Gretty automatically invokes this task after integration test task, referred in integrationTestTask property of gretty configuration.

Warning
Internal task, please, don’t invoke it on command line!

Effects

  1. Sends "stop" signal to localhost:servicePort (default 9900).

  2. When "stop" signal comes, servlet-container process stops.

  3. Gradle script waits for servlet-container process to complete.

  4. Gradle script continues normal execution of tasks.

Instantiation and extension

The object called appAfterIntegrationTest is actually an instance of AppAfterIntegrationTestTask class, created and configured for you by Gretty. You can instantiate or even extend this class on your own:

apply plugin: 'org.akhikhl.gretty'

import org.akhikhl.gretty.AppAfterIntegrationTestTask

task('MyAfterIntegration', type: AppAfterIntegrationTestTask) {
  // ...
}

class VerySpecialAfterIntegration extends AppAfterIntegrationTestTask {
  // ...
}

task('MyAfterIntegration2', type: VerySpecialAfterIntegration) {
  // ...
}

If you are going to instantiate or extend this task class yourself, make sure you’ve learned it’s properties and methods.