Last active
August 10, 2016 09:55
-
-
Save Orange168/c391645022c584c094e28135f4978838 to your computer and use it in GitHub Desktop.
Gradle Plugin User Guide http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Manifest-entries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
android { | |
buildTypes { | |
debug { | |
applicationIdSuffix ".debug" | |
} | |
jnidebug { | |
initWith(buildTypes.debug) | |
applicationIdSuffix ".jnidebug" | |
jniDebuggable true | |
} | |
} | |
} | |
android { | |
sourceSets.jnidebug.setRoot('foo/jnidebug') | |
} | |
``` | |
`./gradlew :app:dependencies and ./gradlew :app:androidDependencies.` | |
#### Filtering Variants | |
``` | |
android { | |
productFlavors { | |
realData | |
fakeData | |
} | |
variantFilter { variant -> | |
def names = variant.flavors*.name | |
if (names.contains("fakeData") && variant.buildType.name == "release") { | |
variant.ignore = true | |
} | |
} | |
} | |
``` | |
android { | |
lintOptions { | |
// turn off checking the given issue id's | |
disable 'TypographyFractions','TypographyQuotes' | |
// turn on the given issue id's | |
enable 'RtlHardcoded','RtlCompat', 'RtlEnabled' | |
// check *only* the given issue id's | |
check 'NewApi', 'InlinedApi' | |
} | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment