.gradle/init.d/mavenLocal.gradle
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 29 Jun 2014 15:37:14 +0300
changeset 700 45c5d320d322
child 830 1b48fa26b52c
permissions -rw-r--r--
http://stackoverflow.com/questions/24454076/how-to-force-gradle-to-use-share-m2-repository-with-maven-system-wide/

allprojects { project ->
    buildscript {
        if( !project.hasProperty('skipMavenLocal') ) {
            repositories {
                println "Adding buildscript mavenLocal()"
                mavenLocal()
            }
            configurations.all {
                resolutionStrategy.cacheChangingModulesFor 0, 'hours'
            }
        }
    }

    if( !project.hasProperty('skipMavenLocal') ) {
        repositories {
            println "Adding mavenLocal()"
            mavenLocal()
        }
    }
}