Skip to content

Update gradle version to 4.4.1. #186

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

Merged
merged 1 commit into from
Jan 8, 2018

Conversation

runningcode
Copy link
Contributor

Also maintain testing compatibility with 2.14.1.

Fixes #161

build.gradle Outdated
task wrapper(type: Wrapper) {
gradleVersion = '4.4.1'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
Copy link
Member

@nedtwigg nedtwigg Jan 5, 2018

Choose a reason for hiding this comment

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

Please remove this task. You can do this without adding a task to build.gradle:

gradlew wrapper --gradle-version 4.4.1

@nedtwigg
Copy link
Member

nedtwigg commented Jan 5, 2018

Thanks for the PR! As mentioned in the issue, we want to keep compat with 2.14. Can you add an integration test that uses TestKit to confirm that our code still works with Gradle 2.14?

@nedtwigg
Copy link
Member

nedtwigg commented Jan 5, 2018

Edit: apologies - you already used Testkit to fix to 2.14.1! Thanks!

@nedtwigg
Copy link
Member

nedtwigg commented Jan 5, 2018

Once CI is fixed and the wrapper task is removed, this LGTM!

.gitattributes Outdated
@@ -1,2 +1,2 @@
* text eol=lf
* text=auto
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for some reason eol=lf was doing something weird to gradle/wrapper/gradle-wrapper.jar and was causing it not to be usable. this caused the previous CI failure. changing this to text=auto fixed it.

Copy link
Member

Choose a reason for hiding this comment

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

This change will break the tests when run on a windows machine. Maybe instead add a line marking gradle-wrapper.jar as binary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the documentation it seems that auto should automatically set the line endings to LF when git detects that it is a text file. However, I don't have a windows machine to test this one. Do you?

Set to string value "auto"
When text is set to "auto", the path is marked for automatic end-of-line conversion. If Git decides that the content is text, its line endings are converted to LF on checkin. When the file has been committed with CRLF, no conversion is done.

From: https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

Copy link
Member

Choose a reason for hiding this comment

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

Looks like you're right, but I'd still rather not depend on Git's auto-detection.

Right now it's this, which has worked for a long time:

* text eol=lf
*.png binary

This seems like the safest bet:

* text eol=lf
*.png binary
*.jar binary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, i'll change it then.

Also maintain testing compatibility with 2.14.1.

Fixes diffplug#161
@runningcode
Copy link
Contributor Author

Updated to mark *.jar files as binary files for eol markings.

@nedtwigg nedtwigg merged commit c8b92ca into diffplug:master Jan 8, 2018
@nedtwigg
Copy link
Member

nedtwigg commented Jan 8, 2018

Great, thanks @runningcode!

@runningcode runningcode deleted the no/update-gradle branch January 8, 2018 15:05
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.

2 participants