Skip to content

Instantly share code, notes, and snippets.

@mikesorae
Created January 26, 2015 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikesorae/06101783240e7d47dfb9 to your computer and use it in GitHub Desktop.
Save mikesorae/06101783240e7d47dfb9 to your computer and use it in GitHub Desktop.
gradle script for android using android-annotations and active-android
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
def AndroidAnnotationsVersion = '3.2'
android {
compileSdkVersion 21
buildToolsVersion "21.0.2"
defaultConfig {
applicationId "com.example.app_name"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.google.android.gms:play-services:6.1.71'
apt "org.androidannotations:androidannotations:$AndroidAnnotationsVersion"
compile "org.androidannotations:androidannotations-api:$AndroidAnnotationsVersion"
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
}
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
// doesn't work well on my environment
// androidManifestFile variant.processResources.manifestFile
resourcePackageName 'machiaruki.monstar.net.noboribetsubeaconapp_android' // パッケージ名
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
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()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment