Skip to content

Update gradle version to 4.4.1. - #186

Merged
nedtwigg merged 1 commit into
diffplug:masterfrom
runningcode:no/update-gradle
Jan 8, 2018
Merged

nedtwigg merged 1 commit into
diffplug:masterfrom
runningcode:no/update-gradle

Conversation

@runningcode

Copy link
Copy Markdown
Contributor

Also maintain testing compatibility with 2.14.1.

Fixes #161

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

@nedtwigg nedtwigg Jan 5, 2018 •

Copy link
Copy Markdown
Member

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

nedtwigg commented Jan 5, 2018

Copy link
Copy Markdown
Member

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

nedtwigg commented Jan 5, 2018

Copy link
Copy Markdown
Member

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

@nedtwigg

nedtwigg commented Jan 5, 2018

Copy link
Copy Markdown
Member

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

Comment thread .gitattributes Outdated
@@ -1,2 +1,2 @@
* text eol=lf
* text=auto

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

nedtwigg commented Jan 8, 2018

Copy link
Copy Markdown
Member

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