android sdk prepare

This commit is contained in:
2025-09-30 23:44:06 +04:00
parent d1761a2464
commit dde7b98ed2
3 changed files with 47 additions and 3 deletions

View File

@@ -368,12 +368,54 @@ jobs:
api-level: 33 api-level: 33
build-tools: 33.0.0 build-tools: 33.0.0
- name: Configure Android SDK for Godot
run: |
echo "🔧 Configuring Android SDK for Godot..."
# Set Android environment variables
export ANDROID_HOME=${ANDROID_SDK_ROOT}
export ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}
echo "ANDROID_HOME=${ANDROID_SDK_ROOT}" >> $GITHUB_ENV
echo "ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}" >> $GITHUB_ENV
# Verify SDK installation
echo "📱 Android SDK Location: ${ANDROID_SDK_ROOT}"
ls -la ${ANDROID_SDK_ROOT}/
echo "📱 Build Tools:"
ls -la ${ANDROID_SDK_ROOT}/build-tools/
echo "📱 Platforms:"
ls -la ${ANDROID_SDK_ROOT}/platforms/ || echo "No platforms directory"
- name: Setup Godot - name: Setup Godot
uses: chickensoft-games/setup-godot@v1 uses: chickensoft-games/setup-godot@v1
with: with:
version: ${{ env.GODOT_VERSION }} version: ${{ env.GODOT_VERSION }}
use-dotnet: false use-dotnet: false
- name: Configure Godot for Android
run: |
echo "🎮 Configuring Godot for Android builds..."
# Create Godot config directory
mkdir -p ~/.config/godot
# Configure Android SDK path in Godot settings
cat > ~/.config/godot/editor_settings-4.4.tres << EOF
[gd_resource type="EditorSettings" format=3]
[resource]
export/android/android_sdk_path = "${ANDROID_SDK_ROOT}"
export/android/debug_keystore = ""
export/android/debug_keystore_user = "androiddebugkey"
export/android/debug_keystore_pass = "android"
export/android/force_system_user = false
export/android/timestamping_authority_url = ""
export/android/shutdown_adb_on_exit = true
EOF
echo "✅ Godot Android configuration complete"
- name: Restore export templates cache - name: Restore export templates cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
@@ -395,8 +437,9 @@ jobs:
run: | run: |
echo "🏗️ Building Android APK..." echo "🏗️ Building Android APK..."
# Set ANDROID_HOME if not already set # Verify Android environment
export ANDROID_HOME=${ANDROID_HOME:-$ANDROID_SDK_ROOT} echo "📱 Android SDK: ${ANDROID_SDK_ROOT}"
echo "📱 Build Tools: $(ls ${ANDROID_SDK_ROOT}/build-tools/)"
godot --headless --verbose --export-${{ needs.prepare.outputs.build_type }} "Android" \ godot --headless --verbose --export-${{ needs.prepare.outputs.build_type }} "Android" \
${{ env.BUILD_DIR }}/skelly-android-${{ needs.prepare.outputs.version }}.apk ${{ env.BUILD_DIR }}/skelly-android-${{ needs.prepare.outputs.version }}.apk

View File

@@ -222,5 +222,6 @@ locale/translations=PackedStringArray("res://localization/MainStrings.en.transla
[rendering] [rendering]
textures/canvas_textures/default_texture_filter=0 textures/canvas_textures/default_texture_filter=0
textures/vram_compression/import_etc2_astc=true
renderer/rendering_method="gl_compatibility" renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility" renderer/rendering_method.mobile="gl_compatibility"

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=4 format=3 uid="uid://8c2w55brpwmm"] [gd_scene load_steps=4 format=3 uid="uid://bvks3cu6s0ejv"]
[ext_resource type="Script" uid="uid://bs4veuda3h358" path="res://scenes/game/game.gd" id="1_uwrxv"] [ext_resource type="Script" uid="uid://bs4veuda3h358" path="res://scenes/game/game.gd" id="1_uwrxv"]
[ext_resource type="PackedScene" path="res://scenes/ui/DebugToggle.tscn" id="3_debug"] [ext_resource type="PackedScene" path="res://scenes/ui/DebugToggle.tscn" id="3_debug"]