Skip to content
Takao Sumitomo edited this page Dec 20, 2015 · 2 revisions

Get started

Following is configuration for Android Studio and Eclipse.

Go with Android Studio

Configure your build.gradle.

Add following configuration. You can check which version is available from here

def CHGVersion = 'X.X.X'
dependencies {
    apt 'net.cattaka:cathandsgendroid-apt:$CHGVersion'
    compile 'net.cattaka:cathandsgendroid-core:$CHGVersion'
}

Annotation processor Gradle plugin

Recently, there some approach of the enabling APT. If you already use other approach, this is not needed. You can use the android-apt Gradle plugin to use APT on Android Studio.

apply plugin: 'com.neenbedankt.android-apt'
apt {
    arguments {
        resourcePackageName android.defaultConfig.applicationId
        androidManifestFile variant.outputs[0]?.processResources?.manifestFile
    }
}
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
}

Go with Eclipse(ADT)

Download Jars

At first, download following 2 jar files from http://mvnrepository.com/artifact/net.cattaka

  • cathandsgendroid-core-x.x.x.jar
  • cathandsgendroid-apt-x.x.x.jar Next, put cathandsgendroid-core-x.x.x.jar to ./libs/ directory, and put cathandsgendroid-apt-x.x.x.jar to ./factory/ directory.

Open the project property and go to Java Compiler -> Annotation Processor and check Enable annotation processing. Go to Java Compiler -> Annotation Processor -> Factory path and add cathandsgendroid-apt-x.x.x.jar to list.

Have a fun!!

Clone this wiki locally