{"id":17993497,"url":"https://github.com/stempler/gradle-eclipseconfig","last_synced_at":"2025-03-26T01:32:14.450Z","repository":{"id":57740854,"uuid":"66140470","full_name":"stempler/gradle-eclipseconfig","owner":"stempler","description":"Simple plugin for configuring basic editor settings for your Gradle generated Eclipse project based on EditorConfig.","archived":false,"fork":false,"pushed_at":"2018-10-31T16:17:21.000Z","size":89,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T01:34:01.748Z","etag":null,"topics":["eclipse","editorconfig","gradle","gradle-eclipse-plugin","gradle-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stempler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-20T10:07:17.000Z","updated_at":"2019-07-19T19:06:46.000Z","dependencies_parsed_at":"2022-09-06T23:30:31.766Z","dependency_job_id":null,"html_url":"https://github.com/stempler/gradle-eclipseconfig","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stempler%2Fgradle-eclipseconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stempler%2Fgradle-eclipseconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stempler%2Fgradle-eclipseconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stempler%2Fgradle-eclipseconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stempler","download_url":"https://codeload.github.com/stempler/gradle-eclipseconfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245572007,"owners_count":20637431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eclipse","editorconfig","gradle","gradle-eclipse-plugin","gradle-plugin"],"created_at":"2024-10-29T20:11:42.838Z","updated_at":"2025-03-26T01:32:14.180Z","avatar_url":"https://github.com/stempler.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"gradle-eclipseconfig\n====================\n\nSimple plugin for configuring basic editor settings for your Gradle generated Eclipse project based on EditorConfig.\nIt builds on the [Gradle Eclipse plugin](https://docs.gradle.org/current/userguide/eclipse_plugin.html) and adapts the settings of the project generated with `gradle eclipse`.\n\n\nUsage\n-----\n\n### Gradle 2.1 and higher\n\n```groovy\nplugins {\n  id \"org.standardout.eclipseconfig\" version \"1.1.1\"\n}\n```\n\n### All Gradle versions\n\n```groovy\nbuildscript {\n  repositories {\n    jcenter()\n  }\n  dependencies {\n    classpath 'org.standardout:gradle-eclipseconfig:1.1.1'\n  }\n}\n\napply plugin: 'org.standardout.eclipseconfig'\n```\n\nApplying the *eclipseconfig* plugin will implicitly also apply the Gradle built-in *eclipse* plugin (if it is not applied yet), as *eclipseconfig* extends its tasks.\n\n### Getting started\n\nFor configuring the plugin you should use an `.editorconfig` file. See the following sections for more information and configuration options apart from [EditorConfig](http://editorconfig.org/).\n\nHere is a small example on how the `.editorconfig` might look like:\n\n```\nroot = true\n\n[*]\ncharset = utf-8\ntrim_trailing_whitespace = true\nindent_style = space\nindent_size = 2\n```\n\nTo generate the Eclipse project use the `eclipse` task of the Gradle Eclipse plugin:\n\n```\ngradle eclipse\n```\n\nIf you want to make sure that the project contains only the generated content and settings, also run `cleanEclipse`:\n\n```\ngradle cleanEclipse eclipse\n```\n\n\nConfiguration\n-------------\n\n### EditorConfig\n\nSettings for editors are defined using an `.editorconfig` file. See the [EditorConfig website](http://editorconfig.org/) for more information. EditorConfig allows for configuring indentation, trailing whitespace, line endings, encoding and other properties for the files to be edited.\nA subset of these configuration options is supported by *gradle-eclipseconfig*.\n\nUsing this configuration format you can easily apply the settings for editing your project files to other editors.\nThere are [EditorConfig plugins](http://editorconfig.org/#download) for many applications available, for some (like IntelliJ IDEA) support is already built in.\n\nThere is also an [EditorConfig Eclipse plugin](https://github.com/ncjones/editorconfig-eclipse#readme), which you might want to check out - you can also use it in conjunction with *gradle-eclipseconfig*.\nThe main differences of the two are:\n- *gradle-eclipseconfig* adapts the generated Eclipse project, while the Eclipse plugin applies the settings when an editor is opened (and thus can apply different settings depending on the location in the project)\n- *gradle-eclipseconfig* doesn't require any plugins being installed in Eclipse\n- which EditorConfig properties are supported (see also below)\n\n#### Supported properties\n\n- `indent_style` (Java/JDT)\n- `indent_size` (Java/JDT)\n- `tab_width` (Java/JDT)\n- `trim_trailing_whitespace` (Java/JDT)\n- `charset`\n- `end_of_line`\n\n#### Limitations\n\n*gradle-eclipseconfig* works a bit diferently than the usual EditorConfig plugin. As it adapts the project settings, it can't provide individual settings for files being opened. Instead it applies a general configuration on the whole project.\n\nThe project settings that are set right now are related to the Eclipse JDT (Java Development Tools) - so the settings apply to developing with Java, but apply for instance also for the *Groovy Eclipse* plugin.\n\n\n### Code templates\n\nEclipse projects allow code templates to be configured. If you provide a `codetemplates.xml` file in your project directory, *gradle-eclipseconfig* will pick it up and use it to configure the Eclipse project with your code templates.\n\nThe easiest way to create such a file is by exporting it from Eclipse. You can do so either in the workspace settings or in the settings of a project (*Java Code Style*/*Code Templates*).\n\nIf you are having problems with the code templates not being applied, check if your templates are marked as enabled (`enabled=\"true\"`) and are *not* marked deleted (should be `deleted=\"false\"`).\n\nYou can also use code templates from a custom location. This allows you for instance to use a single template in a multi-project setup. Tell *gradle-eclipseconfig* where to locate the file, for example like this:\n\n```groovy\neclipseconfig {\n  codeTemplates = rootProject.file('codetemplates.xml')\n}\n```\n\n\n### Custom settings\n\nEclipse project configuration is done via a couple of XML and Properties files.\nIn addition to the predefined configuration options you can also configure properties on your own.\n\nTo learn what kind of properties you can set, the easiest approach is usually to change the project settings in Eclipse via the UI, and then inspect the configuration files.\n\n#### JDT UI properties\n\nYou can configure JDT UI properties that are not directly supported by *gradle-eclipseconfig*, by specifying them explicitly like this:\n\n```groovy\neclipseconfig {\n  jdtUI { properties -\u003e\n    // set properties for the file org.eclipse.jdt.ui.prefs\n\n    // make private fields final on save, if possible\n    properties.'sp_cleanup.make_variable_declarations_final' = true\n    properties.'sp_cleanup.make_private_fields_final' = true\n  }\n}\n```\n\nIn the JDT UI settings for instance the Eclipse Editor save actions are configured.\nSo if you want to do more than just removing trailing white space on save, you can add the respective properties here.\n\n#### JDT Core properties\n\nThe Gradle Eclipse plugin already offers the possibility to adapt the JDT properties, for example:\n\n```groovy\neclipse {\n  jdt {\n    file {\n      withProperties { properties -\u003e\n        // set properties for the file org.eclipse.jdt.core.prefs\n        properties['org.eclipse.jdt.core.compiler.debug.lineNumber'] = 'generate'\n      }\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstempler%2Fgradle-eclipseconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstempler%2Fgradle-eclipseconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstempler%2Fgradle-eclipseconfig/lists"}