Skip to content

acompagno/LocalCheckPlugin

Repository files navigation

LocalCheckPlugin

Gradle plugin that automatically switches between using local and remote dependencies

Build Status

Usage

dependencies {
    compile LC.checkLocal('blue.walker:beacon-lib:0.1.+', 'BeaconLib')
}

In order to force gradle to use the remote dependencies, simply add -PforceRemote when running gradle commands.

gradle -PforceRemote assemble

Adding to build.gradle

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.acompagno:localcheck:0.1.+'
    }
}

apply plugin: 'com.acompagno.localcheck'

Example output

$ gradle
[checkLocal] Using local dependency :Libraries:BeaconLib for project GlassApplication
[checkLocal] Using local dependency :Libraries:Core for project GlassApplication
[checkLocal] Using local dependency :Libraries:BeaconLib for project BeaconLibExample
[checkLocal] Using local dependency :Libraries:BeaconLib for project BeaconLibGlassExample
:help

Welcome to Gradle 2.2.1.

To run a build, run gradle <task> ...

To see a list of available tasks, run gradle tasks

To see a list of command-line options, run gradle --help

BUILD SUCCESSFUL

Total time: 7.864 secs
$ gradle -PforceRemote
[checkLocal] Using remote dependency blue.walker:beacon-lib:0.1.+ for project GlassApplication
[checkLocal] Using remote dependency blue.walker:core:0.1.+ for project GlassApplication
[checkLocal] Using remote dependency blue.walker:beacon-lib:0.1.+ for project BeaconLibExample
[checkLocal] Using remote dependency blue.walker:beacon-lib:0.1.+ for project BeaconLibGlassExample
:help

Welcome to Gradle 2.2.1.

To run a build, run gradle <task> ...

To see a list of available tasks, run gradle tasks

To see a list of command-line options, run gradle --help

BUILD SUCCESSFUL

Total time: 7.319 secs

About

Plugin that automatically switches between using local and remote dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages