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 all 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
23 changes: 5 additions & 18 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'
classpath 'com.android.tools.build:gradle:2.2.0'
}
}
```

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
23 changes: 19 additions & 4 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 {
classpath 'com.android.tools.build:gradle:2.2.0'
}
}
</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:<span class="version"><em>(latest version)</em></span>'
annotationProcessor 'com.jakewharton:butterknife-compiler:<span class="version"><em>(latest version)</em></span>'
}
</pre>
<h3 id="license">License</h3>
<pre class="license">Copyright 2013 Jake Wharton

Expand All @@ -235,7 +250,7 @@ <h3 id="license">License</h3>
</div>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="static/jquery-maven-artifact.min.js"></script>
<script src="static/prettify.js"></script>
<script>
Expand Down