chavanshashank / parallel-tasks-gradle-plugin

Concurrent execution of gradle tasks in the same module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parallel Task Execution Gradle Plugin

Build Status License Coverage Status Download

This plugin allows tasks that are defined within the same module to be executed in parallel (as specified in the parallelTasks configuration). It should not be confused with the --parallel option that allows tasks from separate projects in a decoupled multi-project build to be executed in parallel.

Usage

Add the dependency to your build script

buildscript {
    repositories {
        maven {
            url  "http://dl.bintray.com/barryearles/maven" 
        }
    }

    dependencies {
        classpath "com.github.paralleltasks:parallel-tasks-gradle-plugin:1.0.1"
    }
}

Apply the plugin

apply plugin: 'com.github.paralleltasks'

After applying the plugin, a new task named runParallelTasks is now available

$ ./gradlew tasks
:tasks

...

Other tasks
-----------
runParallelTasks - Provides the ability to execute tasks in parallel

Configure the tasks that you wish to be executed in parallel

task webpackDevServer << {
    // Start Webpack Dev Server
}

task browsersyncServer << {
    // Start Browsersync Server
}

parallelTasks {
    taskNames = [
        "browsersyncServer",
        "webpackDevServer",
        "bootRun"  // Task provided by "spring-boot" gradle plugin (e.g. apply plugin: 'spring-boot')
    ]
}

Execute the tasks in parallel

./gradlew runParallelTasks

Building from Source

./gradlew clean build

About

Concurrent execution of gradle tasks in the same module

License:Apache License 2.0


Languages

Language:Groovy 76.1%Language:Java 23.9%