0

In the post Using gradle/clojuresq to build clojure, and the answer https://stackoverflow.com/a/29018574/260127, there are (or seems) duplication of repositories and dependencies.

Why is this? Why do we need another set with the same setup?

buildscript { <- first 
    repositories { 
        maven { url "http://clojars.org/repo" } 
        mavenCentral()
    }
    dependencies {
        classpath "clojuresque:clojuresque:1.7.0" 
    }
}

...

-> Same set again!

repositories {
    maven { url "http://clojars.org/repo" }
    mavenCentral()
}

dependencies {
    compile "org.clojure:clojure:1.6.0"
}

...
Community
  • 1
  • 1
prosseek
  • 182,215
  • 215
  • 566
  • 871

1 Answers1

2

The first is a dependency required for the build script itself. The dependency you are declaring in this case is clojuresque, which contains the Clojure Gradle plugin (apply plugin: 'clojure'). The second is the dependencies for you project, in this case, the Clojure library itself.

Simply, the first is needed by Gradle, the second by your code.

Mark Vieira
  • 13,198
  • 4
  • 46
  • 39