Android Studio Gradle 配置文件样例
2015-05-02 08:51
295 查看
项目主build.gradle
Android build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { mavenCentral() } dependencies { // http://tools.android.com/tech-docs/new-build-system classpath 'com.android.tools.build:gradle:1.2.2' // https://bitbucket.org/hvisser/android-apt classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { mavenCentral() flatDir { dirs 'libs' } } }
Android build.gradle
apply plugin: 'com.android.application' //Android Annotations apply plugin: 'com.neenbedankt.android-apt' android { // signingConfigs { // release { // storeFile file("xxx") // storePassword "xx" // keyAlias "xx" // keyPassword "xx" // } // } compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.xxx" minSdkVersion 21 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { // signingConfig signingConfigs.release minifyEnabled false //是否代码混淆 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } //Gradle的.so文件,默认放在jniLibs下,如果不是这个目录,需要下面的配置指定 // sourceSets { // main { // jniLibs.srcDirs = ['libs'] // } // } packagingOptions { exclude 'META-INF/notice.txt' exclude 'META-INF/license.txt' } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.3' //Android Annotations // http://androidannotations.org/ // https://github.com/excilys/androidannotations/wiki // 30/04/2015 The 3.3 release is out ! apt "org.androidannotations:androidannotations:3.3" compile 'org.androidannotations:androidannotations-api:3.3' // https://github.com/spring-projects/spring-android 2.0.0.M1 compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE' // https://github.com/google/gson compile 'com.google.code.gson:gson:2.3.1' // http://ormlite.com/ compile 'com.j256.ormlite:ormlite-core:4.48' compile 'com.j256.ormlite:ormlite-android:4.48' // compile project(':otherModule') } apt { arguments { resourcePackageName android.defaultConfig.applicationId androidManifestFile variant.outputs[0].processResources.manifestFile } }
相关文章推荐
- android studio 在gradle 中配置签名文件
- android studio gradle配置文件参考
- 2.7-2 Android studio gradle 文件 配置完整版
- android studio 在gradle文件中配置签名
- Android studio gradle文件说明与配置
- Android Studio中Module下的gradle文件的基本配置
- Android Studio 签名文件Gradle安全配置
- Android Studio 通过配置build.gradle打包签名文件
- Android Studio Gradle多渠道打包(动态设定App名称,应用图标,背景图片,状态栏颜色)、配置签名文件
- Android Studio怎么构建配置文件(config.gradle)
- Android Studio下通过Gradle配置实现资源文件的模块化
- android studio 在gradle文件中配置签名
- Android Studio升级1.0 现有程序 build.gradle配置文件更新
- Android Studio App文件夹下这个Module的gradle配置文件
- android studio修改配置文件(.android .gradle .AndroidStudio)位置
- Android Studio 通过配置build.gradle打包签名文件。生成xxx.apk
- Android Studio 签名证书文件在build.gradle(app)中配置
- Android Studio gradle文件配置
- android studio 首次安装配置和 gradle 语法学习摘记
- Android studio Gradle 常用配置