Skip to content
Gradle plugin to move build process to remote machine.
Kotlin Shell
Branch: development
Clone or download
Pull request Compare This branch is 27 commits ahead, 35 commits behind buildfoundation:3.x.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmark Mainframer to Mirakle Sep 12, 2017
docs Add contributing doc Oct 3, 2017
gradle/wrapper Make mirakle work with gradle 4.2+ (#2) Oct 4, 2017
plugin-test Implement fallback (#15) Oct 26, 2017
plugin Release 1.2.0 Oct 28, 2017
.gitignore Mainframer to Mirakle Sep 12, 2017 Mainframer to Mirakle Sep 12, 2017
.travis.yml Mainframer to Mirakle Sep 12, 2017
LICENSE.txt Mainframer to Mirakle Sep 12, 2017 Update Mirakle version in README Oct 28, 2017
build.gradle Release 1.2.0 Oct 28, 2017
gradlew Mainframer to Mirakle Sep 12, 2017
gradlew.bat Mainframer to Mirakle Sep 12, 2017


A Gradle plugin that allows you to move build process from a local machine to a remote one.

Compatible with Gradle 3.3+. Works seamlessly with IntelliJ IDEA and Android Studio.


Remote machine supposed to be much performant than you working machine. Also having a sufficient network bandwidth or small amount of data that your build produce, you gain build speed boost.

How it differs from Mainframer

Mirakle is designed specially for Gradle build system. It works as seamless as possible. Once plugin installed, you workflow will not be different at all.

(It's a good thing to prank your colleague. Imagine his surprise when one day he get several times faster build time.)


  • Put this into USER_HOME/.gradle/init.d/mirakle_init.gradle
initscript {
    repositories {
    dependencies {
        classpath "com.instamotor:mirakle:1.2.0"
apply plugin: Mirakle
rootProject {
    mirakle {
        host "your_remote_machine"


> ./gradlew build

Here's Mirakle. All tasks will be executed on a remote machine.
...remote build output...

Total time : 7.975 secs
Task uploadToRemote took: 2.237 secs
Task executeOnRemote took: 3.706 secs
Task downloadFromRemote took: 1.597 secs

To disable remote execution pass -x mirakle

> ./gradlew build install -x mirakle


mirakle {
    host "true-remote"
    remoteFolder ".mirakle"
    excludeLocal += ["foo"]
    excludeRemote += ["bar"]
    excludeCommon += ["**/foobar"]
    rsyncToRemoteArgs += ["--stats", "-h"]
    rsyncFromRemoteArgs += ["--compress-level=5", "--stats", "-h"]
    sshArgs += ["-p 22"]
    fallback true

Per-project config

You can configure Mirakle differently for any project. There's two ways:

  1. In USER_HOME/.gradle/init.d/mirakle_init.gradle
initscript { .. }
apply plugin: Mirakle
rootProject {
    if (name == "My Home Project") {
        mirakle {
            host "my-build-server"
            sshArgs += ["-p 222"]
    } else {
        mirakle {
            host "office-build-server"
  1. In PROJECT_DIR/mirakle.gradle. This is useful if you want too add the config to VCS.
mirakle {
    host "my-build-server"
    sshArgs += ["-p 222"]

Note: mirakle.gradle is the only Gradle build file in the project dir which is evaluated on local machine. Other build files are ignored for the sake of saving time.

Mainframer config is also supported.



Copyright 2017 Instamotor, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.