Project name/app/build.gradle file analysis
//statement is an Android programApply plugin: ' Com.android.application 'Android {//compiling the SDK versionCompilesdkversion 21//version of Build toolsBuildtoolsversion "21.1.1"Defaultconfig {//app's package nameApplicationID "Com.example.siyuan.helloandroid"//Minimum Android versionMinsdkversion 14//Target Android version, these parts are similar to the original manifest fileTargetsdkversion 21Versioncode1Versionname"1.0.0" } //Java versioncompileoptions {sourcecompatibility javaversion.version_1_7 targetcompatibility JavaVersion.VERSION _1_7} buildtypes {release {//whether to confuseMinifyenabledfalse //confusing the location of a file//proguardfiles This section has two paragraphs, the previous part represents the system default Android program confusion file, the file already contains the basic confusion statement, eliminates me//a lot of things, thisThe directory of the files in the <SDK directory >/tools/proguard/proguard-android.txt, the latter part is the custom obfuscation//files in our project,the catalogue is in the App/proguard-rules.txt,
If you create a new project with Studio 1.0, the default generated file name is Proguard-rules.pro, and the name is not closed .Department,
In this file you can declare some confusion rules that are dependent on some third parties. The result of the final confusion is that the two parts of the file work together. Proguardfiles getdefaultproguardfile (' proguard-android.txt '), ' proguard-rules.txt ' } } //Remove the error from the lint checklintoptions {abortonerrorfalse}}dependencies {//compiling all jar packages under the Libs directoryCompile Filetree (dir: ' Libs ', include: [' *.jar ']) Compile' com.android.support:support-v4:21.0.2 'Compile' com.etsy.android.grid:library:1.0.5 'Compile' com.alexvasilkov:foldable-layout:1.0.1 '//compiling the Shimmerandroid module under the Extras directoryCompile project (': Extras:shimmerandroid '))}
Add later, package release, and multi-channel packaging configuration instructions.
Gradle File Analysis--androidstudio Learning