You've already forked godot
							
							
				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:
		@@ -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'
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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 ->
 | 
			
		||||
 
 | 
			
		||||
@@ -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 ->
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 | 
			
		||||
@@ -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
		Reference in New Issue
	
	Block a user