7373 <WriteLinesToFile File =" templates\cakeglobaljson\.template.config\template.json" Lines =" $(TemplateJsonContent)" Overwrite =" true" />
7474 </Target >
7575
76+ <Target Name =" UpdateCakeMinimalFileTemplate" BeforeTargets =" PrepareForBuild" >
77+ <!-- Generate the template.json content with replaced placeholders -->
78+ <PropertyGroup >
79+ <TemplateJsonContent ><![CDATA[ {
80+ "$schema": "http://json.schemastore.org/template",
81+ "author": "Cake Contributors",
82+ "classifications": [
83+ "Console",
84+ "Cake",
85+ "Build"
86+ ],
87+ "name": "Trivial Cake SDK File-based",
88+ "description": "A trivial Cake build script using file-based approach with Cake.Sdk",
89+ "identity": "Cake.Sdk.MinimalFile",
90+ "groupIdentity": "Cake.Sdk.MinimalFile",
91+ "shortName": "cakeminimalfile",
92+ "sourceName": "cake",
93+ "tags": {
94+ "language": "C#",
95+ "type": "item"
96+ },
97+ "preferNameDirectory": false,
98+ "primaryOutputs": [
99+ {
100+ "path": "cake.cs"
101+ }
102+ ],
103+ "symbols": {
104+ "CakeSdkVersion": {
105+ "type": "parameter",
106+ "datatype": "string",
107+ "description": "The Cake.Sdk version to use",
108+ "defaultValue": "$(Version)",
109+ "replaces": "CakeSdkVersion"
110+ }
111+ }
112+ }]]> </TemplateJsonContent >
113+ </PropertyGroup >
114+ <!-- Write the updated template.json -->
115+ <WriteLinesToFile File =" templates\cakeminimalfile\.template.config\template.json" Lines =" $(TemplateJsonContent)" Overwrite =" true" />
116+ </Target >
117+
118+ <Target Name =" UpdateCakeFileTemplate" BeforeTargets =" PrepareForBuild" >
119+ <!-- Generate the template.json content with replaced placeholders -->
120+ <PropertyGroup >
121+ <TemplateJsonContent ><![CDATA[ {
122+ "$schema": "http://json.schemastore.org/template",
123+ "author": "Cake Contributors",
124+ "classifications": [
125+ "Console",
126+ "Cake",
127+ "Build"
128+ ],
129+ "name": "Cake SDK File-based",
130+ "description": "A Cake build script using file-based approach with Cake.Sdk",
131+ "identity": "Cake.Sdk.File",
132+ "groupIdentity": "Cake.Sdk.File",
133+ "shortName": "cakefile",
134+ "sourceName": "cake",
135+ "tags": {
136+ "language": "C#",
137+ "type": "item"
138+ },
139+ "preferNameDirectory": false,
140+ "primaryOutputs": [
141+ {
142+ "path": "cake.cs"
143+ }
144+ ],
145+ "symbols": {
146+ "IncludeExampleProject": {
147+ "type": "parameter",
148+ "datatype": "bool",
149+ "description": "Include example project structure with solution, main project and test project",
150+ "defaultValue": "false"
151+ },
152+ "CakeSdkVersion": {
153+ "type": "parameter",
154+ "datatype": "string",
155+ "description": "The Cake.Sdk version to use",
156+ "defaultValue": "$(Version)",
157+ "replaces": "CakeSdkVersion"
158+ }
159+ },
160+ "sources": [
161+ {
162+ "modifiers": [
163+ {
164+ "condition": "!(IncludeExampleProject)",
165+ "exclude": [
166+ "src/**/*"
167+ ]
168+ }
169+ ]
170+ }
171+ ]
172+ }]]> </TemplateJsonContent >
173+ </PropertyGroup >
174+ <!-- Write the updated template.json -->
175+ <WriteLinesToFile File =" templates\cakefile\.template.config\template.json" Lines =" $(TemplateJsonContent)" Overwrite =" true" />
176+ </Target >
177+
178+ <Target Name =" UpdateCakeMultiFileTemplate" BeforeTargets =" PrepareForBuild" >
179+ <!-- Generate the template.json content with replaced placeholders -->
180+ <PropertyGroup >
181+ <TemplateJsonContent ><![CDATA[ {
182+ "$schema": "http://json.schemastore.org/template",
183+ "author": "Cake Contributors",
184+ "classifications": [
185+ "Console",
186+ "Cake",
187+ "Build"
188+ ],
189+ "name": "Cake SDK Multi-file File-based",
190+ "description": "A Cake build script using multi-file structure with Cake.Sdk",
191+ "identity": "Cake.Sdk.File.Multifile",
192+ "groupIdentity": "Cake.Sdk.File.Multifile",
193+ "shortName": "cakemultifile",
194+ "sourceName": "cake",
195+ "tags": {
196+ "language": "C#",
197+ "type": "item"
198+ },
199+ "preferNameDirectory": false,
200+ "primaryOutputs": [
201+ {
202+ "path": "cake.cs"
203+ },
204+ {
205+ "path": "build/Models.cs"
206+ },
207+ {
208+ "path": "build/Utilities.cs"
209+ }
210+ ],
211+ "symbols": {
212+ "CakeSdkVersion": {
213+ "type": "parameter",
214+ "datatype": "string",
215+ "description": "The Cake.Sdk version to use",
216+ "defaultValue": "$(Version)",
217+ "replaces": "CakeSdkVersion"
218+ }
219+ }
220+ }]]> </TemplateJsonContent >
221+ </PropertyGroup >
222+ <!-- Write the updated template.json -->
223+ <WriteLinesToFile File =" templates\cakemultifile\.template.config\template.json" Lines =" $(TemplateJsonContent)" Overwrite =" true" />
224+ </Target >
225+
76226</Project >
0 commit comments