diff --git a/README.md b/README.md index 5d7eb1d..869ccf2 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,35 @@ You have to add the following configuration to enable build-time instrumentation ``` Note that if you are using continuations with Java 1.8 lambdas then you need to add [Tascalate JavaFlow instrumentation agent](https://github.com/vsilaev/tascalate-javaflow/releases/download/2.7.3/javaflow.instrument-continuations.jar) at run-time as command-line option, while lambda-related classes are generated by JVM on the fly and there is no other way to instrument them. If this is not an option, then you can de-sugar all lambdas with [RetroLambda](https://github.com/luontola/retrolambda) Maven plugin at build-time (RetroLambda output is supported by Tascalate JavaFlow 2.3.2 or higher). -Please refer to [pom.xml](https://github.com/vsilaev/tascalate-javaflow-examples/blob/master/net.tascalate.javaflow.examples.common/pom.xml) in examples project for typical Maven configuration - +Please refer to [pom.xml](https://github.com/vsilaev/tascalate-javaflow-examples/blob/master/net.tascalate.javaflow.examples.common/pom.xml) in examples project for typical Maven configuration. + +# Gradle +To use continuations bytecode enhancer with Gradle you need to do the following. +First, specify JavaFlow gradle plugin dependency in `build.gradle`: +```groovy +buildscript { + repositories { + mavenCentral() + } + + dependencies { + classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.3' + } +} +``` +Next, apply the `continuations` plugin and specify the dependency to the `net.tascalate.javaflow.api`: +```groovy +apply plugin: "java" +apply plugin: "continuations" + +repositories { + mavenCentral() +} + +dependencies { + implementation 'net.tascalate.javaflow:net.tascalate.javaflow.api:2.7.3' +} +``` # Ant There is a separate Ant task for applying JavaFlow instrumentation at build-time.