[GRADLE-2274] Make the eclipse plugin honour encoding options for Java/Groovy source folders Created: 03/May/12  Updated: 21/Nov/16  Resolved: 21/Nov/16

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-rc-3
Fix Version/s: None

Type: Improvement
Reporter: Mauro Molinari Assignee: Unassigned
Resolution: Duplicate Votes: 8


If I set the following in my build.gradle:

apply plugin: 'java'
compileJava.options.encoding = 'UTF-8'

I would expect that, when I invoke 'gradle eclipse', the generated project has the necessary project-specific settings to use the 'UTF-8' encoding on the Java source folders.
Instead, no encoding is currently set on the generated project and all the folders (including the Java source folders) have just the "Inherited from container" encoding option set.

The same applies to Groovy source sets for a project that applies the groovy plugin.

This improvement would be extremely appreciated.

Comment by Oliver Kopp [ 04/Oct/15 ]

At GRADLE-1010, a solution is shown - see https://issues.gradle.org/browse/GRADLE-1010?focusedCommentId=15225&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15225

eclipseJdt <<

{ File f = file('.settings/org.eclipse.core.resources.prefs') f.write('eclipse.preferences.version=1\n') f.append('encoding/<project>=ISO-8859-1') }


Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Oliver Kopp [ 19/Nov/16 ]

I created a follow on GitHub at https://github.com/gradle/gradle/issues/898

So this can be closed.

Comment by Eric Wendelin [ 21/Nov/16 ]

Moved to https://github.com/gradle/gradle/issues/898

Generated at Wed Jun 30 12:17:29 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.