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

Conversation

JeroenMols
Copy link

Website currently doesn't mention use of apt plugin, hence not providing a complete solution to get ButterKnife up and running.

Note: the apt-plugin version is static (but I saw the JS versioning isn't working on github pages)

<pre class="prettyprint">
buildscript {
repositories {
mavenCentral()
Copy link
Contributor

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 need mavenCentral(). Also, with the android gradle plugin 2.2.0 out, you do not need android-apt. You can use the annotation processor that comes with it.


dependencies {
compile 'com.jakewharton:butterknife:<span class="version"><em>(insert latest version)</em></span>'
Copy link
Contributor

Choose a reason for hiding this comment

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

Put 8.4.0, the latest version.

Copy link
Author

Choose a reason for hiding this comment

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

@JeroenMols
Copy link
Author

Incorporated your feedback, Android plugin v2.2.0 stable is now available so made that the default installation instructions.

Also updated the README to use the built in annotation processor by default.

Note that I removed the requirement to use Jack as this doesn't seem to be necessary.
(tested with jackOptions.enabled false)

@jaredsburrows
Copy link
Contributor

@JeroenMols Looks great! I have a PR in parallel with this one: #749 that uses the latest plugin.

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

}
...
dependencies {
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.

buildscript {
...
dependencies {
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 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 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

@JeroenMols
Copy link
Author

Incorporated review feedback

Copy link
Owner

@JakeWharton JakeWharton left a comment

Choose a reason for hiding this comment

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

Looks good otherwise. The script failing is another problem so just ignore it for now.

<pre class="prettyprint">
dependencies {
compile 'com.jakewharton:butterknife:<span class="version"><em>(latest version)</em></span></span>'
annotationProcessor 'com.jakewharton:butterknife-compiler:<span class="version"><em>(latest version)</em></span></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.

You have an extra </em></span> here

@JeroenMols
Copy link
Author

Sorry for the late reply, didn't see I still had stuff to fix

@tprochazka
Copy link

It was approved but not merged why? There is quite a lot open pull request without any explanation why it was not merged :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants