-
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 4 commits
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 |
---|---|---|
|
@@ -41,39 +41,26 @@ __Remember: A butter knife is like [a dagger][1] only infinitely less sharp.__ | |
Download | ||
-------- | ||
|
||
Configure your project-level `build.gradle` to include the 'android-apt' plugin: | ||
Configure your project-level `build.gradle` to use at least vesion 2.2.0 of the Android Gradle Plugin: | ||
|
||
```groovy | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' | ||
} | ||
... | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:2.2.0' // 2.2.0 or higher | ||
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. Comment is redundant with the sentence above and people will end up copy/pasting it into build files. Let's remove. |
||
} | ||
} | ||
``` | ||
|
||
Then, apply the 'android-apt' plugin in your module-level `build.gradle` and add the Butter Knife | ||
dependencies: | ||
Then add the Butter Knife dependencies to your module-level `build.gradle`: | ||
|
||
```groovy | ||
apply plugin: 'android-apt' | ||
|
||
android { | ||
... | ||
} | ||
|
||
dependencies { | ||
compile 'com.jakewharton:butterknife:8.4.0' | ||
apt 'com.jakewharton:butterknife-compiler:8.4.0' | ||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0' | ||
} | ||
``` | ||
|
||
Note: If you are using the new Jack compiler with version 2.2.0 or newer you do not need the | ||
'android-apt' plugin and can instead replace `apt` with `annotationProcessor` when declaring the | ||
compiler dependency. | ||
|
||
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap]. | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,10 +211,25 @@ <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 use at least version 2.2.0 of the Android Gradle Plugin: | ||
<h4>Project-level build.gradle</h4> | ||
<pre class="prettyprint"> | ||
buildscript { | ||
... | ||
dependencies { | ||
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. two space indent again |
||
classpath 'com.android.tools.build:gradle:2.2.0' // 2.2.0 or higher | ||
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. Ditto |
||
} | ||
} | ||
</pre> | ||
|
||
Then add the Butter Knife dependencies to the module-level build.gradle: | ||
<h4>Module-level build.gradle</h4> | ||
<pre class="prettyprint"> | ||
dependencies { | ||
compile 'com.jakewharton:butterknife:8.4.0</span>' | ||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0</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. Both of these should use 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. Added this change, works locally on my device, but not on Github pages it seems, 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. Probably needs to use https? 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. Only thing that isn't https is the ajax script: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>Shall I change that to https? (I'm not a web guru so just guessing...) 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. Someone fixed this on another project. I'll have to go track it down. 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. Side note: also okhttp, okio, retrofit, picasso and dagger have the same issue |
||
} | ||
</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.
use two-space indent