ext {
    versions = [
            gradlePluginVersion     : '8.6.1',
            compileSdk              : 35,
            minSdk                  : 21,
            targetSdk               : 35,
            javaVersion             : JavaVersion.VERSION_17,
            nexusPublishVersion     : '1.3.0',
            kotlinVersion           : '2.1.20',
            ndkVersion              : '28.1.13356709',
            // Note that 'plugin/src/main/AndroidManifest.xml' should be updated with content
            // from the Khronos OpenXR loader manifest.
            openxrVersion           : '1.1.49',
            fragmentVersion         : '1.8.6',
            splashscreenVersion     : '1.0.1',
    ]

    libraries = [
            godotAndroidLib: "org.godotengine:godot:4.5.0.stable",
    ]

    // Parse the release version from the gradle project properties (e.g: -Prelease_version=<version>)
    getReleaseVersion = { ->
        final String defaultVersion = "4.2.0-stable" // Also update 'plugin/src/main/cpp/include/export/export_plugin.h#PLUGIN_VERSION'

        String releaseVersion = project.hasProperty("release_version") ? project.property("release_version") : defaultVersion
        if (releaseVersion == null || releaseVersion.isEmpty()) {
            releaseVersion = defaultVersion
        }

        if (!releaseVersion.endsWithIgnoreCase("-stable") && !releaseVersion.endsWithIgnoreCase("-snapshot")) {
            releaseVersion += "-SNAPSHOT"
        }

        return releaseVersion
    }

    shouldNotStrip = { ->
        return project.hasProperty("doNotStrip")
    }
}
