{"id":26121418,"url":"https://github.com/godotengine/godot-swappy","last_synced_at":"2025-04-13T12:50:26.557Z","repository":{"id":257132144,"uuid":"857398756","full_name":"godotengine/godot-swappy","owner":"godotengine","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-10T01:12:58.000Z","size":362,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T03:51:18.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/godotengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://fund.godotengine.org/"}},"created_at":"2024-09-14T14:55:12.000Z","updated_at":"2025-03-10T01:13:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"33f5565d-9c1c-4022-a29c-9ba792e437d7","html_url":"https://github.com/godotengine/godot-swappy","commit_stats":null,"previous_names":["darksylinc/godot-swappy","godotengine/godot-swappy"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-swappy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-swappy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-swappy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godotengine%2Fgodot-swappy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/godotengine","download_url":"https://codeload.github.com/godotengine/godot-swappy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717252,"owners_count":21150388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-10T14:21:31.741Z","updated_at":"2025-04-13T12:50:26.537Z","avatar_url":"https://github.com/godotengine.png","language":"Shell","funding_links":["https://fund.godotengine.org/"],"categories":[],"sub_categories":[],"readme":"This repo contains prebuilt versions of Google's Swappy Frame Pacing library.\n\nCompiled from source.\n\nSee [Releases page](https://github.com/godotengine/godot-swappy/releases).\n\n# How to build from source\n\nThis script has only been tested on Ubuntu 24.04 LTS. I used Android Studio 2023.2.1.\n\n**READ ALL THE STEPS BEFORE LAUNCHING THE SCRIPT**.\n\n1. The script will checkout a specific commit hash. If you want a different one, Edit [build.bash](./build.bash) and change `SPECIFIC_REVISION` variable.\n2. You **must** set environment variables `ANDROID_SDK` to point to Android SDK and `JAVA_HOME` to point to the Java installation (for best results, use the one bundled with Android Studio), and `ANDROID_NDK` to a specific NDK version (see Common Errors section).\n   - gradle dropped support for `ANDROID_NDK` environment variable a long time ago, *however* the Gradle scripts in gamesdk check for this variable and re-added the functionality.\n3. You **must edit** [local.properties](./local.properties) to have `sdk.dir` point to your Android SDK (i.e. same as `ANDROID_SDK`), and have `cmake.dir` point to where the CMake included in your Android SDK lives.\n\nThis script assumes you already have installed necessary dependencies such as repo, git, the Android SDK and Android Studio.\n\n**Example:**\n\n```bash\nsudo apt install repo ninja-build git\n\nexport ANDROID_HOME=/home/matias/Android/Sdk\nexport JAVA_HOME=/home/matias/apps/android-studio/jbr\nexport ANDROID_NDK=/home/matias/Android/Sdk/ndk/21.4.7075529\n\n./build.bash\n```\n\n## Extracting the files\n\nThe files will be generated at `build/package/local/gamesdk.zip`. Decompress it and extract `games-frame-pacing-release.aar`.\n\nThe files will be at `games-frame-pacing-release.aar_FILES/prefab/modules/swappy_static`.\n\nNote that the library paths say: `android.arm64-v8a`, `android.x86_64`, etc. **Remove** the `android.` prefix.\n\n# Common Errors\n\n## \"NDK not configured\"\n\nIf you get the following error message:\n\n```\norg.gradle.api.InvalidUserDataException: NDK not configured. Download it with SDK manager. Preferred NDK version is '21.4.7075529'. \n```\n\nYou **must** install NDK version `21.4.7075529` (or whatever number it asks you). It says \"preferred\" but it's mandatory.\nYou may have others NDK versions installed, but the error won't go away until you install the exact version it is asking you.\n\nUse the SDK Manager -\u003e **SDK Tools**:\n\n![](Docs/ndk_install.png)\n\n## Failed to find target with hash string 'android-31'\n\nIf you get the error:\n\n```\nFailed to find target with hash string 'android-31' in: /home/matias/Android/Sdk\n```\n\nThen you must install Android API 31 SDK.\n\nUse the SDK Manager -\u003e **SDK Platforms**:\n\n![](Docs/sdk_install.png)\n\n## Failed to find Build Tools revision 30.0.3\n\nInstall Build Tools version 30.0.3\n\nUse the SDK Manager -\u003e **SDK Tools**:\n\n![](Docs/build_tools.png)\n\n## Other errors\n\nPay a lot of attention to the errors, it's very easy to get lost.\n\n**For example all the following errors are completely misleading:**\n\n```\n\u003e Task :buildSrc:compileKotlin\n'compileJava' task (current target is 17) and 'compileKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.\nw: /home/matias/SlowProjects/godot-swappy/build/gamesdk/buildSrc/src/main/java/com/google/androidgamesdk/AarPrefabPatcher.kt: (48, 13): 'createTempDir(String = ..., String? = ..., File? = ...): File' is deprecated. Avoid creating temporary directories in the default temp location with this function due to too wide permissions on the newly created directory. Use kotlin.io.path.createTempDirectory instead.\nw: /home/matias/SlowProjects/godot-swappy/build/gamesdk/buildSrc/src/main/java/com/google/androidgamesdk/BuildInfoFile.kt: (52, 9): Parameter 'nativeLibraries' is never used\n\n\u003e Task :buildSrc:jar\n:jar: No valid plugin descriptors were found in META-INF/gradle-plugins\n\n\u003e Task :buildSrc:compileTestKotlin\n'compileTestJava' task (current target is 17) and 'compileTestKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.\n\nFAILURE: Build failed with an exception.\n```\n\nThis could get you completely side-tracked, because if you keep reading, it will tell you the following:\n\n```\n* What went wrong:\nCould not determine the dependencies of task ':games-frame-pacing:verifyReleaseResources'.\n\u003e Failed to find target with hash string 'android-31' in: /home/matias/Android/Sdk\n\n* Try:\n\u003e Run with --stacktrace option to get the stack trace.\n\u003e Run with --info or --debug option to get more log output.\n\u003e Run with --scan to get full insights.\n\n* Get more help at https://help.gradle.org\n\nDeprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.\n```\n\nAHA! **Failed to find target with hash string 'android-31' in: /home/matias/Android/Sdk**. This is the root of the problem.\n\nIn rare cases, the root of the problem may be the first problem to appear, instead of the last one; and in that case you may have to scroll quite a bit.\n\nFor example if you force it to build with a newer NDK version than the recommended one, you will get errors C++ about function redeclarations with a different function signature, but at the bottom you will see Java errors that mislead you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodotengine%2Fgodot-swappy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodotengine%2Fgodot-swappy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodotengine%2Fgodot-swappy/lists"}