-
Notifications
You must be signed in to change notification settings - Fork 119
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
refactor: Create module with shared utilities #1418
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments but looks good 👍
@@ -0,0 +1,14 @@ | |||
# Compiled class file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we perhaps use a gitignore generator
EG : https://www.toptal.com/developers/gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey generated file is too big IMO
https://www.toptal.com/developers/gitignore/api/intellij,kotlin
import java.nio.file.Paths | ||
|
||
val userHome: String by lazy { | ||
if (isWindows) System.getenv("HOMEPATH") else System.getProperty("user.home") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need me to test locally on my machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just moved this code, should work properly 🤞
|
||
private val osName = System.getProperty("os.name")?.toLowerCase() ?: "" | ||
|
||
val isMacOS: Boolean by lazy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a isLinux? or is it the "else" case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically we just use isWindows
and isMacOS
, but we could add isLinux
|
||
fun String.normalizeLineEnding(): String { | ||
// required for tests to pass on Windows | ||
return this.replace("\r\n", "\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just copy-paste code :D
@flank-it |
Integration tests failed, you could see results here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to prevent automatic merge, until the issue with failing tests is solved
Timestamp: 2020-12-22 16:38:28 |
c8cde13
to
524d43a
Compare
524d43a
to
b1daf13
Compare
@flank-it |
Integration tests succeed, you could see results here |
Fixes #1402
:common
modules with shared utils created. Many files has been changed in this PR, however they are mostly import changesTest Plan
:common
is available, all tests passed