Skip to content

Commit 5df1261

Browse files
authored
Update upmsync.yml
0 parents  commit 5df1261

File tree

195 files changed

+12615
-0
lines changed

Some content is hidden

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

195 files changed

+12615
-0
lines changed

CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Changelog for com.google.android.appbundle
2+
3+
## [1.6.0] - 2021-11-15
4+
### New Features
5+
- Updated bundletool-all.jar from 1.6.1 to 1.8.2
6+
### Bug Fixes
7+
- Fixed issue #127: crash with IL2CPP and "Separate base APK asset" enabled
8+
- Fixed issue #143: handle AssetBundle files that have file extensions
9+
- Fixed issue #145: AAB upload to Play Console fails due to BundleConfig.pb file size
10+
- Fixed issue when installing Android APIs using the plugin
11+
### Other
12+
- Update minimum Target SDK version to 30
13+
14+
## [1.5.0] - 2021-06-14
15+
### New Features
16+
- Added a new Bundletool method for building AABs (requires 2018.4+ and .NET 4+)
17+
- Added API and UI options to replace OBB files with an install-time asset pack
18+
- Added API options for customizing file compression within generated APKs
19+
- Changes to support minSdkVersion of 22 in Unity 2021.2
20+
- Updated bundletool-all.jar from 1.5.0 to 1.6.1
21+
### Bug Fixes
22+
- Fixed issue #80: prevent building on Unity 2020.2 and early versions of 2020.3 and 2021.1
23+
- Fixed issue #106: bundletool build-bundle crashed when output file was specified without a parent directory
24+
### Other
25+
- Removed ability to compile plugin with Unity 5.6, 2017.1, 2017.2, 2017.3, 2018.1, and 2018.2
26+
- Require Gradle for all Unity builds
27+
- Update minimum Target SDK version to 29
28+
29+
## [1.4.0] - 2021-03-08
30+
### New Features
31+
- Updated bundletool-all.jar from 1.2.0 to 1.5.0
32+
### Bug Fixes
33+
- Fixed issue #69: add a random name to temporary build path
34+
- Fixed issue #74: update bundletool-all.jar with fix
35+
- Fixed issue #82: pass "-Duser.language=en" to jarsigner
36+
37+
## [1.3.0] - 2020-09-30
38+
### New Features
39+
- Updated bundletool-all.jar from 1.0.0 to 1.2.0
40+
### Bug Fixes
41+
- Skip signing app bundles if no signing key is configured, instead of using a debug key (This reduces build time and provides a workaround if jarsigner is freezing)
42+
- Switch build-bundle to use new "--overwrite" flag (Fixes an issue on some systems where the build would fail unless an existing .aab was present)
43+
44+
## [1.2.0] - 2020-07-27
45+
### New Features
46+
- Fixed issue #26: Add support for packaging raw assets targeted by texture format
47+
- Updated bundletool-all.jar from 0.14.0 to 1.0.0
48+
### Bug Fixes
49+
- Support signing app bundles larger than 4GB by switching to jarsigner
50+
51+
## [1.1.1] - 2020-06-08
52+
### Bug Fixes
53+
- Clear the EditorUserBuildSettings.exportAsGoogleAndroidProject flag for AAB builds and Build & Run
54+
55+
## [1.1.0] - 2020-05-04
56+
### New Features
57+
- Updated bundletool-all.jar from 0.13.0 to 0.14.0
58+
- Updated documentation and menu item links
59+
### Bug Fixes
60+
- Fixed issue #11: the package now compiles even if the Android platform isn't installed
61+
62+
## [1.0.0] - 2020-03-17
63+
### New Features
64+
- Initial release
65+
- Includes bundletool-all.jar version 0.13.0
66+

