Android菜鳥練習第十八課 build.gradle的基本介紹

apply plugin: 'com.android.application'   //表示是一個應用,如果是類庫的話:apply plugin: 'com.android.library'

android {
    compileSdkVersion 23           //sdk版本
    buildToolsVersion "23.0.2"    //buildTools版本,本地必須有這個版本,如果沒有的話用其他的來替換

    defaultConfig {
        applicationId "com.example.customview"   //應用的包名
        minSdkVersion 17              //最低sdk版本
        targetSdkVersion 23           //目標sdk版本
        versionCode 1                 //當前版本號每次版本升級+1
        versionName "1.0"             //版本名 1.2.3 1-重大界面功能升級 2-單個模塊或者頁面 3-bug修復

    }
    buildTypes {
        release {
            minifyEnabled false          //是否進行混淆 false 不混淆
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            //混淆文件的位置
        }
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    //引用libs包下的所有jar包
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    //引用jar包,此jar包,不在libs下.
    compile 'com.github.traex.rippleeffect:library:1.2.3'
    compile 'com.github.znacloud:rippleview:1.0.0'
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章