Skip to content

Commit 10ba7ed

Browse files
committed
feat(deps): replace bundled EDM4U with UPM package
1 parent 1518fe2 commit 10ba7ed

58 files changed

Lines changed: 80 additions & 5581 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"com.onesignal.unitysdk.ios",
1818
)
1919
CORE_PACKAGE = PACKAGE_NAMES[0]
20+
PLATFORM_PACKAGES = PACKAGE_NAMES[1:]
21+
EDM_PACKAGE = "com.unity.external-dependency-manager"
22+
EDM_VERSION = "2.0.0"
2023
MINIMUM_UNITY_VERSION = "2022.3"
2124
MINIMUM_UNITY_RELEASE = "0f1"
2225

@@ -103,6 +106,14 @@ def validate_packages() -> None:
103106
if package.get("samples"):
104107
fail(f"{name} must not contain samples")
105108

109+
for name in PLATFORM_PACKAGES:
110+
if packages[name].get("dependencies", {}).get(EDM_PACKAGE) != EDM_VERSION:
111+
fail(f"{name} does not depend on {EDM_PACKAGE}@{EDM_VERSION}")
112+
113+
legacy_installer = ROOT / CORE_PACKAGE / "Editor/SetupSteps/InstallEdm4uStep.cs"
114+
if legacy_installer.exists():
115+
fail(f"{legacy_installer.relative_to(ROOT)} installs unsupported Google EDM4U")
116+
106117
manifest = json.loads((DEMO / "Packages/manifest.json").read_text())
107118
if manifest.get("scopedRegistries"):
108119
fail("demo requires a scoped registry")
@@ -152,6 +163,10 @@ def validate_sample() -> None:
152163

153164

154165
def main() -> None:
166+
for project in (DEMO, ROOT / "examples/demo-no-location"):
167+
legacy_edm = project / "Assets/ExternalDependencyManager"
168+
if legacy_edm.exists():
169+
fail(f"{legacy_edm.relative_to(ROOT)} bundles unsupported Google EDM4U")
155170
if (BOOTSTRAP / "Example").exists() or (BOOTSTRAP / "Example.meta").exists():
156171
fail("empty legacy Asset Store Example path still exists")
157172
if (BOOTSTRAP / "Documentation~").exists():

com.onesignal.unitysdk.android/LICENSE.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,3 @@ Includes ShortcutBadger:
111111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112112
See the License for the specific language governing permissions and
113113
limitations under the License.
114-
115-
116-
Includes unity-jar-resolver
117-
Copyright (C) 2014 Google Inc.
118-
119-
Licensed under the Apache License, Version 2.0 (the "License");
120-
you may not use this file except in compliance with the License.
121-
You may obtain a copy of the License at
122-
123-
http://www.apache.org/licenses/LICENSE-2.0
124-
125-
Unless required by applicable law or agreed to in writing, software
126-
distributed under the License is distributed on an "AS IS" BASIS,
127-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128-
See the License for the specific language governing permissions and
129-
limitations under the License.

com.onesignal.unitysdk.android/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"unityRelease": "0f1",
77
"description": "Android platform implementation for the OneSignal Unity SDK, including native dependency resolution and notification resources.",
88
"dependencies": {
9-
"com.onesignal.unitysdk.core": "6.0.0"
9+
"com.onesignal.unitysdk.core": "6.0.0",
10+
"com.unity.external-dependency-manager": "2.0.0"
1011
},
1112
"keywords": [
1213
"push-notifications",

com.onesignal.unitysdk.core/Editor/SetupSteps/InstallEdm4uStep.cs

Lines changed: 0 additions & 148 deletions
This file was deleted.

com.onesignal.unitysdk.core/Editor/SetupSteps/InstallEdm4uStep.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

com.onesignal.unitysdk.core/LICENSE.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,3 @@ Includes ShortcutBadger:
111111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112112
See the License for the specific language governing permissions and
113113
limitations under the License.
114-
115-
116-
Includes unity-jar-resolver
117-
Copyright (C) 2014 Google Inc.
118-
119-
Licensed under the Apache License, Version 2.0 (the "License");
120-
you may not use this file except in compliance with the License.
121-
You may obtain a copy of the License at
122-
123-
http://www.apache.org/licenses/LICENSE-2.0
124-
125-
Unless required by applicable law or agreed to in writing, software
126-
distributed under the License is distributed on an "AS IS" BASIS,
127-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128-
See the License for the specific language governing permissions and
129-
limitations under the License.

com.onesignal.unitysdk.ios/Editor/BuildPostProcessor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ public class BuildPostProcessor : IPostprocessBuildWithReport
9696
/// <summary>
9797
/// must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's
9898
/// added before "pod install" (50)
99-
/// https://github.com/googlesamples/unity-jar-resolver#appending-text-to-generated-podfile
10099
/// </summary>
101100
public int callbackOrder => 45;
102101

com.onesignal.unitysdk.ios/LICENSE.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,3 @@ Includes ShortcutBadger:
111111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112112
See the License for the specific language governing permissions and
113113
limitations under the License.
114-
115-
116-
Includes unity-jar-resolver
117-
Copyright (C) 2014 Google Inc.
118-
119-
Licensed under the Apache License, Version 2.0 (the "License");
120-
you may not use this file except in compliance with the License.
121-
You may obtain a copy of the License at
122-
123-
http://www.apache.org/licenses/LICENSE-2.0
124-
125-
Unless required by applicable law or agreed to in writing, software
126-
distributed under the License is distributed on an "AS IS" BASIS,
127-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128-
See the License for the specific language governing permissions and
129-
limitations under the License.

com.onesignal.unitysdk.ios/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"unityRelease": "0f1",
77
"description": "iOS platform implementation for the OneSignal Unity SDK, including the native bridge, CocoaPods dependencies, and Xcode post-processing.",
88
"dependencies": {
9-
"com.onesignal.unitysdk.core": "6.0.0"
9+
"com.onesignal.unitysdk.core": "6.0.0",
10+
"com.unity.external-dependency-manager": "2.0.0"
1011
},
1112
"keywords": [
1213
"push-notifications",

examples/demo-no-location/Assets/ExternalDependencyManager.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)