- Jun 18, 2019
-
-
Stewart Miles authored
* Android Resolver: Added initial [Jetifier](https://developer.android.com/studio/command-line/jetifier) integration which simplifies [migration](ttps://developer.android.com/jetpack/androidx/migrate) to Jetpack ([AndroidX](https://developer.android.com/jetpack/androidx)) libraries in cases where all dependencies are managed by the Android Resolver. This can be enabled via the `Use Jetifier` option in the `Assets > Play Services Resolver > Android Resolver > Settings` menu. Caveats: - If your project contains legacy Android Support Library .jar and .aar files, these files will need to be removed and replaced with references to artifacts on Maven via `*Dependencies.xml` files so that the Jetifier can map them to Jetpack (AndroidX) libraries. For example, remove the file `support-v4-27.0.2.jar` and replace it with `<androidPackage spec="com.android.support:support-v4:27.0.2"/>` in a `*Dependencies.xml` file. - If your project contains .jar or .aar files that use the legacy Android Support Libraries, these will need to be moved into a local Maven repo [See this guide](https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html) and then these files should be removed from your Unity project and instead referenced via `*Dependencies.xml` files so that the Jetifier can patch them to reference the Jetpack lirbaries. Bug: 113575309 Change-Id: I83723cb5b2eaa4369beb454e498202285758af56
-
Stewart Miles authored
Added integration tests for the internal build system and mainTemplate.gradle resolution modes when using the Jetifier. https://github.com/googlesamples/unity-jar-resolver/issues/145 Bug: 135263921 Change-Id: I5c636050e29a2232755aa70049f82e4c51c45fc1
-
Stewart Miles authored
Auto-resolution was previously relying upon polling for differences in runtime state which could break if the DLL was reloaded after settings are changed. This commit stores the resolution settings with the rest of the state from the last resolution so that it's possible to auto-resolve if any of this state changes or the settings change that require resolution. Bug: 135263921 Change-Id: I5858cebdb905f6425faee719032b830c9a066a81
-
Stewart Miles authored
This adds an option to enable Jetpack (AndroidX) Jetifier processing as part of the either dependency resolution or Gradle builds. This change also ensures that the user is notified of build environment settings that will prevent the Jetifier from functioning or prevent the use of the Jetpack (AndroidX) libraries. See... - https://developer.android.com/studio/releases/gradle-plugin#3-2-0 - https://developer.android.com/jetpack/androidx#using_androidx https://github.com/googlesamples/unity-jar-resolver/issues/145 Bug: 135263921 Change-Id: Iddb2ab7e34b411973c761360e485aed2506f2ddc
-
Stewart Miles authored
The Jetifier requires the data binding library version to use, which is the same version as the Android Gradle Plugin version. This commit exposes a property which parses the Android Gradle Plugin version from the Gradle build templates provided by Unity. Bug: 135264177 Change-Id: I7780868d88d1810e615204abd820ddef348f7f11
-
- Jun 14, 2019
-
-
Stewart Miles authored
Developers tend to move the plugin around in their project. However, the Google.VersionHandler.dll asset GUID was changing with each release resulting in the DLL failing to load if multiple versions are present in the project. This patch fixes this issue by only generating new GUIDs for files that are renamed in the plugin. Bug: 127793909 Change-Id: I4569e467f3f0c1f96722a280d62af5916344af3e
-
Stewart Miles authored
com.android.support:multidex does not use the same versioning scheme as other legacy Android support libraries so it should not be version locked. Bug: 135276990 Fixed #234 Change-Id: Idf567388cec68fca022022d14819df56a576254b
-
Stewart Miles authored
Added Jetifier support to the Gradle artifact downloader script. download_artifacts.gradle can now substitute direct and transitive dependencies on the legacy support libraries to Jetpack and rewrite references to the legacy support libraries in all downloaded libraries. This adds unit and integration tests for this functionality but does not yet connect this to the Android Resolver Unity plugin. https://github.com/googlesamples/unity-jar-resolver/issues/145 Bug: 113575309 Change-Id: Ibb92e43751425ebfd7cedfae62d275099860aaaa
-
- Jun 13, 2019
-
-
Stewart Miles authored
This is required to use Kotlin plugins like the Jetifier with Gradle's embedded Kotlin runtime. https://github.com/googlesamples/unity-jar-resolver/issues/145 Bug: 113575309 Change-Id: I4d11d30d7944fb95a2c1c2f19f0762d55eda0024
-
Stewart Miles authored
Gradle now runs task execution in parallel by default but due to https://github.com/gradle/gradle/issues/6068 it's not possible to capture stdout / stderr from individual tasks which breaks download_artifacts_test.gradle. This commit modifies the test to run all tasks serially, prepares for the Gradle bug to be fixed and cleans up the output a little when tests fail. https://github.com/googlesamples/unity-jar-resolver/issues/145 Bug: 113575309 Change-Id: Ifee400beaa4544b3d9145cce51b69125ffc1f5b9
-
- Jun 12, 2019
-
-
Stewart Miles authored
* Android Resolver: Fix copying of .srcaar to .aar files for mainTemplate.gradle resolution. PluginImporter configuration was previously not being applied to .aar files unless the Unity project was saved. Change-Id: I597799035d928af3aad53e6c6ebc63bb14f47749
-
Stewart Miles authored
After modifing PluginImporter settings, assets need to be reimported for the changes to be applied in some versions of Unity. Reported in https://github.com/firebase/quickstart-unity/issues/377 Bug: 135125825 Change-Id: I6ca17391d3f89f213a8a21bea6613d3321ed7386
-
Stewart Miles authored
The warning has no context (i.e where the repo is referenced) and hence only adds spam to the log. Change-Id: I54588ac845ff35b235bea60e6bf1252a65db9c39
-
- Jun 07, 2019
-
-
Stewart Miles authored
* Android Resolver: Fixed resolution of Android dependencies without version specifiers. * Android Resolver: Fixed Maven repo not found warning in Android Resolver. * Android Resolver: Fixed Android Player directory not found exception in Unity 2019.x when the Android Player isn't installed. Change-Id: Idd553b1920975797ae9ffe97c8792b6fd7e2c5a9
-
Stewart Miles authored
Executing commands with POSIX paths fail on Windows, this modifies the CommandLine module to converts path separators for the tool (not the tool's arguments). https://github.com/firebase/quickstart-unity/issues/379 Bug: 134758901 Change-Id: If591a21ab2c02f5e0005a10d554f4fbbf1dae799
-
Stewart Miles authored
Android Resolver's artifact downloader script was failing if a dependency in the graph did not specify a version for an artifact. This commit makes it possible to handle empty version specifications in dependencies. In addition, this adds more information to conflicting package log messages and eliminates the creation of copy tasks for output files that already exist. Fixes #227 Bug: 134571587 Change-Id: I81d52d40c2447b6a6bfba68621fbd4b254570850
-
Stewart Miles authored
It was printing out "Repo directory %s not found" rather than including the missing directory name in the message. Change-Id: I5777450ffd1aaa6be8bdb5cefe73d0edc3b32430
-
- Jun 06, 2019
-
-
Stewart Miles authored
Unity 2019.x throws an exception when BuildPipeline.GetPlaybackEngineDirectory() is called and the Android player isn't installed. The Android build target can't be selected if it's not installed, so we shouldn't be polling the build system if the build target isn't Android. This patch disables build system property polling on assembly load if the build target isn't Android. Fixes #220 Bug: 134665717 Change-Id: I147e51a9c7740d2e21fdd376abd7e6b2e7cdc7dc
-
- May 31, 2019
-
-
Stewart Miles authored
* Android Resolver: Fixed exception due to Unity 2019.3.0a4 removing x86 from the set of supported ABIs. Change-Id: I8a8f3fd91083b7c20fe66b48dc53c19eb5d73f0e
-
Stewart Miles authored
Unity 2019.3.0a4 removes support for x86_64 builds, removing the enum value UnityEditor.AndroidArchitecture. This results in an exception being thrown during resolution. Bug: 134137796 Fixes #224 Change-Id: I210c05d1f4bc9aa521b9ed61ed13159e504dac42
-
- May 28, 2019
-
-
Stewart Miles authored
* Android Resolver: Added support for ABI stripping when using mainTemplate.gradle. This only works with AARs stored in repos on the local filesystem. Change-Id: I2e1f00d09e365ab3204767010931530ac3ef985a
-
Stewart Miles authored
This will does not support removing libraries for unused ABIs in AARs fetched from remote repos when using Android Gradle plugin 2.x.x. Also, fixed handling moved maven repos in the project. Bug: 133528579 Change-Id: I7a6fd807a03c0de7393fa6ce0f116817b9252794
-
- May 24, 2019
-
-
Ryan Meier authored
Change-Id: Ib83668dcec58429df602d0acc27d0a46283e9f10
-
Stewart Miles authored
VersionHandlerImpl.RunOnMainThread() is pretty handy for editor plugins so this exposes it. Bug: 133495435 Change-Id: I8c5f38bf5f53efb53bf4071fdcc264105d1fcccc
-
Stewart Miles authored
* Android Resolver: If local repos are moved, the plugin will search the project for matching directories in an attempt to correct the error. * Version Handler: Files can be now targeted to multiple build targets using multiple "gvh_" asset labels. * Android Resolver: "implementation" or "compile" are now added correctly to mainTemplate.gradle in Unity versions prior to 2019. Bug: 112525947 Bug: 133243196 Bug: 131903659 Change-Id: I63de34783612d12cee4031033c0693ab3be289e5
-
Stewart Miles authored
Some developers move plugins around in the project breaking local maven repo paths. This commit falls back to searching for local maven repos if the directory isn't found, warning the user of the file referencing the broken directory link along with the new path. Bug: 112525947 Change-Id: Ibfc2bc231904ccf93919edd9b5c78d0814e3d28b
-
Stewart Miles authored
BuildPipeline.GetPlaybackEngineDirectory() was added in Unity 2019 to get the playback engine directory. The Android playback engine directory is required to determine the version of Gradle shipped with the plugin so this does not work in Unity < 2019. This patch adds a compatible but slower way to retrieve the AndroidPlayer directory which also fixes the generation of Gradle dependency inclusion statements in Unity < 2019 Fixes #213 Bug: 133243196 Change-Id: I455ec6de28900a31ea414bd1ff657404e611b0fb
-
- May 23, 2019
-
-
Ryan Meier authored
-
Ryan Meier authored
Change-Id: I39ff0409059c3970283c9541088b4e42464bdead
-
- May 22, 2019
-
-
Stewart Miles authored
* Android Resolver: Added option to disable addition of dependencies to mainTemplate.gradle. See `Assets > Play Services Resolver > Android Resolver > Settings`. * Android Resolver: Made paths to local maven repositories in mainTemplate.gradle relative to the Unity project when a project is not being exported. * Android Resolver: Fixed builds with mainTemplate.gradle integration in Unity 2019. * Android Resolver: Changed dependency inclusion in mainTemplate.gradle to use "implementation" or "compile" depending upon the version of Gradle included with Unity. * Android Resolver: Gracefully handled exceptions if the console encoding can't be modified. * Android Resolver: Now gracefully fails if the AndroidPlayer directory can't be found. Change-Id: Ib9db961c1b41eddf817b9e1827da9206c01ca6ef
-
Stewart Miles authored
* Android Resolver: Added option to disable addition of dependencies to mainTemplate.gradle. See `Assets > Play Services Resolver > Android Resolver > Settings`. * Android Resolver: Made paths to local maven repositories in mainTemplate.gradle relative to the Unity project when a project is not being exported. * Android Resolver: Fixed builds with mainTemplate.gradle integration in Unity 2019. * Android Resolver: Changed dependency inclusion in mainTemplate.gradle to use "implementation" or "compile" depending upon the version of Gradle included with Unity. * Android Resolver: Gracefully handled exceptions if the console encoding can't be modified. * Android Resolver: Now gracefully fails if the AndroidPlayer directory can't be found. Bug: 127302270 Bug: 132915636 Bug: 133232328 Bug: 133243196 Bug: 133247696 Bug: 133261012 Bug: 133275965 Change-Id: If3f91d1d2f094fb117f9c35b53e86c287c598702
-
Stewart Miles authored
Unity 2019 changes the developer's Android project to a library when built by Gradle. The application project is now a launcher which includes this library. However, when the application is built it doesn't include the repositories of the developer's library project causing any repos added by the Android Resolver to be ignored. This commit fixes the issue by adding all Android Resolver specified repositories to all top level Gradle projects. In addition, this commit adds support for relative repo paths in mainTemplate.gradle. Bug: 133275965 Bug: 133261012 Change-Id: I863640bada62bd671bb68ebb1469490dba280311
-
Stewart Miles authored
This commit detects Gradle version redistributed by the Unity and either includes dependencies using the "compile" statement or "implementation" depending upon what is supported. Fixes #213 Bug: 133243196 Change-Id: I5d6940b1c432196fe92e2df7163d676af1b05745
-
- May 21, 2019
-
-
Stewart Miles authored
In some cases the console encoding can't be set see c5335e2c . In some versions of Unity / Mono even setting a console encoding to it's current value (i.e should do nothing) will throw an exception. This patch handles exceptions when trying restore console encoding. Fixed #214 Bug: 127302270 Change-Id: I5869ddf00999a93f02a81343c18d2a5c68e5d599
-
Stewart Miles authored
Unity 2019 uses the 'com.android.library' plugin rather than 'com.android.application' which breaks the injection of maven repos for referenced artifacts. This commit fixes the issue by injecting repos after either plugin statement is present in a gradle file. Bug: 133247696 Change-Id: Ieda7c8c65a3eaecfdfefcd63655b086e0ec2a136
-
Stewart Miles authored
Some users want to use the old way of including dependencies when a mainTemplate.gradle file is included in their Unity project. This adds an settings option to disable patching mainTemplate.gradle on resolution. Fixes #210 Bug: 132915636 Change-Id: Id75158333fdb4ad6a9ac97f11465458637968da9
-
Stewart Miles authored
In some cases developers have imported the Android resolver into a Unity project where the install doesn't have an Android player installed causing AndroidPlaybackEngineDirectory to continually report an error. Fixed #220 Bug: 133232328 Change-Id: I9f4a5973ec9e061bf50422e203c09d8fe7943ea3
-
- May 09, 2019
-
-
Stewart Miles authored
* Version Handler: Fixed invocation of methods with named arguments. * Version Handler: Fixed occasional hang when the editor is compiling while activating plugins. Change-Id: I208ab1058ceaf20f8e4c2efc9985f703ef1809ac
-
Stewart Miles authored
Change-Id: Ia1f705b40cf57a2e1bda5d433b0276dd8a6ba0a9
-
Stewart Miles authored
InvokeMethod() was modified in ea3e8d81 to support method overloads distiguished by type. However, this change broke the lookup of methods with named arguments. Fixes #209 Bug: 132342024 Change-Id: I151fe5c893fbbc9b7feb0cf371b0e693a91e17bc
-