@@ -59,13 +59,22 @@ function New-TestRepo {
5959 {
6060 "name": "com.mrdav30.fixedmathsharp",
6161 "gitUrl": "https://github.com/mrdav30/FixedMathSharp-Unity.git?path=/com.mrdav30.fixedmathsharp",
62- "versionKey": "FixedMathSharpUnity"
62+ "versionKey": "FixedMathSharpUnity",
63+ "asmdefVersionDefine": true
6364 },
6465 {
6566 "name": "com.mrdav30.swiftcollections",
6667 "gitUrl": "https://github.com/mrdav30/SwiftCollections-Unity.git?path=/com.mrdav30.swiftcollections",
67- "versionKey": "SwiftCollectionsUnity"
68+ "versionKey": "SwiftCollectionsUnity",
69+ "asmdefVersionDefine": true
6870 }
71+ ],
72+ "asmdefs": [
73+ "Runtime/GridForge.Runtime.asmdef"
74+ ],
75+ "optionalAsmdefs": [
76+ "Samples/GridforgeDemo/GridForge.Samples.asmdef",
77+ "Samples/GridforgeDemo/Missing.Optional.asmdef"
6978 ]
7079 },
7180 {
@@ -76,13 +85,21 @@ function New-TestRepo {
7685 {
7786 "name": "com.mrdav30.fixedmathsharp.lean",
7887 "gitUrl": "https://github.com/mrdav30/FixedMathSharp-Unity.git?path=/com.mrdav30.fixedmathsharp.lean",
79- "versionKey": "FixedMathSharpUnity"
88+ "versionKey": "FixedMathSharpUnity",
89+ "asmdefVersionDefine": true
8090 },
8191 {
8292 "name": "com.mrdav30.swiftcollections.lean",
8393 "gitUrl": "https://github.com/mrdav30/SwiftCollections-Unity.git?path=/com.mrdav30.swiftcollections.lean",
84- "versionKey": "SwiftCollectionsUnity"
94+ "versionKey": "SwiftCollectionsUnity",
95+ "asmdefVersionDefine": true
8596 }
97+ ],
98+ "asmdefs": [
99+ "Runtime/GridForge.Lean.Runtime.asmdef"
100+ ],
101+ "optionalAsmdefs": [
102+ "Samples/GridforgeDemo/GridForge.Lean.Samples.asmdef"
86103 ]
87104 }
88105 ]
@@ -135,6 +152,86 @@ private static readonly Dependency[] RequiredDependencies =
135152 "v4.0.0"
136153 )
137154};
155+ '@
156+
157+ New-TestFile - Path (Join-Path $repoRoot " com.mrdav30.gridforge/Runtime/GridForge.Runtime.asmdef" ) - Content @'
158+ {
159+ "name": "GridForge.Runtime",
160+ "defineConstraints": [
161+ "GRIDFORGE_HAS_FIXEDMATHSHARP",
162+ "GRIDFORGE_HAS_SWIFTCOLLECTIONS"
163+ ],
164+ "versionDefines": [
165+ {
166+ "name": "com.mrdav30.fixedmathsharp",
167+ "expression": "4.0.0",
168+ "define": "GRIDFORGE_HAS_FIXEDMATHSHARP"
169+ },
170+ {
171+ "name": "com.mrdav30.swiftcollections",
172+ "expression": "4.0.0",
173+ "define": "GRIDFORGE_HAS_SWIFTCOLLECTIONS"
174+ }
175+ ]
176+ }
177+ '@
178+
179+ New-TestFile - Path (Join-Path $repoRoot " com.mrdav30.gridforge/Samples/GridforgeDemo/GridForge.Samples.asmdef" ) - Content @'
180+ {
181+ "name": "GridForge.Samples",
182+ "versionDefines": [
183+ {
184+ "name": "com.mrdav30.fixedmathsharp",
185+ "expression": "4.0.0",
186+ "define": "GRIDFORGE_HAS_FIXEDMATHSHARP"
187+ },
188+ {
189+ "name": "com.mrdav30.swiftcollections",
190+ "expression": "4.0.0",
191+ "define": "GRIDFORGE_HAS_SWIFTCOLLECTIONS"
192+ }
193+ ]
194+ }
195+ '@
196+
197+ New-TestFile - Path (Join-Path $repoRoot " com.mrdav30.gridforge.lean/Runtime/GridForge.Lean.Runtime.asmdef" ) - Content @'
198+ {
199+ "name": "GridForge.Lean.Runtime",
200+ "defineConstraints": [
201+ "GRIDFORGE_LEAN_HAS_FIXEDMATHSHARP",
202+ "GRIDFORGE_LEAN_HAS_SWIFTCOLLECTIONS"
203+ ],
204+ "versionDefines": [
205+ {
206+ "name": "com.mrdav30.fixedmathsharp.lean",
207+ "expression": "4.0.0",
208+ "define": "GRIDFORGE_LEAN_HAS_FIXEDMATHSHARP"
209+ },
210+ {
211+ "name": "com.mrdav30.swiftcollections.lean",
212+ "expression": "4.0.0",
213+ "define": "GRIDFORGE_LEAN_HAS_SWIFTCOLLECTIONS"
214+ }
215+ ]
216+ }
217+ '@
218+
219+ New-TestFile - Path (Join-Path $repoRoot " com.mrdav30.gridforge.lean/Samples/GridforgeDemo/GridForge.Lean.Samples.asmdef" ) - Content @'
220+ {
221+ "name": "GridForge.Lean.Samples",
222+ "versionDefines": [
223+ {
224+ "name": "com.mrdav30.fixedmathsharp.lean",
225+ "expression": "4.0.0",
226+ "define": "GRIDFORGE_LEAN_HAS_FIXEDMATHSHARP"
227+ },
228+ {
229+ "name": "com.mrdav30.swiftcollections.lean",
230+ "expression": "4.0.0",
231+ "define": "GRIDFORGE_LEAN_HAS_SWIFTCOLLECTIONS"
232+ }
233+ ]
234+ }
138235'@
139236
140237 return $repoRoot
@@ -198,10 +295,22 @@ function Test-ApplyUpdatesPackageAndInstallerVersions {
198295 Assert-Contains - Text $standardInstaller - Expected " https://github.com/mrdav30/SwiftCollections-Unity.git?path=/com.mrdav30.swiftcollections" - Message " Apply should update standard SwiftCollections git URL."
199296 Assert-Contains - Text $standardInstaller - Expected ' "v5.0.0"' - Message " Apply should update standard dependency versions."
200297
298+ $standardAsmdef = Get-FileText - Path (Join-Path $repoRoot " com.mrdav30.gridforge/Runtime/GridForge.Runtime.asmdef" )
299+ Assert-Contains - Text $standardAsmdef - Expected ' "expression": "5.0.0"' - Message " Apply should update standard asmdef dependency version defines."
300+
301+ $standardAuthoringSamplesAsmdef = Get-FileText - Path (Join-Path $repoRoot " com.mrdav30.gridforge/Samples/GridforgeDemo/GridForge.Samples.asmdef" )
302+ Assert-Contains - Text $standardAuthoringSamplesAsmdef - Expected ' "expression": "5.0.0"' - Message " Apply should update optional standard authoring sample asmdef dependency version defines."
303+
201304 $leanInstaller = Get-FileText - Path (Join-Path $repoRoot " com.mrdav30.gridforge.lean/Editor/Utility/DependencyInstaller/GitDependencyInstaller.cs" )
202305 Assert-Contains - Text $leanInstaller - Expected " https://github.com/mrdav30/FixedMathSharp-Unity.git?path=/com.mrdav30.fixedmathsharp.lean" - Message " Apply should update lean FixedMathSharp git URL."
203306 Assert-Contains - Text $leanInstaller - Expected " https://github.com/mrdav30/SwiftCollections-Unity.git?path=/com.mrdav30.swiftcollections.lean" - Message " Apply should update lean SwiftCollections git URL."
204307 Assert-Contains - Text $leanInstaller - Expected ' "v5.0.0"' - Message " Apply should update lean dependency versions."
308+
309+ $leanAsmdef = Get-FileText - Path (Join-Path $repoRoot " com.mrdav30.gridforge.lean/Runtime/GridForge.Lean.Runtime.asmdef" )
310+ Assert-Contains - Text $leanAsmdef - Expected ' "expression": "5.0.0"' - Message " Apply should update lean asmdef dependency version defines."
311+
312+ $leanAuthoringSamplesAsmdef = Get-FileText - Path (Join-Path $repoRoot " com.mrdav30.gridforge.lean/Samples/GridforgeDemo/GridForge.Lean.Samples.asmdef" )
313+ Assert-Contains - Text $leanAuthoringSamplesAsmdef - Expected ' "expression": "5.0.0"' - Message " Apply should update optional lean authoring sample asmdef dependency version defines."
205314}
206315
207316function Test-ValidateOnlyFailsWhenFilesDrift {
0 commit comments