Mercurial > public > develkit
comparison init20.gradle @ 240:05a1bbd319bc
remove idea customizations
author | smith@nwoca.org |
---|---|
date | Tue, 25 Oct 2016 16:43:00 +0100 |
parents | 400f9d8bbf5b |
children | 1c91b76fd9a3 |
comparison
equal
deleted
inserted
replaced
239:60c552fce00d | 240:05a1bbd319bc |
---|---|
134 } | 134 } |
135 | 135 |
136 apply from: "${gradle.ssdtDevelkitLocation}/metrics.gradle" | 136 apply from: "${gradle.ssdtDevelkitLocation}/metrics.gradle" |
137 | 137 |
138 rootProject.afterEvaluate { r -> | 138 rootProject.afterEvaluate { r -> |
139 | |
140 if (gradle.bambooBuild && r.hasProperty('requireJavaVersion')) { | 139 if (gradle.bambooBuild && r.hasProperty('requireJavaVersion')) { |
141 gradle.runtimeInfo.requireJava( r.getProperty('requireJavaVersion') ) | 140 gradle.runtimeInfo.requireJava( r.getProperty('requireJavaVersion') ) |
142 } | 141 } |
143 | |
144 if (r.plugins.hasPlugin(org.gradle.plugins.ide.idea.IdeaPlugin)) { | |
145 | |
146 r.idea.project.ipr.withXml { xml -> | |
147 if (file('.hg').exists()) { | |
148 println 'enabling HG on project' | |
149 def vcs = findComponent(xml.asNode(), 'VcsDirectoryMappings') | |
150 vcs.mapping.@vcs = 'hg4idea' | |
151 } | |
152 | |
153 def codeStyle = findComponent(xml.asNode(), 'ProjectCodeStyleSettingsManager') | |
154 if (codeStyle) { | |
155 xml.asNode().remove(codeStyle) | |
156 } | |
157 | |
158 def styleManager = xml.asNode().appendNode('component', [name: 'ProjectCodeStyleSettingsManager']) | |
159 styleManager.appendNode 'option', [name: 'USE_PER_PROJECT_SETTINGS', value: true] | |
160 | |
161 def styleOptions = new NodeBuilder().option(name: 'PER_PROJECT_SETTINGS') { | |
162 value { | |
163 GroovyCodeStyleSettings { | |
164 option(name: 'CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND', value: '10') | |
165 option(name: 'PACKAGES_TO_USE_IMPORT_ON_DEMAND') { | |
166 value { | |
167 'package'(name: "java.awt", withSubpackages: false, static: false) | |
168 'package'(name: "javax.swing", withSubpackages: false, static: false) | |
169 'package'(name: "javax.persistence", withSubpackages: false, static: false) | |
170 'package'(name: "javax.validation", withSubpackages: true, static: false) | |
171 } | |
172 } | |
173 } | |
174 XML { | |
175 option(name: 'XML_LEGACY_SETTINGS_IMPORTED', value: true) | |
176 } | |
177 | |
178 } | |
179 } | |
180 | |
181 styleManager.append styleOptions | |
182 | |
183 if (r.group.contains('org.ssdt')) { | |
184 | |
185 def copyRight = findComponent(xml.asNode(), 'CopyrightManager') | |
186 if (copyRight) { | |
187 xml.asNode().remove(copyRight) | |
188 } | |
189 | |
190 copyRight = new NodeBuilder().component(name: 'CopyrightManager', default: 'ODE') { | |
191 | |
192 copyright { | |
193 option(name: 'notice', value: 'Copyright (c) $today.year. Ohio Department of Education. - All Rights Reserved.\nUnauthorized copying of this file, in any medium, is strictly prohibited.\nWritten by State Software Development Team (http://ssdt.oecn.k12.oh.us/)') | |
194 option(name: 'keyword', value: 'Copyright') | |
195 option(name: 'allowReplaceKeyword', value: 'South Front') | |
196 option(name: 'myName', value: 'ODE') | |
197 option(name: 'myLocal', value: true) | |
198 } | |
199 LanguageOptions(name: 'CSS') { | |
200 option(name: 'fileTypeOverride', value: 1) | |
201 } | |
202 LanguageOptions(name: 'JSP') { | |
203 option(name: 'fileTypeOverride', value: 1) | |
204 option(name: 'prefixLines', value: false) | |
205 } | |
206 LanguageOptions(name: 'JSPX') { | |
207 option(name: 'fileTypeOverride', value: 1) | |
208 option(name: 'prefixLines', value: false) | |
209 } | |
210 LanguageOptions(name: 'JavaScript') { | |
211 option(name: 'fileTypeOverride', value: 1) | |
212 } | |
213 LanguageOptions(name: 'Properties') { | |
214 option(name: 'fileTypeOverride', value: 1) | |
215 } | |
216 } | |
217 | |
218 xml.asNode().append copyRight | |
219 | |
220 } | |
221 } | |
222 } | |
223 | |
224 } | 142 } |
225 | 143 |
226 def findComponent(project, name) { | 144 def findComponent(project, name) { |
227 project.component.find { it.@name == name } | 145 project.component.find { it.@name == name } |
228 } | 146 } |