Title: [ANSWER] How to user Android Annotatinos with Gradle/Android Studio · Issue #676 · androidannotations/androidannotations · GitHub
Open Graph Title: [ANSWER] How to user Android Annotatinos with Gradle/Android Studio · Issue #676 · androidannotations/androidannotations
X Title: [ANSWER] How to user Android Annotatinos with Gradle/Android Studio · Issue #676 · androidannotations/androidannotations
Description: with the help of stack overflow and Google+ i was able to get a nice build.gradle configuration on how to use android annotations with Gradle/Android Studio. i use the 3.0-SNAPSHOT but i'm pretty sure, it will also work with the 2.7.1 re...
Open Graph Description: with the help of stack overflow and Google+ i was able to get a nice build.gradle configuration on how to use android annotations with Gradle/Android Studio. i use the 3.0-SNAPSHOT but i'm pretty s...
X Description: with the help of stack overflow and Google+ i was able to get a nice build.gradle configuration on how to use android annotations with Gradle/Android Studio. i use the 3.0-SNAPSHOT but i'm pret...
Opengraph URL: https://github.com/androidannotations/androidannotations/issues/676
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ANSWER] How to user Android Annotatinos with Gradle/Android Studio","articleBody":"with the help of [stack overflow](http://stackoverflow.com/questions/16683944/androidannotations-nothing-generated-empty-activity) and [Google+](https://plus.google.com/u/0/116136390679208063122/posts/SJ4gC2xyWKB) i was able to get a nice build.gradle configuration on how to use android annotations with Gradle/Android Studio.\n\ni use the 3.0-SNAPSHOT but i'm pretty sure, it will also work with the 2.7.1 release after fixing the dependency and `-processor` argument\n\nfeel free to add this to the [Configuration Guide](https://github.com/excilys/androidannotations/wiki/Configuration)/[Gradle Guide](https://github.com/excilys/androidannotations/wiki/Building-Project-Gradle)\n\n```\nbuildscript {\n repositories {\n mavenCentral()\n }\n dependencies {\n classpath 'com.android.tools.build:gradle:0.5.+'\n }\n}\napply plugin: 'android'\n\nrepositories {\n mavenCentral()\n\n maven {\n url 'https://oss.sonatype.org/content/repositories/snapshots/'\n }\n}\n\next.androidAnnotationsVersion = '3.0-SNAPSHOT';\n\nconfigurations {\n apt\n}\n\ndependencies {\n compile 'com.android.support:support-v4:13.0.+'\n\n apt \"org.androidannotations:androidannotations:${androidAnnotationsVersion}\"\n compile \"org.androidannotations:androidannotations-api:${androidAnnotationsVersion}\"\n}\n\nandroid {\n compileSdkVersion 17\n buildToolsVersion \"17.0.0\"\n\n defaultConfig {\n minSdkVersion 10\n targetSdkVersion 17\n }\n}\n\ndef getSourceSetName(variant) {\n return new File(variant.dirName).getName();\n}\n\nandroid.applicationVariants.each { variant -\u003e\n def aptOutputDir = project.file(\"build/source/apt\")\n def aptOutput = new File(aptOutputDir, variant.dirName)\n println \"****************************\"\n println \"variant: ${variant.name}\"\n println \"manifest: ${variant.processResources.manifestFile}\"\n println \"aptOutput: ${aptOutput}\"\n println \"****************************\"\n\n android.sourceSets[getSourceSetName(variant)].java.srcDirs+= aptOutput.getPath()\n\n variant.javaCompile.options.compilerArgs += [\n '-processorpath', configurations.apt.getAsPath(),\n '-processor', 'org.androidannotations.AndroidAnnotationProcessor',\n '-AandroidManifestFile=' + variant.processResources.manifestFile,\n '-s', aptOutput\n ]\n\n variant.javaCompile.source = variant.javaCompile.source.filter { p -\u003e\n return !p.getPath().startsWith(aptOutputDir.getPath())\n }\n\n variant.javaCompile.doFirst {\n aptOutput.mkdirs()\n }\n}\n```\n","author":{"url":"https://github.com/dodgex","@type":"Person","name":"dodgex"},"datePublished":"2013-07-24T17:12:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":44},"url":"https://github.com/676/androidannotations/issues/676"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:209784f6-c8aa-34ba-0d01-3d24f28e255b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A83E:A6207:13028AC:1B2DBF9:6A607B2A |
| html-safe-nonce | 9bcc25aac5d74f90a979965f141d697891faadd5ced2f4b6ad8e5eddc3528449 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODNFOkE2MjA3OjEzMDI4QUM6MUIyREJGOTo2QTYwN0IyQSIsInZpc2l0b3JfaWQiOiI3NzM3NzMyMTczNjY0Mzg1ODM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 85f37b64e6773e6e63d9ff90dd4b4f774d85511994141e4edb80485ed030e1d9 |
| hovercard-subject-tag | issue:17169027 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/androidannotations/androidannotations/676/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dfbb1dadd2f291118e556acf9ab21f3780252555591c766484ee35b33230b171/androidannotations/androidannotations/issues/676 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dfbb1dadd2f291118e556acf9ab21f3780252555591c766484ee35b33230b171/androidannotations/androidannotations/issues/676 |
| og:image:alt | with the help of stack overflow and Google+ i was able to get a nice build.gradle configuration on how to use android annotations with Gradle/Android Studio. i use the 3.0-SNAPSHOT but i'm pretty s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dodgex |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60da8c2a42fa2bbf5f7567474990ec467836a84444262a58e200fa91b7f3d2d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/androidannotations/androidannotations git https://github.com/androidannotations/androidannotations.git |
| octolytics-dimension-user_id | 1315313 |
| octolytics-dimension-user_login | androidannotations |
| octolytics-dimension-repository_id | 3116751 |
| octolytics-dimension-repository_nwo | androidannotations/androidannotations |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3116751 |
| octolytics-dimension-repository_network_root_nwo | androidannotations/androidannotations |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9824515e740d83d5eb82168a089b806ab0fe04a1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width