comparison init40.gradle @ 271:16c2e0ea6501

fix copyright update
author smith@nwoca.org
date Mon, 07 Jan 2019 13:50:21 +0000
parents d9f3e7fe251f
children 1d63556430a6
comparison
equal deleted inserted replaced
270:d9f3e7fe251f 271:16c2e0ea6501
141 141
142 rootProject.afterEvaluate { r -> 142 rootProject.afterEvaluate { r ->
143 if (gradle.bambooBuild && r.hasProperty('requireJavaVersion')) { 143 if (gradle.bambooBuild && r.hasProperty('requireJavaVersion')) {
144 gradle.runtimeInfo.requireJava( r.getProperty('requireJavaVersion') ) 144 gradle.runtimeInfo.requireJava( r.getProperty('requireJavaVersion') )
145 } 145 }
146 // if (!gradle.bambooBuild && !r.file('.idea/copyright/ODE.xml').exists() ) { 146 if (!gradle.bambooBuild && !r.file('.idea/copyright/ODE.xml').exists() ) {
147 // r.file('.idea/copyright').mkdirs() 147 updateCopyrightProfile(r)
148 // r.file('.idea/copyright/ODE.xml').text = new File("${gradle.ssdtDevelkitLocation}/ODE-copyright.xml").text 148 }
149 // r.file('.idea/copyright/profiles_settings.xml').text = new File("${gradle.ssdtDevelkitLocation}/profiles_settings-copyright.xml").text
150 // }
151 } 149 }
152 150
153 def findComponent(project, name) { 151 def findComponent(project, name) {
154 project.component.find { it.@name == name } 152 project.component.find { it.@name == name }
155 } 153 }
596 environments << 'environment' 594 environments << 'environment'
597 gradle.ext.environments = environments 595 gradle.ext.environments = environments
598 596
599 } 597 }
600 598
599 def updateCopyrightProfile(Project r) {
600 r.file('.idea/copyright').mkdirs()
601 r.file('.idea/copyright/ODE.xml').text =
602 '''<component name="CopyrightManager">
603 <copyright>
604 <option name="notice" value="Copyright (c) &amp;#36;today.year. Ohio Department of Education. - All Rights Reserved.&#10;Unauthorized copying of this file, in any medium, is strictly prohibited.&#10;Written by the State Software Development Team (http://ssdt.oecn.k12.oh.us/)&#10;" />
605 <option name="myName" value="ODE" />
606 </copyright>
607 </component>'''
608
609 r.file('.idea/copyright/profiles_settings.xml').text =
610 '''<component name="CopyrightManager">
611 <settings default="ODE" />
612 </component>'''
613
614 }
601 615
602 @ToString(includeNames=true) 616 @ToString(includeNames=true)
603 class RuntimeInfo { 617 class RuntimeInfo {
604 // OS memory in megabytes, zero if unknown 618 // OS memory in megabytes, zero if unknown
605 int systemMemory = 0 619 int systemMemory = 0
809 stream = it 823 stream = it
810 } 824 }
811 } 825 }
812 } 826 }
813 } 827 }
814 828
815 } 829 }
816 830
831
832