Skip to content

Commit 4c18534

Browse files
committed
refactor: better folder structure
1 parent f26bd7d commit 4c18534

23 files changed

+250
-128
lines changed

.vscode/tasks.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@
829829
"command": "bash",
830830
"args": [
831831
"-c",
832-
"cd examples/android/CcapDemo && ./gradlew assembleDebug"
832+
"cd examples/android && ./gradlew assembleDebug"
833833
],
834834
"options": {
835835
"cwd": "${workspaceFolder}"
@@ -855,7 +855,7 @@
855855
"command": "bash",
856856
"args": [
857857
"-c",
858-
"cd examples/android/CcapDemo && ./gradlew assembleRelease"
858+
"cd examples/android && ./gradlew assembleRelease"
859859
],
860860
"options": {
861861
"cwd": "${workspaceFolder}"
@@ -881,7 +881,7 @@
881881
"command": "bash",
882882
"args": [
883883
"-c",
884-
"cd examples/android/CcapDemo && ./gradlew installDebug"
884+
"cd examples/android && ./gradlew installDebug"
885885
],
886886
"options": {
887887
"cwd": "${workspaceFolder}"
@@ -906,7 +906,7 @@
906906
"command": "bash",
907907
"args": [
908908
"-c",
909-
"rm -rf build/android build/android-v7a && if [ -d examples/android/CcapDemo ]; then cd examples/android/CcapDemo && ./gradlew clean; fi"
909+
"rm -rf build/android build/android-v7a && if [ -d examples/android ]; then cd examples/android && ./gradlew clean; fi"
910910
],
911911
"options": {
912912
"cwd": "${workspaceFolder}"

ANDROID_IMPLEMENTATION_SUMMARY.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The Android backend follows the same proven architecture as existing platform im
4646

4747
### Documentation & Examples
4848

49-
- **Complete Demo App**: `examples/android/CcapDemo/` - Full Android application with JNI integration
49+
- **Complete Demo App**: `examples/android/` - Full Android application with JNI integration
5050
- **Integration Guide**: `docs/android_integration.md`
5151
- **Implementation Details**: `src/README_ANDROID.md`
5252
- **Build Configuration**: `src/CMakeLists_android.txt`
@@ -83,6 +83,16 @@ RGBA_8888 → PixelFormat::RGBA
8383
- Successfully compiles with existing CCAP build system
8484
- No impact on existing platform implementations
8585
- All 389 existing tests continue to pass
86+
87+
### Directory Structure Optimization (Latest Update) ✅
88+
- Simplified Android demo structure: `examples/android/CcapDemo``examples/android`
89+
- Updated all path references across build system components:
90+
* CMakeLists.txt CCAP_ROOT_DIR path adjusted
91+
* build_android.sh DEMO_DIR path updated
92+
* All VSCode tasks path corrections
93+
* Documentation references updated
94+
- Fixed Gradle wrapper corruption and restored build functionality
95+
- Verified complete build success with proper APK generation (7.1MB app-debug.apk)
8696
- Compatible with C++17 standard
8797

8898
### Integration Testing ✅
File renamed without changes.

examples/android/CcapDemo/gradlew

Lines changed: 0 additions & 119 deletions
This file was deleted.

examples/android/CcapDemo/README.md renamed to examples/android/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ make -j$(nproc)
7474
### 2. 构建Android应用
7575

7676
```bash
77-
cd examples/android/CcapDemo
77+
cd examples/android
7878
./gradlew assembleDebug
7979
```
8080

File renamed without changes.

examples/android/CcapDemo/app/src/main/cpp/CMakeLists.txt renamed to examples/android/app/src/main/cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ find_library(mediandk-lib mediandk)
1919
find_library(jnigraphics-lib jnigraphics)
2020

2121
# Get the absolute path to CCAP project root
22-
get_filename_component(CCAP_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../../" ABSOLUTE)
22+
get_filename_component(CCAP_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../" ABSOLUTE)
2323

2424
# Include directories
2525
include_directories(

0 commit comments

Comments
 (0)