/**首先第一行应用了一个插件,一般有两个值可选,com.android.application表示这是一个应用程序模块,* com.android.library表示这是一个库模块。应用模块和库模块的最大区别是:一个是可以直接运行的,一个只能做为代码库* 依附于其他应用程序模块来运行。*/
apply plugin: 'com.android.application' android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {applicationId "com.zjs.guanggaoshanping"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" }buildTypes {/**用于指定生成安装文件的相关配置,通常只会有两个子闭包,一个是debug,一个是release,* debug用于指定生成测试版安装文件的配置,release用于指定生成正式版安装文件的配置。* 另外debug是可以忽略不写的。*/ release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt' ), 'proguard-rules.pro' }}
}dependencies {compile fileTree(dir: 'libs' , include: ['*.jar' ])androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2' , {exclude group: 'com.android.support' , module: 'support-annotations' })compile 'com.android.support:appcompat-v7:26.+' compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12'
}