CHANGELOG.md.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Documentation~/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Google Android App Bundle Plugin for Unity
2+
3+
*com.google.android.appbundle*
4+
5+
## Overview
6+
7+
The Google Android App Bundle package provides access to the latest Android
8+
App Bundles features, such as Play Asset Delivery.
9+
10+
Refer to the
11+
[documentation](//developer.android.com/guide/app-bundle/asset-delivery/build-unity)
12+
and
13+
[Editor API reference](//developer.android.com/reference/unity/namespace/Google/Android/AppBundle/Editor)
14+
for more information.
15+
16+
## Known Issues
17+
18+
- The plugin's build system is incompatible with the Play Asset Delivery support built into Unity.
19+
See [the Google Play Plugins for Unity README](https://github.com/google/play-unity-plugins/blob/master/README.md#built-in-pad)
20+
for details.

Editor.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "Google.Android.AppBundle.Editor",
3+
"includePlatforms": [
4+
"Editor"
5+
]
6+
}

Editor/Google.Android.AppBundle.Editor.asmdef.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Scripts.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Scripts/AndroidAppBundle.cs

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
using System;
16+
using System.Text.RegularExpressions;
17+
using Google.Android.AppBundle.Editor.Internal.Utils;
18+
using UnityEditor;
19+
20+
namespace Google.Android.AppBundle.Editor
21+
{
22+
/// <summary>
23+
/// Provides utilities related to
24+
/// <a href="https://developer.android.com/platform/technology/app-bundle/">Android App Bundle</a>.
25+
/// </summary>
26+
public static class AndroidAppBundle
27+
{
28+
/// <summary>
29+
/// Reserved name for the base module that contains the Unity game engine.
30+
/// </summary>
31+
public const string BaseModuleName = "base";
32+
33+
/// <summary>
34+
/// Reserved name for the module that separates the base module's assets into an install-time asset pack.
35+
/// </summary>
36+
public const string BaseAssetsModuleName = "base_assets";
37+
38+
/// <summary>
39+
/// Regex used to determine whether a module name is valid.
40+
/// See https://github.com/google/bundletool/blob/master/src/main/java/com/android/tools/build/bundletool/model/BundleModuleName.java#L38
41+
/// </summary>
42+
private static readonly Regex NameRegex = RegexHelper.CreateCompiled(@"^[a-zA-Z][a-zA-Z0-9_]*$");
43+
44+
/// <summary>
45+
/// Returns true if the specified name is a valid Android App Bundle module name, false otherwise.
46+
/// Certain names like "base" are reserved, so also return false in those cases.
47+
/// </summary>
48+
public static bool IsValidModuleName(string name)
49+
{
50+
// TODO(b/131241163): enforce a name length limit if we make it much smaller than 65535.
51+
return name != null
52+
&& NameRegex.IsMatch(name)
53+
&& CheckReservedName(name, BaseModuleName)
54+
&& CheckReservedName(name, BaseAssetsModuleName);
55+
}
56+
57+
/// <summary>
58+
/// Always returns true. Previously indicated if this version of the Unity Editor has native support for
59+
/// building an Android App Bundle.
60+
/// </summary>
61+
// TODO(b/189958664): Needed for 1.x API compatibility. Should be removed with 2.x.
62+
[Obsolete("This is always true")]
63+
public static bool HasNativeBuildSupport()
64+
{
65+
return true;
66+
}
67+
68+
/// <summary>
69+
/// Returns EditorUserBuildSettings.buildAppBundle if it is defined and false otherwise.
70+
/// </summary>
71+
// TODO(b/189958664): Needed for 1.x API compatibility. Should be removed with 2.x.
72+
[Obsolete("Use EditorUserBuildSettings.buildAppBundle directly instead")]
73+
public static bool IsNativeBuildEnabled()
74+
{
75+
return EditorUserBuildSettings.buildAppBundle;
76+
}
77+
78+
/// <summary>
79+
/// Enable the EditorUserBuildSettings.buildAppBundle field if it is defined.
80+
/// </summary>
81+
// TODO(b/189958664): Needed for 1.x API compatibility. Should be removed with 2.x.
82+
[Obsolete("Use EditorUserBuildSettings.buildAppBundle directly instead")]
83+
public static void EnableNativeBuild()
84+
{
85+
EditorUserBuildSettings.buildAppBundle = true;
86+
}
87+
88+
/// <summary>
89+
/// Disable the EditorUserBuildSettings.buildAppBundle field if it is defined.
90+
/// </summary>
91+
// TODO(b/189958664): Needed for 1.x API compatibility. Should be removed with 2.x.
92+
[Obsolete("Use EditorUserBuildSettings.buildAppBundle directly instead")]
93+
public static void DisableNativeBuild()
94+
{
95+
EditorUserBuildSettings.buildAppBundle = false;
96+
}
97+
98+
private static bool CheckReservedName(string name, string reserved)
99+
{
100+
return !name.Equals(reserved, StringComparison.OrdinalIgnoreCase);
101+
}
102+
}
103+
}

Editor/Scripts/AndroidAppBundle.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2021 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#if UNITY_2018_4_OR_NEWER && !NET_LEGACY
16+
using System;
17+
18+
namespace Google.Android.AppBundle.Editor
19+
{
20+
/// <summary>
21+
/// Exception thrown in case of certain Android build failures.
22+
/// </summary>
23+
public class AndroidBuildException : Exception
24+
{
25+
internal AndroidBuildException(string errorMessage, AndroidBuildReport androidBuildReport) : base(errorMessage)
26+
{
27+
AndroidBuildReport = androidBuildReport;
28+
}
29+
30+
internal AndroidBuildException(Exception exception, AndroidBuildReport androidBuildReport)
31+
: base(exception.Message, exception)
32+
{
33+
AndroidBuildReport = androidBuildReport;
34+
}
35+
36+
/// <summary>
37+
/// An <see cref="AndroidBuildReport"/> associated with this build failure. Note that the build may fail
38+
/// after the Android Player is built but before the AAB is ready; in this case the BuildReport will
39+
/// likely indicate a BuildResult of Succeeded since it's reporting the result of calling BuildPlayer().
40+
/// </summary>
41+
public AndroidBuildReport AndroidBuildReport { get; }
42+
}
43+
}
44+
#endif

0 commit comments

Comments
 (0)