-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated installation instructions #744
base: master
Are you sure you want to change the base?
Changes from 1 commit
a35197a
1b8ebbc
6943d05
8f2da25
9133fbf
e72a1b1
10a40ce
3c97dde
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,10 +211,28 @@ <h4 id="bonus">Bonus</h4> | |
<p>Add a static import for <code>ButterKnife.findById</code> and enjoy even more fun.</p> | ||
|
||
<h3 id="download">Download</h3> | ||
<h4>Gradle</h4> | ||
<pre class="prettyprint">compile 'com.jakewharton:butterknife:<span class="version"><em>(insert latest version)</em></span>' | ||
apt 'com.jakewharton:butterknife-compiler:<span class="version"><em>(insert latest version)</em></span>'</pre> | ||
Configure your project-level build.gradle to include the 'android-apt' plugin: | ||
<h4>Project-level build.gradle</h4> | ||
<pre class="prettyprint"> | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' | ||
} | ||
} | ||
</pre> | ||
Then, apply the 'android-apt' plugin in your module-level build.gradle and add the Butter Knife dependencies: | ||
<h4>Module-level build.gradle</h4> | ||
<pre class="prettyprint"> | ||
apply plugin: 'android-apt' | ||
|
||
dependencies { | ||
compile 'com.jakewharton:butterknife:<span class="version"><em>(insert latest version)</em></span>' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is actually a piece of Javascript which loads the latest version automatically, but this is not working on GH pages, so hence better to add a fixed version. |
||
apt 'com.jakewharton:butterknife-compiler:<span class="version"><em>(insert latest version)</em></span>' | ||
} | ||
</pre> | ||
<h3 id="license">License</h3> | ||
<pre class="license">Copyright 2013 Jake Wharton | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For
buildscript
repositories
, you do not needmavenCentral()
. Also, with the android gradle plugin2.2.0
out, you do not needandroid-apt
. You can use the annotation processor that comes with it.