Skip to content

Commit

Permalink
Merge pull request #2215 from ericoporto/fix-dont-compress-android
Browse files Browse the repository at this point in the history
Fix: don't compress `.ags` and `.vox` in android assets
  • Loading branch information
ivan-mogilko authored Nov 9, 2023
2 parents 2f02b31 + 285da8f commit 8dfc510
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Android/agsplayer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:8.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -23,4 +23,4 @@ allprojects {

task clean(type: Delete) {
delete rootProject.buildDir
}
}
2 changes: 1 addition & 1 deletion Android/library/runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath "com.android.tools.build:gradle:8.1.1"
classpath "com.android.tools.build:gradle:8.1.3"
}
}

Expand Down
4 changes: 4 additions & 0 deletions Android/mygame/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ android {
versionName projectProperties['versionName']
}

androidResources {
noCompress = ['ags', 'vox']
}

signingConfigs {
release {
storeFile file(keyStoreProperties['storeFile'])
Expand Down
2 changes: 1 addition & 1 deletion Android/mygame/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:8.1.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ if(ANDROID)
endif()

# NOTE: You can optionally create case sensitive filesystems on Macos and Windows now.
if (LINUX)
if (LINUX OR ANDROID)
target_compile_definitions(common PRIVATE AGS_CASE_SENSITIVE_FILESYSTEM)
endif()

Expand Down
3 changes: 2 additions & 1 deletion Common/util/android_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ AndroidADir::AndroidADir(const String &dirname)
{
AAssetManager* mgr = GetAAssetManager();
if(mgr == nullptr) {_dir = nullptr; return; }
_dir = AAssetManager_openDir(mgr, dirname.GetCStr());
String assetDirName = Path::GetPathInForeignAsset(dirname);
_dir = AAssetManager_openDir(mgr, assetDirName.GetCStr());
}

AndroidADir::~AndroidADir()
Expand Down

0 comments on commit 8dfc510

Please sign in to comment.