以下是Gradle 5.4.1的build.gradle文件示例:
apply plugin: 'com.android.application'
android { compileSdkVersion 29 buildToolsVersion "29.0.2"
defaultConfig {
applicationId "your.app.package"
minSdkVersion 14
targetSdkVersion 29
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) // ... }