Skip to content

Instantly share code, notes, and snippets.

@vvhof
Last active August 3, 2018 05:37
Android Gradle Multi-Project Root Configuration
// Part I : Global BuildsScript Configuration
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.8.0'
}
}
// Part II : Global dependency variables
allprojects{
// global scoped "ext" help variable
project.ext {
compileSdkVersion = 19
buildToolsVersion = "19.0.1"
supportLibraryVersion = "19.0.1"
}
}
// access these variables in modules' build.gradle via
// compileSdkVersion project.ext["compileSdkVersion"]
// buildToolsVersion project.ext["buildToolsVersion"]
--> see https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/tips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment