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

merged add-gradle-support to main branch and now code doesnt work? #95

Closed
Marcon2509 opened this issue Aug 28, 2020 · 7 comments
Closed

Comments

@Marcon2509
Copy link

I am trying to do the A-gradle increment but after following the steps(Merge the branch, reimport using gradle.build) i managed to get the gradle thing working. However when i try to run my code, certain parts of it now fail. For example, [✓] or [✗] now gives [?] which i have previously never had issue with and the command find (example find book) now doesnt work despite the code still being the same. Please advice on the issue thank you!

@Marcon2509
Copy link
Author

For some clarification i went to download my project from my own tag (Level-9) and tried running it normally and it works fine

@Marcon2509
Copy link
Author

Update: looked through my code and realized that there was duplicated variables due to the merging of Level9 AddJAvadocs that cause the find command to not work so that issue is fixed. However still having trouble with the [✓] or [✗] now gives [?] issue. Im on windows and am trying to fix using #64

@Marcon2509
Copy link
Author

Update2: fixed [✓] or [✗] now gives [?] issue but not sure if it was the legitimate way of to fix it
i now just used the actual symbol instead of \u2713. Tried to add set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 to runtest.bat but no luck
public String getStatusIcon() { return (isDone ? "✓" : "✗"); //return tick or X symbols "\u2713" : "\u2718" }

@Jh123x
Copy link

Jh123x commented Aug 28, 2020

Maybe add this to your build.gradle might help

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

Source

@aidoxe-123
Copy link

Maybe add this to your build.gradle might help

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

Source

This doesn't work for me

@tanweijie123
Copy link

tanweijie123 commented Aug 29, 2020

Hi. I encountered the same problem as you, and managed to fix it by changing:

Run > Edit Configuration (Duke) > VM options: -Dfile.encoding=UTF-8

@Marcon2509
Copy link
Author

@tanweijie123 yeah that works thanks alot

CodyChew added a commit to CodyChew/ip that referenced this issue Aug 30, 2020
Task done attribute makes use of UTF-8 encoding for task description.

Let's configure Gradle compiler encoding to 'UTF-8'.

Refer to article on setting UTF-8 properly in gradle:
https://www.thetopsites.net/article/58616121.shtml
Refer to this discussion on setting up UTF-8 to gradle:
nus-cs2103-AY2021S1/forum#95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants