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

Add .gitattributes to make spotlessApply work on Windows #691

Merged
merged 8 commits into from
Jan 19, 2023

Conversation

TWiStErRob
Copy link
Contributor

Original behavior: gradlew spotlessApply -> all files changed

Steps:

New behavior: If I run spotless again, it changes nothing, unless there's actually something wrong.

Please someone on Mac/linux check out the branch test this (on an existing and a new clone):

  • change a file in paparazzi/paparazzi-gradle-plugin/src/main/kotlin
  • git status (observe changed file)
  • run ./gradlew -p paparazzi spotlessApply
  • git status (observe no changed files)

.gitattributes Outdated Show resolved Hide resolved
.gitattributes Outdated
# Gradle files
*.gradle text eol=lf
*.properties text eol=lf
*.bat text eol=crlf
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Something is fishy still, even after resetting gradlew.bat keeps changing, any ideas welcome.

I tried autocrlf=true and false, and then reset, but no luck.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re-cloned and all good, but I was able to reproduce it with the code here: https://stackoverflow.com/q/48642692/253468

This however fixes it: https://stackoverflow.com/a/19588910/253468

Right now it's above my git abilities, but it should be fine considering retrofit uses the same file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was solved in: #721

build.gradle Outdated Show resolved Hide resolved
@jrodbx jrodbx merged commit dc9748f into cashapp:master Jan 19, 2023
@TWiStErRob TWiStErRob deleted the gitlf branch January 20, 2023 11:09
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.

3 participants