Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Setting up Android Studio

Benedict edited this page Sep 9, 2016 · 14 revisions

First create a new project. Then you need the following configuration in your build.gradle files:

  1. Add the Dependency for com.neenbedankt.gradle.plugins:android-apt in your top level build.gradle file.
buildscript {
 repositories {
   mavenCentral()
   mavenLocal()// Only if you want to use your local maven repo
 }
 dependencies {
   classpath 'com.android.tools.build:gradle:1.5.0'
   classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
 }
}
allprojects {
 repositories {
   mavenCentral()
   mavenLocal()// Only if you want to use your local maven repo
 }
}
  1. Configure the annotation processing in your app/build.gradle file.
apply plugin: 'android'
//add the apt plugin
apply plugin: 'android-apt' 
// the normal android section
android { ... } 
// configuration for the annotation processor
apt {
  arguments {
    manifest '/path/to/AndroidManifest.xml'
  }
}
// add the droitatedDB dependencies
dependencies {
 apt 'org.droitateddb:processor:0.1.9'
 compile 'org.droitateddb:api:0.1.9'
 // ... more dependencies
}

You should find your generated sources in /app/build/source/apt/debug/your/package/generated/.