1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Update the source sets configuration for the app and lib modules to match the default configuration

Both the `app` and `lib` modules had custom source sets configuration originating from the early days of the project. This updates the configuration to match the default Android Studio configuration which will simplify the addition of unit tests and instrumented tests to the project.

Note that for backcompat reasons, some folders (such as the `res` folder in the `app` module) are left as is.
This commit is contained in:
Fredia Huya-Kouadio
2025-09-22 03:15:23 -04:00
parent 084d5d407e
commit 5277c94fe4
151 changed files with 28 additions and 45 deletions

View File

@@ -6,7 +6,7 @@ exclude: |
.*thirdparty/.*|
.*-(dll|dylib|so)_wrap\.[ch]|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/google/.*
platform/android/java/lib/src/main/java/com/google/.*
)$
repos:
@@ -148,9 +148,9 @@ repos:
(?x)^(
core/math/bvh_.*\.inc|
platform/(?!android|ios|linuxbsd|macos|web|windows)\w+/.*|
platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView\.java|
platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper\.java|
platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix\.java
platform/android/java/lib/src/main/java/org/godotengine/godot/gl/GLSurfaceView\.java|
platform/android/java/lib/src/main/java/org/godotengine/godot/gl/EGLLogWrapper\.java|
platform/android/java/lib/src/main/java/org/godotengine/godot/utils/ProcessPhoenix\.java
)$
- id: header-guards

View File

@@ -123,17 +123,17 @@ Copyright: 2020, Manuel Prandini
License: Expat
Files: platform/android/java/editor/src/main/java/com/android/*
platform/android/java/lib/aidl/com/android/*
platform/android/java/lib/res/layout/status_bar_ongoing_event_progress_bar.xml
platform/android/java/lib/src/com/google/android/*
platform/android/java/lib/src/org/godotengine/godot/input/InputManagerCompat.java
platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java
platform/android/java/lib/src/main/aidl/com/android/*
platform/android/java/lib/src/main/res/layout/status_bar_ongoing_event_progress_bar.xml
platform/android/java/lib/src/main/java/com/google/android/*
platform/android/java/lib/src/main/java/org/godotengine/godot/input/InputManagerCompat.java
platform/android/java/lib/src/main/java/org/godotengine/godot/input/InputManagerV16.java
Comment: The Android Open Source Project
Copyright: 2008-2016, The Android Open Source Project
2002, Google, Inc.
License: Apache-2.0
Files: platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.java
Files: platform/android/java/lib/src/main/java/org/godotengine/godot/utils/ProcessPhoenix.java
Comment: ProcessPhoenix
Copyright: 2015, Jake Wharton
License: Apache-2.0

View File

@@ -40,7 +40,7 @@
* - Are added to the Error enum in core/error/error_list.h
* - Have a description added to error_names in core/error/error_list.cpp
* - Are bound with BIND_CORE_ENUM_CONSTANT() in core/core_constants.cpp
* - Have a matching Android version in platform/android/java/lib/src/org/godotengine/godot/error/Error.kt
* - Have a matching Android version in platform/android/java/lib/src/main/java/org/godotengine/godot/error/Error.kt
*/
enum Error {

View File

@@ -220,7 +220,7 @@ static const char *MISMATCHED_VERSIONS_MESSAGE = "Android build version mismatch
static const char *GDEXTENSION_LIBS_PATH = "libs/gdextensionlibs.json";
// This template string must be in sync with the content of 'platform/android/java/lib/res/mipmap-anydpi-v26/icon.xml'.
// This template string must be in sync with the content of 'platform/android/java/lib/src/main/java/res/mipmap-anydpi-v26/icon.xml'.
static const String ICON_XML_TEMPLATE =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n"
@@ -277,7 +277,7 @@ static const LauncherIcon LAUNCHER_ADAPTIVE_ICON_MONOCHROMES[ICON_DENSITIES_COUN
static const int EXPORT_FORMAT_APK = 0;
static const int EXPORT_FORMAT_AAB = 1;
static const char *APK_ASSETS_DIRECTORY = "assets";
static const char *APK_ASSETS_DIRECTORY = "src/main/assets";
static const char *AAB_ASSETS_DIRECTORY = "assetPackInstallTime/src/main/assets";
static const int DEFAULT_MIN_SDK_VERSION = 24; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'

View File

@@ -59,7 +59,7 @@ static const int APP_CATEGORY_VIDEO = 8;
static const int APP_CATEGORY_UNDEFINED = 9;
// Supported XR modes.
// This should match the entries in 'platform/android/java/lib/src/org/godotengine/godot/xr/XRMode.java'
// This should match the entries in 'platform/android/java/lib/src/main/java/org/godotengine/godot/xr/XRMode.java'
static const int XR_MODE_REGULAR = 0;
static const int XR_MODE_OPENXR = 1;

View File

@@ -221,16 +221,10 @@ android {
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
aidl.srcDirs = ['aidl']
assets.srcDirs = ['assets']
}
debug.jniLibs.srcDirs = ['libs/debug', 'libs/debug/vulkan_validation_layers']
dev.jniLibs.srcDirs = ['libs/dev']
release.jniLibs.srcDirs = ['libs/release']
main.res.srcDirs += ['res']
debug.jniLibs.srcDirs += ['libs/debug', 'libs/debug/vulkan_validation_layers']
dev.jniLibs.srcDirs += ['libs/dev']
release.jniLibs.srcDirs += ['libs/release']
}
applicationVariants.all { variant ->

View File

@@ -77,23 +77,14 @@ android {
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
test.java.srcDirs = ['srcTest/java']
res.srcDirs = ['res']
aidl.srcDirs = ['aidl']
assets.srcDirs = ['assets']
}
debug.jniLibs.srcDirs = ['libs/debug']
dev.jniLibs.srcDirs = ['libs/dev']
release.jniLibs.srcDirs = ['libs/release']
debug.jniLibs.srcDirs += ['libs/debug']
dev.jniLibs.srcDirs += ['libs/dev']
release.jniLibs.srcDirs += ['libs/release']
// Editor jni library
editorRelease.jniLibs.srcDirs = ['libs/tools/release']
editorDebug.jniLibs.srcDirs = ['libs/tools/debug']
editorDev.jniLibs.srcDirs = ['libs/tools/dev']
editorRelease.jniLibs.srcDirs += ['libs/tools/release']
editorDebug.jniLibs.srcDirs += ['libs/tools/debug']
editorDev.jniLibs.srcDirs += ['libs/tools/dev']
}
libraryVariants.all { variant ->

View File

@@ -110,7 +110,7 @@ public class DownloadThread {
* headers, or destination filename.
*/
private class StopRequest extends Throwable {
private static final long serialVersionUID = 6338592678988347973L;
public int mFinalStatus;

View File

@@ -133,7 +133,7 @@ public class LicenseChecker implements ServiceConnection {
* <p>
* source string: "com.android.vending.licensing.ILicensingService"
* <p>
*
*
* @param callback
*/
public synchronized void checkAccess(LicenseCheckerCallback callback) {

Some files were not shown because too many files have changed in this diff Show More