//opensource include ':shrink-r-plugin' include ':access-inline-plugin' include ':getter-setter-inline-plugin' include ':refer-check-plugin' include ':closeable-check-plugin' include ':serialization-check-plugin' include ':const-inline-plugin' include ':field-assign-opt-plugin' include ':method-call-opt-plugin' include ':SourceFileKiller' include ':butterknife-check-plugin'
include ':coverage-plugin' project(':coverage-plugin').projectDir = new File('coverage/coverage-plugin') include ':coverage-lib' project(':coverage-lib').projectDir = new File('coverage/coverage-lib')
/** * The buildscript block is where you configure the repositories and * dependencies for Gradle itself—meaning, you should not include dependencies * for your modules here. For example, this block includes the Android plugin for * Gradle as a dependency because it provides the additional instructions Gradle * needs to build Android app modules. */
buildscript {
/** * The repositories block configures the repositories Gradle uses to * search or download the dependencies. Gradle pre-configures support for remote * repositories such as JCenter, Maven Central, and Ivy. You can also use local * repositories or define your own remote repositories. The code below defines * JCenter as the repository Gradle should use to look for its dependencies. * * New projects created using Android Studio 3.0 and higher also include * Google's Maven repository. */
repositories { google() jcenter() }
/** * The dependencies block configures the dependencies Gradle needs to use * to build your project. The following line adds Android plugin for Gradle * version 4.1.0 as a classpath dependency. */
/** * The allprojects block is where you configure the repositories and * dependencies used by all modules in your project, such as third-party plugins * or libraries. However, you should configure module-specific dependencies in * each module-level build.gradle file. For new projects, Android Studio * includes JCenter and Google's Maven repository by default, but it does not * configure any dependencies (unless you select a template that requires some). */
// This block encapsulates custom properties and makes them available to all // modules in the project. ext { // The following are only a few examples of the types of properties you can define. compileSdkVersion = 28 // You can also create properties to specify versions for dependencies. // Having consistent versions between modules can avoid conflicts with behavior. supportLibVersion = "28.0.0" ... } ...
android { // Use the following syntax to access properties you defined at the project level: // rootProject.ext.property_name compileSdkVersion rootProject.ext.compileSdkVersion ... } ... dependencies { implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" ... }
/** * The first line in the build configuration applies the Android plugin for * Gradle to this build and makes the android block available to specify * Android-specific build options. */
apply plugin: 'com.android.application'
/** * The android block is where you configure all your Android-specific * build options. */
android {
/** * compileSdkVersion specifies the Android API level Gradle should use to * compile your app. This means your app can use the API features included in * this API level and lower. */
compileSdkVersion 28
/** * buildToolsVersion specifies the version of the SDK build tools, command-line * utilities, and compiler that Gradle should use to build your app. You need to * download the build tools using the SDK Manager. * * This property is optional because the plugin uses a recommended version of * the build tools by default. */
buildToolsVersion "29.0.2"
/** * The defaultConfig block encapsulates default settings and entries for all * build variants, and can override some attributes in main/AndroidManifest.xml * dynamically from the build system. You can configure product flavors to override * these values for different versions of your app. */
defaultConfig {
/** * applicationId uniquely identifies the package for publishing. * However, your source code should still reference the package name * defined by the package attribute in the main/AndroidManifest.xml file. */
applicationId 'com.example.myapp'
// Defines the minimum API level required to run the app. minSdkVersion 15
// Specifies the API level used to test the app. targetSdkVersion 28
// Defines the version number of your app. versionCode 1
// Defines a user-friendly version name for your app. versionName "1.0" }
/** * The buildTypes block is where you can configure multiple build types. * By default, the build system defines two build types: debug and release. The * debug build type is not explicitly shown in the default build configuration, * but it includes debugging tools and is signed with the debug key. The release * build type applies Proguard settings and is not signed by default. */
buildTypes {
/** * By default, Android Studio configures the release build type to enable code * shrinking, using minifyEnabled, and specifies the default Proguard rules file. */
release { minifyEnabled true // Enables code shrinking for the release build type. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }
/** * The productFlavors block is where you can configure multiple product flavors. * This allows you to create different versions of your app that can * override the defaultConfig block with their own settings. Product flavors * are optional, and the build system does not create them by default. * * This example creates a free and paid product flavor. Each product flavor * then specifies its own application ID, so that they can exist on the Google * Play Store, or an Android device, simultaneously. * * If you declare product flavors, you must also declare flavor dimensions * and assign each flavor to a flavor dimension. */
/** * The splits block is where you can configure different APK builds that * each contain only code and resources for a supported screen density or * ABI. You'll also need to configure your build so that each APK has a * different versionCode. */
splits { // Settings to build multiple APKs based on screen density. density {
// Enable or disable building multiple APKs. enable false
// Exclude these densities when building multiple APKs. exclude "ldpi", "tvdpi", "xxxhdpi", "400dpi", "560dpi" } } }
/** * The dependencies block in the module-level build configuration file * specifies dependencies required to build only the module itself. * To learn more, go to Add build dependencies. */