File tree Expand file tree Collapse file tree 6 files changed +43
-10
lines changed
source/ExportUnityPackage Expand file tree Collapse file tree 6 files changed +43
-10
lines changed Original file line number Diff line number Diff line change 64
64
runs-on : ubuntu-latest
65
65
steps :
66
66
- name : Fetch All builds
67
- uses : actions/download-artifact@v3
67
+ uses : actions/download-artifact@v4
68
68
with :
69
69
path : built_artifact
70
70
Original file line number Diff line number Diff line change 33
33
jobs :
34
34
build_desktop :
35
35
name : build-macOS-unity${{ inputs.unity_version}}
36
- runs-on : macos-13
36
+ runs-on : macos-15
37
37
strategy :
38
38
fail-fast : false
39
39
40
40
steps :
41
- - uses : actions/checkout@v3
41
+ - uses : actions/checkout@v4
42
42
43
43
- id : build_setup
44
44
uses : ./gha/build_setup
@@ -89,15 +89,15 @@ jobs:
89
89
fi
90
90
91
91
- name : Upload build results artifact
92
- uses : actions/upload-artifact@v3
92
+ uses : actions/upload-artifact@v4
93
93
if : ${{ !cancelled() }}
94
94
with :
95
95
name : ${{ env.assetPackageArtifactName }}
96
96
path : build/external-dependency-manager.unitypackage
97
97
retention-days : ${{ env.artifactRetentionDays }}
98
98
99
99
- name : Upload build results artifact
100
- uses : actions/upload-artifact@v3
100
+ uses : actions/upload-artifact@v4
101
101
if : ${{ !cancelled() }}
102
102
with :
103
103
name : ${{ env.tarballPackageArtifactName }}
Original file line number Diff line number Diff line change @@ -107,12 +107,12 @@ jobs:
107
107
108
108
test_on_macos :
109
109
name : test-macOS-unity${{ needs.check_and_prepare.outputs.unity_version }}
110
- runs-on : macos-13
110
+ runs-on : macos-15
111
111
needs : [check_and_prepare]
112
112
strategy :
113
113
fail-fast : false
114
114
steps :
115
- - uses : actions/checkout@v3
115
+ - uses : actions/checkout@v4
116
116
- id : build_setup
117
117
uses : ./gha/build_setup
118
118
timeout-minutes : 30
@@ -168,7 +168,7 @@ jobs:
168
168
release_license : " true"
169
169
170
170
- name : Upload build logs
171
- uses : actions/upload-artifact@v3
171
+ uses : actions/upload-artifact@v4
172
172
if : ${{ !cancelled() }}
173
173
with :
174
174
name : logs
Original file line number Diff line number Diff line change 42
42
using : ' composite'
43
43
steps :
44
44
# Download GHA tools and requirements from Firebase Unity SDK repo
45
- - uses : actions/checkout@v3
45
+ - uses : actions/checkout@v4
46
46
with :
47
47
repository : firebase/firebase-unity-sdk
48
48
path : external/firebase-unity-sdk
51
51
sparse-checkout-cone-mode : false
52
52
53
53
- name : Setup python
54
- uses : actions/setup-python@v4
54
+ uses : actions/setup-python@v5
55
55
with :
56
56
python-version : ${{ inputs.python_version }}
57
57
Original file line number Diff line number Diff line change @@ -1851,6 +1851,12 @@ def importer_metadata(self):
1851
1851
if "Android" in platforms and cpu_string != "AnyCPU" :
1852
1852
importer_metadata = Asset .set_cpu_for_android (
1853
1853
importer_metadata , cpu_string )
1854
+
1855
+ # set define constraints
1856
+ define_constraints = safe_dict_get_value (self ._json , "defineConstraints" , default_value = None )
1857
+ if define_constraints :
1858
+ importer_metadata ["PluginImporter" ]["defineConstraints" ] = define_constraints
1859
+
1854
1860
else :
1855
1861
raise ProjectConfigurationError (
1856
1862
"Unknown importer type %s for package %s, paths %s" % (
Original file line number Diff line number Diff line change @@ -2181,6 +2181,33 @@ def test_importer_metadata_standalone_only_x86_64(self):
2181
2181
"platforms" : ["Standalone" ],
2182
2182
"cpu" : "x86_64" }).importer_metadata )
2183
2183
2184
+ def test_importer_define_constraints (self ):
2185
+ """Test defineConstraints property."""
2186
+ define_constraints = ["UNITY_EDITOR" , "UNITY_IOS" ]
2187
+ self .plugin_metadata ["PluginImporter" ]["defineConstraints" ] = define_constraints
2188
+ self .assertEqual (
2189
+ self .plugin_metadata ,
2190
+ export_unity_package .AssetConfiguration (
2191
+ self .package , {
2192
+ "importer" : "PluginImporter" ,
2193
+ "defineConstraints" : define_constraints
2194
+ }).importer_metadata )
2195
+
2196
+ def test_importer_define_constraints_upm (self ):
2197
+ """Test defineConstraints property for UPM."""
2198
+ define_constraints = ["UNITY_EDITOR" , "UNITY_IOS" ]
2199
+ self .plugin_metadata ["PluginImporter" ]["defineConstraints" ] = define_constraints
2200
+ self .assertEqual (
2201
+ self .plugin_metadata ,
2202
+ export_unity_package .AssetConfiguration (
2203
+ self .package , {
2204
+ "importer" : "PluginImporter" ,
2205
+ "override_metadata_upm" : {
2206
+ "PluginImporter" : {
2207
+ "defineConstraints" : define_constraints
2208
+ }
2209
+ }
2210
+ }).override_metadata_upm )
2184
2211
2185
2212
class AssetPackageAndProjectFileOperationsTest (absltest .TestCase ):
2186
2213
"""Tests for file operation methods."""
You can’t perform that action at this time.
0 commit comments