Skip to content

Commit 51c8226

Browse files
JordiFBfacebook-github-bot
authored andcommitted
Reorganising external dependency manager
Summary: Reorganising external dependency manager to make easy to NOT import to a current project with and existing plugin. NOTE: the motivation of this fix came from the task T143437219. Was too difficult to remove our current version of External Dependency Manager when a dev has a conflict with other SDK like FIrebase. Reviewed By: SergioGuerreroFB Differential Revision: D43453556 fbshipit-source-id: b0e66cefdd7db6859ff1b9cc9eb4e322aefd0749
1 parent d7ecfc3 commit 51c8226

File tree

9 files changed

+17
-54
lines changed

9 files changed

+17
-54
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ TestResult.xml
6161
/UnitySDK/Assets/PlayServicesResolver.meta
6262
/UnitySDK/Assets/PlayServicesResolver/
6363
/UnitySDK/Assets/ExternalDependencyManager.meta
64-
/UnitySDK/Assets/ExternalDependencyManager/
64+
/UnitySDK/Assets/ExternalDependencyManager/Editor.meta
6565

6666
# Ignore Current Facebook Settings
6767
FacebookSettings.asset*

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
- Payments price convertion to double
2020
- Improved mobile orientation enum for Unity example
2121
- Improved mobile Tournaments example
22+
- Changed folder structure for External Dependecy Manager dlls
2223

2324
### Changed
2425
- Bumped SDK to 16.0.0

Facebook.Unity.Editor/Facebook.Unity.Editor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<Reference Include="System.Xml" />
4141
<Reference Include="System.Xml.Linq" />
4242
<Reference Include="Google.VersionHandler">
43-
<HintPath>..\UnitySDK\Assets\PlayServicesResolver\Editor\Google.VersionHandler.dll</HintPath>
43+
<HintPath>..\UnitySDK\Assets\ExternalDependencyManager\Editor\Google.VersionHandler.dll</HintPath>
4444
</Reference>
4545
</ItemGroup>
4646
<ItemGroup>

Facebook.Unity.Editor/FacebookBuild.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ internal class FacebookBuild
3131
private const string SDKPath = "Assets/FacebookSDK/SDK/";
3232
private const string ExamplesPath = "Assets/FacebookSDK/Examples/";
3333
private const string PluginsPath = "Assets/FacebookSDK/Plugins/";
34-
private const string PlayServicesResolverPath = "Assets/PlayServicesResolver/";
3534
private const string StreamingAssetsPath = "Assets/StreamingAssets/";
3635
private const string ExternalDependencyManagerPath = "Assets/ExternalDependencyManager/";
3736
private const string EditorPath = "Assets/Editor/";
@@ -86,21 +85,19 @@ public static string ExportPackage()
8685
string[] sdkFiles = (string[])Directory.GetFiles(SDKPath, "*.*", SearchOption.AllDirectories);
8786
string[] exampleFiles = (string[])Directory.GetFiles(ExamplesPath, "*.*", SearchOption.AllDirectories);
8887
string[] pluginsFiles = (string[])Directory.GetFiles(PluginsPath, "*.*", SearchOption.AllDirectories);
89-
string[] playServicesResolverFiles = (string[])Directory.GetFiles(PlayServicesResolverPath, "*.*", SearchOption.AllDirectories);
9088
string[] streamingAssetsFiles = (string[])Directory.GetFiles(StreamingAssetsPath, "*.*", SearchOption.AllDirectories);
9189
string[] externalDependencyManagerFiles = (string[])Directory.GetFiles(ExternalDependencyManagerPath, "*.*", SearchOption.AllDirectories);
9290
string[] editorFiles = (string[])Directory.GetFiles(EditorPath, "*.*", SearchOption.AllDirectories);
9391

94-
string[] files = new string[facebookFiles.Length + sdkFiles.Length + exampleFiles.Length + pluginsFiles.Length + playServicesResolverFiles.Length + streamingAssetsFiles.Length + externalDependencyManagerFiles.Length + editorFiles.Length];
92+
string[] files = new string[facebookFiles.Length + sdkFiles.Length + exampleFiles.Length + pluginsFiles.Length + streamingAssetsFiles.Length + externalDependencyManagerFiles.Length + editorFiles.Length];
9593

9694
facebookFiles.CopyTo(files, 0);
9795
sdkFiles.CopyTo(files, facebookFiles.Length);
9896
exampleFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length);
9997
pluginsFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length);
100-
playServicesResolverFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length + pluginsFiles.Length);
101-
streamingAssetsFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length + pluginsFiles.Length + playServicesResolverFiles.Length);
102-
externalDependencyManagerFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length + pluginsFiles.Length + playServicesResolverFiles.Length+ streamingAssetsFiles.Length);
103-
editorFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length + pluginsFiles.Length + playServicesResolverFiles.Length+ streamingAssetsFiles.Length + externalDependencyManagerFiles.Length);
98+
streamingAssetsFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length + pluginsFiles.Length);
99+
externalDependencyManagerFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length + pluginsFiles.Length + streamingAssetsFiles.Length);
100+
editorFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length + pluginsFiles.Length + streamingAssetsFiles.Length + externalDependencyManagerFiles.Length);
104101

105102
AssetDatabase.ExportPackage(
106103
files,

UnitySDK/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.mdb.meta

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

UnitySDK/Assets/PlayServicesResolver/Editor/Google.VersionHandler.dll.meta

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

scripts/fixdependecies.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,13 @@ cp "$UNITY_CSPROJ/external-dependency-manager_version-1.2.166_manifest.txt" $UNI
5656
## TO DO: obtain the dependency version dinamically
5757
sed s/_v1.2.166././g "$UNITY_CSPROJ/tmp.txt" > "$UNITY_CSPROJ/external-dependency-manager_version-1.2.166_manifest.txt"
5858
rm "$UNITY_CSPROJ/tmp.txt"
59+
60+
mkdir -p "$UNITY_CSPROJ/1.2.166/"
61+
mv "$UNITY_CSPROJ/Google.IOSResolver.dll" "$UNITY_CSPROJ/1.2.166/Google.IOSResolver.dll"
62+
mv "$UNITY_CSPROJ/Google.IOSResolver.dll.mdb" "$UNITY_CSPROJ/1.2.166/Google.IOSResolver.dll.mdb"
63+
mv "$UNITY_CSPROJ/Google.JarResolver.dll" "$UNITY_CSPROJ/1.2.166/Google.JarResolver.dll"
64+
mv "$UNITY_CSPROJ/Google.JarResolver.dll.mdb" "$UNITY_CSPROJ/1.2.166/Google.JarResolver.dll.mdb"
65+
mv "$UNITY_CSPROJ/Google.PackageManagerResolver.dll" "$UNITY_CSPROJ/1.2.166/Google.PackageManagerResolver.dll"
66+
mv "$UNITY_CSPROJ/Google.PackageManagerResolver.dll.mdb" "$UNITY_CSPROJ/1.2.166/Google.PackageManagerResolver.dll.mdb"
67+
mv "$UNITY_CSPROJ/Google.VersionHandlerImpl.dll" "$UNITY_CSPROJ/1.2.166/Google.VersionHandlerImpl.dll"
68+
mv "$UNITY_CSPROJ/Google.VersionHandlerImpl.dll.mdb" "$UNITY_CSPROJ/1.2.166/Google.VersionHandlerImpl.dll.mdb"

0 commit comments

Comments
 (0)