Android Studio 1.2中配置androidannotations

Gradle版本2.2.1

Android Studio 1.2


apply plugin: 'com.android.application'
apply plugin: 'android-apt'
def AAVersion = '3.2+'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.adndroid.demo"
        minSdkVersion 11
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }

    lintOptions {
        abortOnError false
    }

    buildTypes {
        release {
            minifyEnabled false
            //shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

apt{
    arguments{
        androidManifestFile variant.outputs[0].processResources.manifestFile
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    apt "org.androidannotations:androidannotations:$AAVersion"
    compile "org.androidannotations:androidannotations-api:$AAVersion"
    compile 'com.android.support:appcompat-v7:22.0.0'
}

你可能感兴趣的:(android,gradle,Studio)