Skip to content

Instantly share code, notes, and snippets.

@blundell
Created January 20, 2014 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blundell/8527691 to your computer and use it in GitHub Desktop.
Save blundell/8527691 to your computer and use it in GitHub Desktop.
Handle the declaration of all source code repositories in your base build file, and you don't have to worry about declaring them in any child modules. The code below would go at the top of your build.gradle, in your 'base' or 'top' build.gradle file. You don't have to add anything to child modules. You will get full repository source retrieval.
subprojects {
buildscript {
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "https://github.com/novoda/public-mvn-repo/raw/master/releases"
}
}
}
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "https://github.com/novoda/public-mvn-repo/raw/master/releases"
}
}
}
@blundell
Copy link
Author

-- MyProject
   build.gradle   << ADD HERE
  -- MyModule1
     build.gradle
  -- MyModule2
     build.gradle
     -- MySubSubModule1
        build.gradle
  -- MyModule3
     build.gradle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment