Android Studio 的 build.gradle
有分 Project 和 Module;所以 Project 的一定會被讀取到,但 Module 的是個別定義。
Base Concept
Android project會有三個主要的區塊
- buildscript { … } // 定義建置的方法
- apply plugin: ‘android’ // 匯入Android的plugin,從這行開始,下面才可以用android區塊。
- android { … } // 定義Android建置的內容
Dependencies
- compile
- androidTestCompile
- debugCompile
- releaseCompile