Skip to content

Commit 1518fe2

Browse files
chore: [SDK-4870] configure Unity UPM publishing tools (#890)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f514411 commit 1518fe2

7 files changed

Lines changed: 36 additions & 11 deletions

File tree

.github/scripts/validate-unity-distribution.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
)
1919
CORE_PACKAGE = PACKAGE_NAMES[0]
2020
MINIMUM_UNITY_VERSION = "2022.3"
21+
MINIMUM_UNITY_RELEASE = "0f1"
2122

2223
EXCLUDED_PREFIXES = (
2324
"Assets/OneSignal/Attribution",
@@ -85,6 +86,11 @@ def validate_packages() -> None:
8586
fail(f"{name} version does not match {CORE_PACKAGE}")
8687
if package.get("unity") != MINIMUM_UNITY_VERSION:
8788
fail(f"{name} does not support Unity {MINIMUM_UNITY_VERSION}")
89+
if package.get("unityRelease") != MINIMUM_UNITY_RELEASE:
90+
fail(
91+
f"{name} does not support Unity "
92+
f"{MINIMUM_UNITY_VERSION}.{MINIMUM_UNITY_RELEASE}"
93+
)
8894
if package.get("license") != "SEE LICENSE IN LICENSE.md":
8995
fail(f"{name} does not reference its package license")
9096
if not package.get("documentationUrl", "").startswith("https://"):

com.onesignal.unitysdk.android/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"displayName": "OneSignal SDK Android",
44
"version": "6.0.0",
55
"unity": "2022.3",
6+
"unityRelease": "0f1",
67
"description": "Android platform implementation for the OneSignal Unity SDK, including native dependency resolution and notification resources.",
78
"dependencies": {
89
"com.onesignal.unitysdk.core": "6.0.0"

com.onesignal.unitysdk.core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"displayName": "OneSignal SDK Core",
44
"version": "6.0.0",
55
"unity": "2022.3",
6+
"unityRelease": "0f1",
67
"description": "Core APIs, editor setup, and shared runtime for the OneSignal Unity SDK. Install the Android and/or iOS package for native platform support.",
78
"dependencies": {
89
"com.unity.modules.jsonserialize": "1.0.0"

com.onesignal.unitysdk.ios/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"displayName": "OneSignal SDK iOS",
44
"version": "6.0.0",
55
"unity": "2022.3",
6+
"unityRelease": "0f1",
67
"description": "iOS platform implementation for the OneSignal Unity SDK, including the native bridge, CocoaPods dependencies, and Xcode post-processing.",
78
"dependencies": {
89
"com.onesignal.unitysdk.core": "6.0.0"

examples/demo/Packages/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"com.onesignal.unitysdk.core": "file:../../../com.onesignal.unitysdk.core",
55
"com.onesignal.unitysdk.ios": "file:../../../com.onesignal.unitysdk.ios",
66
"com.unity.nuget.newtonsoft-json": "3.2.2",
7+
"com.unity.upm-publishing-tools": "0.3.1",
78
"com.unity.modules.androidjni": "1.0.0",
89
"com.unity.modules.uielements": "1.0.0",
910
"com.unity.modules.unitywebrequest": "1.0.0"

examples/demo/Packages/packages-lock.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@
3131
"dependencies": {},
3232
"url": "https://packages.unity.com"
3333
},
34+
"com.unity.sharp-zip-lib": {
35+
"version": "1.4.1",
36+
"depth": 1,
37+
"source": "registry",
38+
"dependencies": {},
39+
"url": "https://packages.unity.com"
40+
},
41+
"com.unity.upm-publishing-tools": {
42+
"version": "0.3.1",
43+
"depth": 0,
44+
"source": "registry",
45+
"dependencies": {
46+
"com.unity.sharp-zip-lib": "1.4.1",
47+
"com.unity.nuget.newtonsoft-json": "3.2.1"
48+
},
49+
"url": "https://packages.unity.com"
50+
},
3451
"com.unity.modules.androidjni": {
3552
"version": "1.0.0",
3653
"depth": 0,

examples/demo/ProjectSettings/PackageManagerSettings.asset

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ MonoBehaviour:
1818
m_SeeAllPackageVersions: 0
1919
m_DismissPreviewPackagesInUse: 0
2020
oneTimeWarningShown: 1
21+
oneTimePackageErrorsPopUpShown: 0
2122
m_Registries:
2223
- m_Id: main
2324
m_Name:
@@ -26,19 +27,16 @@ MonoBehaviour:
2627
m_IsDefault: 1
2728
m_Capabilities: 7
2829
m_ConfigSource: 0
29-
- m_Id: scoped:project:npmjs
30-
m_Name: npmjs
31-
m_Url: https://registry.npmjs.org
32-
m_Scopes:
33-
- com.onesignal
34-
m_IsDefault: 0
35-
m_Capabilities: 0
36-
m_ConfigSource: 4
37-
m_UserSelectedRegistryName: npmjs
30+
m_Compliance:
31+
m_Status: 0
32+
m_Violations: []
33+
m_UserSelectedRegistryName:
3834
m_UserAddingNewScopedRegistry: 0
3935
m_RegistryInfoDraft:
4036
m_Modified: 0
4137
m_ErrorMessage:
42-
m_UserModificationsInstanceId: -840
43-
m_OriginalInstanceId: -844
38+
m_UserModificationsEntityId:
39+
m_Data: -922
40+
m_OriginalEntityId:
41+
m_Data: -926
4442
m_LoadAssets: 0

0 commit comments

Comments
 (0)