From 5bbfe0b5a88be9fe32c4f945cb3eb1bdf1812329 Mon Sep 17 00:00:00 2001 From: ne0fhyk Date: Thu, 9 Sep 2021 19:55:42 -0700 Subject: Add support for Play Asset Delivery. This only adds support for a subset of Play Asset Delivery: this causes a single install-time asset pack to always be present, but doesn't add support for dynamically downloaded asset packs. --- platform/android/java/app/assetPacks/installTime/build.gradle | 8 ++++++++ platform/android/java/app/build.gradle | 2 ++ platform/android/java/app/settings.gradle | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 platform/android/java/app/assetPacks/installTime/build.gradle (limited to 'platform/android/java/app') diff --git a/platform/android/java/app/assetPacks/installTime/build.gradle b/platform/android/java/app/assetPacks/installTime/build.gradle new file mode 100644 index 0000000000..b06faac374 --- /dev/null +++ b/platform/android/java/app/assetPacks/installTime/build.gradle @@ -0,0 +1,8 @@ +apply plugin: 'com.android.asset-pack' + +assetPack { + packName = "installTime" // Directory name for the asset pack + dynamicDelivery { + deliveryType = "install-time" // Delivery mode + } +} diff --git a/platform/android/java/app/build.gradle b/platform/android/java/app/build.gradle index 9640887399..a391a3ca9a 100644 --- a/platform/android/java/app/build.gradle +++ b/platform/android/java/app/build.gradle @@ -72,6 +72,8 @@ android { targetCompatibility versions.javaVersion } + assetPacks = [":assetPacks:installTime"] + defaultConfig { // The default ignore pattern for the 'assets' directory includes hidden files and directories which are used by Godot projects. aaptOptions { diff --git a/platform/android/java/app/settings.gradle b/platform/android/java/app/settings.gradle index 33b863c7bf..e38d7b2ba6 100644 --- a/platform/android/java/app/settings.gradle +++ b/platform/android/java/app/settings.gradle @@ -1,2 +1,2 @@ -// Empty settings.gradle file to denote this directory as being the root project -// of the Godot custom build. +// This is the root directory of the Godot custom build. +include ':assetPacks:installTime' -- cgit v1.2.3