Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 7 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use two-space indent

classpath 'com.android.tools.build:gradle:2.2.0' // 2.2.0 or higher
Copy link
Owner

Choose a reason for hiding this comment

The 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].


Expand Down
21 changes: 18 additions & 3 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link
Owner

Choose a reason for hiding this comment

The 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
Copy link
Owner

Choose a reason for hiding this comment

The 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>'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both of these should use <span class="version"><em>(latest version)</em></span> for the version.

Copy link
Author

Choose a reason for hiding this comment

The 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,
https://jakewharton.github.io/butterknife
screen shot 2016-09-20 at 21 04 39

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably needs to use https?

Copy link
Author

Choose a reason for hiding this comment

The 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...)

Copy link
Owner

Choose a reason for hiding this comment

The 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.

Copy link
Author

Choose a reason for hiding this comment

The 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

Expand Down