|
Wex5用gradle编译java,如何设置gradle的build script。例如把这段代码加到build.gradle中
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.ttlock"
minSdkVersion 18
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
// 设置支持的 SO 库构架
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'//, 'mips', 'mips64'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//添加本地仓库,并把libs目录作为仓库地址
repositories {
flatDir {
dirs 'libs'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
//greenDao
compile 'org.greenrobot:greendao:3.1.1'
compile 'org.greenrobot:greendao-generator-encryption:2.2.0'
compile 'net.zetetic:android-database-sqlcipher:3.4.0'
compile 'com.squareup.okhttp3 khttp:3.4.1'
compile 'com.google.code.gson:gson:2.7'
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
}
|
|