diff --git a/Installer/Assets/PlayerPrefsEx Installer/Installer.cs b/Installer/Assets/PlayerPrefsEx Installer/Installer.cs index 0619bb3..2001b5f 100644 --- a/Installer/Assets/PlayerPrefsEx Installer/Installer.cs +++ b/Installer/Assets/PlayerPrefsEx Installer/Installer.cs @@ -16,7 +16,7 @@ namespace Extensions.Unity.PlayerPrefsEx.Installer public static partial class Installer { public const string PackageId = "extensions.unity.playerprefsex"; - public const string Version = "2.1.2"; + public const string Version = "2.1.3"; static Installer() { diff --git a/Unity-Package/Assets/root/README.md b/Unity-Package/Assets/root/README.md index 611583a..39bb02c 100644 --- a/Unity-Package/Assets/root/README.md +++ b/Unity-Package/Assets/root/README.md @@ -79,6 +79,23 @@ When you package is distributed, you can install it into any Unity project. openupm add extensions.unity.playerprefsex ``` +## Running the package tests (opt-in) + +This package includes tests but does not load them in the Unity Test Runner by default. To run the package's tests in your project, add the package name to the existing `testables` array in your project manifest (`Packages/manifest.json`). For example, your manifest might include: + +```json +{ + "dependencies": { + "extensions.unity.playerprefsex": "X.X.X" + }, + "testables": [ + "extensions.unity.playerprefsex" + ] +} +``` + +See [Unity's documentation on testables](https://docs.unity3d.com/Manual/upm-manifestPrj.html#testables) and [Add tests to your package](https://docs.unity3d.com/Manual/cus-tests.html). + # Features ✔️ Key is encrypted. Encrypted depends on a device. Much more harder for hackers to hack your data. Saved data at one device won't work on another one if someone copied it from device to device. In the same time for UnityEditor the device identifier is a constant. That means data copied between devices could be opened if you work on multiple machines and want to save/sent/load saved data on different machines. diff --git a/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.PlayerPrefsEx.Editor.Tests.asmdef b/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.PlayerPrefsEx.Editor.Tests.asmdef index 5895dcc..29ff890 100644 --- a/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.PlayerPrefsEx.Editor.Tests.asmdef +++ b/Unity-Package/Assets/root/Tests/Editor/Extensions.Unity.PlayerPrefsEx.Editor.Tests.asmdef @@ -2,19 +2,20 @@ "name": "Extensions.Unity.PlayerPrefsEx.Editor.Tests", "rootNamespace": "", "references": [ - "UnityEditor.TestRunner", - "UnityEngine.TestRunner", "Extensions.Unity.PlayerPrefsEx" ], "includePlatforms": [ "Editor" ], "excludePlatforms": [], + "optionalUnityReferences": ["TestAssemblies"], "allowUnsafeCode": false, "overrideReferences": false, "precompiledReferences": [], "autoReferenced": true, - "defineConstraints": [], + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], "versionDefines": [], "noEngineReferences": false } \ No newline at end of file diff --git a/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.PlayerPrefsEx.Tests.asmdef b/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.PlayerPrefsEx.Tests.asmdef index f69938a..96c78ed 100644 --- a/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.PlayerPrefsEx.Tests.asmdef +++ b/Unity-Package/Assets/root/Tests/Runtime/Extensions.Unity.PlayerPrefsEx.Tests.asmdef @@ -2,16 +2,14 @@ "name": "Extensions.Unity.PlayerPrefsEx.Tests", "rootNamespace": "", "references": [ - "UnityEngine.TestRunner", "Extensions.Unity.PlayerPrefsEx" ], "includePlatforms": [], "excludePlatforms": [], + "optionalUnityReferences": ["TestAssemblies"], "allowUnsafeCode": false, - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll" - ], + "overrideReferences": false, + "precompiledReferences": [], "autoReferenced": true, "defineConstraints": [ "UNITY_INCLUDE_TESTS" diff --git a/Unity-Package/Assets/root/package.json b/Unity-Package/Assets/root/package.json index 890e18d..2e856f2 100644 --- a/Unity-Package/Assets/root/package.json +++ b/Unity-Package/Assets/root/package.json @@ -5,7 +5,7 @@ "name": "Ivan Murzak", "url": "https://github.com/IvanMurzak" }, - "version": "2.1.2", + "version": "2.1.3", "unity": "2018.3", "description": "Lightweight package with optimized advanced version of PlayerPrefs. Under the hood it uses the same PlayerPrefs system, but creates flexible wrapper for default system.", "keywords": [ @@ -18,4 +18,4 @@ "reactive data" ], "dependencies": {} -} +} \ No newline at end of file diff --git a/Unity-Tests/2022.3.62f3/Packages/manifest.json b/Unity-Tests/2022.3.62f3/Packages/manifest.json index 80e5302..3954840 100644 --- a/Unity-Tests/2022.3.62f3/Packages/manifest.json +++ b/Unity-Tests/2022.3.62f3/Packages/manifest.json @@ -34,6 +34,7 @@ "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0" }, + "testables": ["extensions.unity.playerprefsex"], "scopedRegistries": [ { "name": "package.openupm.com", diff --git a/Unity-Tests/2023.2.22f1/Packages/manifest.json b/Unity-Tests/2023.2.22f1/Packages/manifest.json index 8771732..0b55dd2 100644 --- a/Unity-Tests/2023.2.22f1/Packages/manifest.json +++ b/Unity-Tests/2023.2.22f1/Packages/manifest.json @@ -37,6 +37,7 @@ "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0" }, + "testables": ["extensions.unity.playerprefsex"], "scopedRegistries": [ { "name": "package.openupm.com", diff --git a/Unity-Tests/6000.3.1f1/Packages/manifest.json b/Unity-Tests/6000.3.1f1/Packages/manifest.json index 0bd5f6b..3eb935b 100644 --- a/Unity-Tests/6000.3.1f1/Packages/manifest.json +++ b/Unity-Tests/6000.3.1f1/Packages/manifest.json @@ -38,6 +38,7 @@ "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0" }, + "testables": ["extensions.unity.playerprefsex"], "scopedRegistries": [ { "name": "package.openupm.com",