diff --git a/.gitignore b/.gitignore index 265a86fa..9e1892f8 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,10 @@ /platform/web/dist/ /platform/gpui/target/ + +# Android / Gradle build outputs +.gradle/ +local.properties +/platform/android/**/build/ +/examples/components/android/**/build/ +/examples/components/android/app/src/main/jniLibs/ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/query/client-agp/cache-v2 b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/query/client-agp/cache-v2 new file mode 100644 index 00000000..e69de29b diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/query/client-agp/cmakeFiles-v1 b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/query/client-agp/cmakeFiles-v1 new file mode 100644 index 00000000..e69de29b diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/query/client-agp/codemodel-v2 b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/query/client-agp/codemodel-v2 new file mode 100644 index 00000000..e69de29b diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/cache-v2-915560f4f4d79638de20.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/cache-v2-915560f4f4d79638de20.json new file mode 100644 index 00000000..9fe54cab --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/cache-v2-915560f4f4d79638de20.json @@ -0,0 +1,1219 @@ +{ + "entries" : + [ + { + "name" : "ANDROID_ABI", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "arm64-v8a" + }, + { + "name" : "ANDROID_NDK", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125" + }, + { + "name" : "ANDROID_PLATFORM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "android-24" + }, + { + "name" : "CMAKE_ADDR2LINE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-addr2line" + }, + { + "name" : "CMAKE_ANDROID_ARCH_ABI", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "arm64-v8a" + }, + { + "name" : "CMAKE_ANDROID_NDK", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125" + }, + { + "name" : "CMAKE_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Archiver" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" + }, + { + "name" : "CMAKE_ASM_FLAGS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_ASM_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during debug builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_ASM_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during release builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_BUILD_TYPE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..." + } + ], + "type" : "STRING", + "value" : "Debug" + }, + { + "name" : "CMAKE_CACHEFILE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "This is the directory where this CMakeCache.txt was created" + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a" + }, + { + "name" : "CMAKE_CACHE_MAJOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Major version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "3" + }, + { + "name" : "CMAKE_CACHE_MINOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Minor version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "22" + }, + { + "name" : "CMAKE_CACHE_PATCH_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Patch version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake executable." + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake" + }, + { + "name" : "CMAKE_CPACK_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to cpack program executable." + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/cpack" + }, + { + "name" : "CMAKE_CTEST_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to ctest program executable." + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ctest" + }, + { + "name" : "CMAKE_CXX_FLAGS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during debug builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during release builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "LLVM archiver" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" + }, + { + "name" : "CMAKE_C_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Generate index for LLVM archive" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib" + }, + { + "name" : "CMAKE_C_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during debug builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during release builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_C_STANDARD_LIBRARIES", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Libraries linked by default with all C applications." + } + ], + "type" : "STRING", + "value" : "-latomic -lm" + }, + { + "name" : "CMAKE_DLLTOOL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "CMAKE_DLLTOOL-NOTFOUND" + }, + { + "name" : "CMAKE_EXECUTABLE_FORMAT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Executable file format" + } + ], + "type" : "INTERNAL", + "value" : "ELF" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXPORT_COMPILE_COMMANDS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "ON" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of external makefile project generator." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator." + } + ], + "type" : "INTERNAL", + "value" : "Ninja" + }, + { + "name" : "CMAKE_GENERATOR_INSTANCE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Generator instance identifier." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_PLATFORM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator platform." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_TOOLSET", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator toolset." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_HOME_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Source directory with the top level CMakeLists.txt file for this project" + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp" + }, + { + "name" : "CMAKE_INSTALL_PREFIX", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Install path prefix, prepended onto install directories." + } + ], + "type" : "PATH", + "value" : "/usr/local" + }, + { + "name" : "CMAKE_INSTALL_SO_NO_EXE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Install .so files without execute permission." + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_LIBRARY_OUTPUT_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a" + }, + { + "name" : "CMAKE_LINKER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld" + }, + { + "name" : "CMAKE_MAKE_PROGRAM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_NM", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm" + }, + { + "name" : "CMAKE_NUMBER_OF_MAKEFILES", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "number of local generators" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_OBJCOPY", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objcopy" + }, + { + "name" : "CMAKE_OBJDUMP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objdump" + }, + { + "name" : "CMAKE_PLATFORM_INFO_INITIALIZED", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Platform information initialized" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_PROJECT_DESCRIPTION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_HOMEPAGE_URL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_NAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "lui_components_bridge" + }, + { + "name" : "CMAKE_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Ranlib" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib" + }, + { + "name" : "CMAKE_READELF", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readelf" + }, + { + "name" : "CMAKE_ROOT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake installation." + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22" + }, + { + "name" : "CMAKE_RUNTIME_OUTPUT_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of dll's." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SKIP_INSTALL_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when installing shared libraries, but are added when building." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_SKIP_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when using shared libraries." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STRIP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Strip" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip" + }, + { + "name" : "CMAKE_SYSTEM_NAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "Android" + }, + { + "name" : "CMAKE_SYSTEM_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "24" + }, + { + "name" : "CMAKE_TOOLCHAIN_FILE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "The CMake toolchain file" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake" + }, + { + "name" : "CMAKE_UNAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "uname command" + } + ], + "type" : "INTERNAL", + "value" : "/usr/bin/uname" + }, + { + "name" : "CMAKE_VERBOSE_MAKEFILE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo." + } + ], + "type" : "BOOL", + "value" : "FALSE" + }, + { + "name" : "log_lib", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to a library." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/liblog.so" + }, + { + "name" : "lui_components_bridge_BINARY_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a" + }, + { + "name" : "lui_components_bridge_IS_TOP_LEVEL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "ON" + }, + { + "name" : "lui_components_bridge_SOURCE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp" + } + ], + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/cmakeFiles-v1-8bcca044c919e60a8a7f.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/cmakeFiles-v1-8bcca044c919e60a8a7f.json new file mode 100644 index 00000000..9e179de5 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/cmakeFiles-v1-8bcca044c919e60a8a7f.json @@ -0,0 +1,471 @@ +{ + "inputs" : + [ + { + "path" : "CMakeLists.txt" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android-legacy.toolchain.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/platforms.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Determine.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystem.cmake.in" + }, + { + "isGenerated" : true, + "path" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Initialize.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Initialize.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android/Determine-Compiler.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Determine-Compiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCompilerIdDetection.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ADSP-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Borland-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Bruce-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Cray-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GHS-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/HP-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IAR-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Intel-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/MSVC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVHPC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVIDIA-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PGI-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PathScale-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SCO-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TI-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Watcom-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XL-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XLClang-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeFindBinUtils.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-FindBinUtils.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in" + }, + { + "isGenerated" : true, + "path" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeGenericSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeInitializeConfigs.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Linux.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/UnixPaths.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Clang.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/flags.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitIncludeInfo.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseLibraryArchitecture.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompileFeatures.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Internal/FeatureTesting.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in" + }, + { + "isGenerated" : true, + "path" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake" + } + ], + "kind" : "cmakeFiles", + "paths" : + { + "build" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a", + "source" : "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp" + }, + "version" : + { + "major" : 1, + "minor" : 0 + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/codemodel-v2-200f15b97692ec9c4110.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/codemodel-v2-200f15b97692ec9c4110.json new file mode 100644 index 00000000..84db53d6 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/codemodel-v2-200f15b97692ec9c4110.json @@ -0,0 +1,60 @@ +{ + "configurations" : + [ + { + "directories" : + [ + { + "build" : ".", + "jsonFile" : "directory-.-Debug-f5ebdc15457944623624.json", + "minimumCMakeVersion" : + { + "string" : "3.6.0" + }, + "projectIndex" : 0, + "source" : ".", + "targetIndexes" : + [ + 0 + ] + } + ], + "name" : "Debug", + "projects" : + [ + { + "directoryIndexes" : + [ + 0 + ], + "name" : "lui_components_bridge", + "targetIndexes" : + [ + 0 + ] + } + ], + "targets" : + [ + { + "directoryIndex" : 0, + "id" : "lui_jni_bridge::@6890427a1f51a3e7e1df", + "jsonFile" : "target-lui_jni_bridge-Debug-1fbc5b070db103f4a523.json", + "name" : "lui_jni_bridge", + "projectIndex" : 0 + } + ] + } + ], + "kind" : "codemodel", + "paths" : + { + "build" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a", + "source" : "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp" + }, + "version" : + { + "major" : 2, + "minor" : 3 + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json new file mode 100644 index 00000000..3a67af9c --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json @@ -0,0 +1,14 @@ +{ + "backtraceGraph" : + { + "commands" : [], + "files" : [], + "nodes" : [] + }, + "installers" : [], + "paths" : + { + "build" : ".", + "source" : "." + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/index-2026-10-06T10-09-37-0320.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/index-2026-10-06T10-09-37-0320.json new file mode 100644 index 00000000..192ad591 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/index-2026-10-06T10-09-37-0320.json @@ -0,0 +1,92 @@ +{ + "cmake" : + { + "generator" : + { + "multiConfig" : false, + "name" : "Ninja" + }, + "paths" : + { + "cmake" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake", + "cpack" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/cpack", + "ctest" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ctest", + "root" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22" + }, + "version" : + { + "isDirty" : false, + "major" : 3, + "minor" : 22, + "patch" : 1, + "string" : "3.22.1-g37088a8", + "suffix" : "g37088a8" + } + }, + "objects" : + [ + { + "jsonFile" : "codemodel-v2-200f15b97692ec9c4110.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + }, + { + "jsonFile" : "cache-v2-915560f4f4d79638de20.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "cmakeFiles-v1-8bcca044c919e60a8a7f.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + ], + "reply" : + { + "client-agp" : + { + "cache-v2" : + { + "jsonFile" : "cache-v2-915560f4f4d79638de20.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + "cmakeFiles-v1" : + { + "jsonFile" : "cmakeFiles-v1-8bcca044c919e60a8a7f.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + "codemodel-v2" : + { + "jsonFile" : "codemodel-v2-200f15b97692ec9c4110.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + } + } + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/target-lui_jni_bridge-Debug-1fbc5b070db103f4a523.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/target-lui_jni_bridge-Debug-1fbc5b070db103f4a523.json new file mode 100644 index 00000000..b4e46c0f --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.cmake/api/v1/reply/target-lui_jni_bridge-Debug-1fbc5b070db103f4a523.json @@ -0,0 +1,117 @@ +{ + "artifacts" : + [ + { + "path" : "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_library", + "target_link_libraries" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 32, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 34, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC" + } + ], + "defines" : + [ + { + "define" : "lui_jni_bridge_EXPORTS" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0 + ], + "sysroot" : + { + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot" + } + } + ], + "id" : "lui_jni_bridge::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments", + "role" : "flags" + }, + { + "backtrace" : 2, + "fragment" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/liblog.so", + "role" : "libraries" + }, + { + "fragment" : "-latomic -lm", + "role" : "libraries" + } + ], + "language" : "C", + "sysroot" : + { + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot" + } + }, + "name" : "lui_jni_bridge", + "nameOnDisk" : "liblui_jni_bridge.so", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "lui_jni_bridge_stub.c", + "sourceGroupIndex" : 0 + } + ], + "type" : "SHARED_LIBRARY" +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.ninja_deps b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.ninja_deps new file mode 100644 index 00000000..467de5c8 Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.ninja_deps differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.ninja_log b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.ninja_log new file mode 100644 index 00000000..cc7d4ac2 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/.ninja_log @@ -0,0 +1,3 @@ +# ninja log v5 +0 22 1791281377761547403 CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o 5a86272d66b57ded +22 41 1791281377778547301 /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so f70a42859ebf6bdb diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeCache.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeCache.txt new file mode 100644 index 00000000..4b0bffd3 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeCache.txt @@ -0,0 +1,365 @@ +# This is the CMakeCache file. +# For build in directory: /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a +# It was generated by CMake: /home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//No help, variable specified on the command line. +ANDROID_ABI:UNINITIALIZED=arm64-v8a + +//No help, variable specified on the command line. +ANDROID_NDK:UNINITIALIZED=/home/ubuntu/android-sdk/ndk/26.1.10909125 + +//No help, variable specified on the command line. +ANDROID_PLATFORM:UNINITIALIZED=android-24 + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-addr2line + +//No help, variable specified on the command line. +CMAKE_ANDROID_ARCH_ABI:UNINITIALIZED=arm64-v8a + +//No help, variable specified on the command line. +CMAKE_ANDROID_NDK:UNINITIALIZED=/home/ubuntu/android-sdk/ndk/26.1.10909125 + +//Archiver +CMAKE_AR:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar + +//Flags used by the compiler during all build types. +CMAKE_ASM_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_ASM_FLAGS_DEBUG:STRING= + +//Flags used by the compiler during release builds. +CMAKE_ASM_FLAGS_RELEASE:STRING= + +//Choose the type of build, options are: None Debug Release RelWithDebInfo +// MinSizeRel ... +CMAKE_BUILD_TYPE:STRING=Debug + +//Flags used by the compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_CXX_FLAGS_DEBUG:STRING= + +//Flags used by the compiler during release builds. +CMAKE_CXX_FLAGS_RELEASE:STRING= + +//LLVM archiver +CMAKE_C_COMPILER_AR:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar + +//Generate index for LLVM archive +CMAKE_C_COMPILER_RANLIB:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING= + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_C_FLAGS_RELEASE:STRING= + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Libraries linked by default with all C applications. +CMAKE_C_STANDARD_LIBRARIES:STRING=-latomic -lm + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//No help, variable specified on the command line. +CMAKE_EXPORT_COMPILE_COMMANDS:UNINITIALIZED=ON + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//No help, variable specified on the command line. +CMAKE_LIBRARY_OUTPUT_DIRECTORY:UNINITIALIZED=/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a + +//Path to a program. +CMAKE_LINKER:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld + +//No help, variable specified on the command line. +CMAKE_MAKE_PROGRAM:UNINITIALIZED=/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objdump + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=lui_components_bridge + +//Ranlib +CMAKE_RANLIB:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readelf + +//No help, variable specified on the command line. +CMAKE_RUNTIME_OUTPUT_DIRECTORY:UNINITIALIZED=/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Strip +CMAKE_STRIP:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip + +//No help, variable specified on the command line. +CMAKE_SYSTEM_NAME:UNINITIALIZED=Android + +//No help, variable specified on the command line. +CMAKE_SYSTEM_VERSION:UNINITIALIZED=24 + +//The CMake toolchain file +CMAKE_TOOLCHAIN_FILE:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Path to a library. +log_lib:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/liblog.so + +//Value Computed by CMake +lui_components_bridge_BINARY_DIR:STATIC=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a + +//Value Computed by CMake +lui_components_bridge_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +lui_components_bridge_SOURCE_DIR:STATIC=/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=22 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/home/ubuntu/android-sdk/cmake/3.22.1/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/home/ubuntu/android-sdk/cmake/3.22.1/bin/ctest +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES +CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Ninja +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake new file mode 100644 index 00000000..87c4723d --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake @@ -0,0 +1,72 @@ +set(CMAKE_C_COMPILER "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "Clang") +set(CMAKE_C_COMPILER_VERSION "17.0.2") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17") +set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") +set(CMAKE_C17_COMPILE_FEATURES "c_std_17") +set(CMAKE_C23_COMPILE_FEATURES "c_std_23") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU") +set(CMAKE_C_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar") +set(CMAKE_C_COMPILER_AR "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar") +set(CMAKE_RANLIB "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib") +set(CMAKE_C_COMPILER_RANLIB "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib") +set(CMAKE_LINKER "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCC ) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_C_LIBRARY_ARCHITECTURE "") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "-l:libunwind.a;dl;c;-l:libunwind.a;dl") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/aarch64;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 00000000..3657be46 Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake new file mode 100644 index 00000000..29e1fdc6 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-6.8.0-1061-aws") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "6.8.0-1061-aws") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + +include("/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake") + +set(CMAKE_SYSTEM "Android-1") +set(CMAKE_SYSTEM_NAME "Android") +set(CMAKE_SYSTEM_VERSION "1") +set(CMAKE_SYSTEM_PROCESSOR "aarch64") + +set(CMAKE_CROSSCOMPILING "TRUE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 00000000..41b99d77 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,803 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if !defined(__STDC__) && !defined(__clang__) +# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) +# define C_VERSION "90" +# else +# define C_VERSION +# endif +#elif __STDC_VERSION__ > 201710L +# define C_VERSION "23" +#elif __STDC_VERSION__ >= 201710L +# define C_VERSION "17" +#elif __STDC_VERSION__ >= 201000L +# define C_VERSION "11" +#elif __STDC_VERSION__ >= 199901L +# define C_VERSION "99" +#else +# define C_VERSION "90" +#endif +const char* info_language_standard_default = + "INFO" ":" "standard_default[" C_VERSION "]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */ +#if (defined(__clang__) || defined(__GNUC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) && !defined(_MSC_VER) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o new file mode 100644 index 00000000..6a6f9546 Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeOutput.log b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeOutput.log new file mode 100644 index 00000000..c7bc68f2 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeOutput.log @@ -0,0 +1,129 @@ +The target system is: Android - 1 - aarch64 +The host system is: Linux - 6.8.0-1061-aws - x86_64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang +Build flags: -g;-DANDROID;-fdata-sections;-ffunction-sections;-funwind-tables;-fstack-protector-strong;-no-canonical-prefixes;-D_FORTIFY_SOURCE=2;-Wformat;-Werror=format-security; +Id flags: -c;--target=aarch64-none-linux-android24 + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o" + +The C compiler identification is Clang, found in "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o" + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeTmp + +Run Build Command(s):/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja cmTC_4bdad && [1/2] Building C object CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o +Android (10552028, +pgo, +bolt, +lto, -mlgo, based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362) +Target: aarch64-none-linux-android24 +Thread model: posix +InstalledDir: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin + (in-process) + "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" -cc1 -triple aarch64-none-linux-android24 -emit-obj -mrelax-all -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-feature +fix-cortex-a53-835769 -target-abi aapcs -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeTmp -resource-dir /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17 -dependency-file CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o.d -MT CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o -sys-header-deps -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -internal-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include -internal-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -Wformat -fdebug-compilation-dir=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeTmp -ferror-limit 19 -stack-protector 2 -fno-signed-char -fgnuc-version=4.2.1 -target-feature +outline-atomics -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o -x c /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c +clang -cc1 version 17.0.2 based upon LLVM 17.0.2 default target x86_64-unknown-linux-gnu +ignoring nonexistent directory "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include" +ignoring nonexistent directory "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include" +#include "..." search starts here: +#include <...> search starts here: + /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include + /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android + /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include +End of search list. +[2/2] Linking C executable cmTC_4bdad +Android (10552028, +pgo, +bolt, +lto, -mlgo, based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362) +Target: aarch64-none-linux-android24 +Thread model: posix +InstalledDir: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin + "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld" --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -pie -EL --fix-cortex-a53-843419 -z now -z relro -z max-page-size=4096 --hash-style=gnu --eh-frame-hdr -m aarch64linux -dynamic-linker /system/bin/linker64 -o cmTC_4bdad /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtbegin_dynamic.o -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/aarch64 -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24 -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib --build-id=sha1 --no-rosegment --no-undefined-version --fatal-warnings --no-undefined CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl -lc /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtend_android.o + + + +Parsed C implicit include dir info from above output: rv=done + found start of include info + found start of implicit include info + add: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include] + add: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android] + add: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] + end of search list found + collapse include dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include] + collapse include dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android] + collapse include dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] + implicit include dirs: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld\.lld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja cmTC_4bdad && [1/2] Building C object CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o] + ignore line: [Android (10552028 +pgo +bolt +lto -mlgo based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)] + ignore line: [Target: aarch64-none-linux-android24] + ignore line: [Thread model: posix] + ignore line: [InstalledDir: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin] + ignore line: [ (in-process)] + ignore line: [ "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" -cc1 -triple aarch64-none-linux-android24 -emit-obj -mrelax-all -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-feature +fix-cortex-a53-835769 -target-abi aapcs -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeTmp -resource-dir /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17 -dependency-file CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o.d -MT CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o -sys-header-deps -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -internal-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include -internal-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -Wformat -fdebug-compilation-dir=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeTmp -ferror-limit 19 -stack-protector 2 -fno-signed-char -fgnuc-version=4.2.1 -target-feature +outline-atomics -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o -x c /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c] + ignore line: [clang -cc1 version 17.0.2 based upon LLVM 17.0.2 default target x86_64-unknown-linux-gnu] + ignore line: [ignoring nonexistent directory "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include"] + ignore line: [ignoring nonexistent directory "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include] + ignore line: [ /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android] + ignore line: [ /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] + ignore line: [End of search list.] + ignore line: [[2/2] Linking C executable cmTC_4bdad] + ignore line: [Android (10552028 +pgo +bolt +lto -mlgo based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)] + ignore line: [Target: aarch64-none-linux-android24] + ignore line: [Thread model: posix] + ignore line: [InstalledDir: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin] + link line: [ "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld" --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -pie -EL --fix-cortex-a53-843419 -z now -z relro -z max-page-size=4096 --hash-style=gnu --eh-frame-hdr -m aarch64linux -dynamic-linker /system/bin/linker64 -o cmTC_4bdad /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtbegin_dynamic.o -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/aarch64 -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24 -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib --build-id=sha1 --no-rosegment --no-undefined-version --fatal-warnings --no-undefined CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl -lc /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a -l:libunwind.a -ldl /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtend_android.o] + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld] ==> ignore + arg [--sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot] ==> ignore + arg [-pie] ==> ignore + arg [-EL] ==> ignore + arg [--fix-cortex-a53-843419] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [-zmax-page-size=4096] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [aarch64linux] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/system/bin/linker64] ==> ignore + arg [-o] ==> ignore + arg [cmTC_4bdad] ==> ignore + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtbegin_dynamic.o] ==> obj [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtbegin_dynamic.o] + arg [-L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/aarch64] ==> dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/aarch64] + arg [-L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24] ==> dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24] + arg [-L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android] ==> dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android] + arg [-L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] ==> dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] + arg [--build-id=sha1] ==> ignore + arg [--no-rosegment] ==> ignore + arg [--no-undefined-version] ==> ignore + arg [--fatal-warnings] ==> ignore + arg [--no-undefined] ==> ignore + arg [CMakeFiles/cmTC_4bdad.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a] ==> lib [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a] + arg [-l:libunwind.a] ==> lib [-l:libunwind.a] + arg [-ldl] ==> lib [dl] + arg [-lc] ==> lib [c] + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a] ==> lib [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a] + arg [-l:libunwind.a] ==> lib [-l:libunwind.a] + arg [-ldl] ==> lib [dl] + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtend_android.o] ==> obj [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtend_android.o] + remove lib [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a] + remove lib [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-aarch64-android.a] + collapse library dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/aarch64] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/aarch64] + collapse library dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24] + collapse library dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android] + collapse library dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] + implicit libs: [-l:libunwind.a;dl;c;-l:libunwind.a;dl] + implicit objs: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtbegin_dynamic.o;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/crtend_android.o] + implicit dirs: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/aarch64;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] + implicit fwks: [] + + diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/TargetDirectories.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/TargetDirectories.txt new file mode 100644 index 00000000..a6a0c6f1 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,3 @@ +/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/lui_jni_bridge.dir +/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/edit_cache.dir +/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/rebuild_cache.dir diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/cmake.check_cache b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/cmake.check_cache new file mode 100644 index 00000000..3dccd731 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o new file mode 100644 index 00000000..3e79aeca Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/rules.ninja b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/rules.ninja new file mode 100644 index 00000000..1264916c --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/rules.ninja @@ -0,0 +1,64 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.22 + +# This file contains all the rules used to get the outputs files +# built from the input files. +# It is included in the main 'build.ninja'. + +# ============================================================================= +# Project: lui_components_bridge +# Configurations: Debug +# ============================================================================= +# ============================================================================= + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__lui_jni_bridge_Debug + depfile = $DEP_FILE + deps = gcc + command = /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android24 --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C shared library. + +rule C_SHARED_LIBRARY_LINKER__lui_jni_bridge_Debug + command = $PRE_LINK && /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android24 --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE $in $LINK_PATH $LINK_LIBRARIES && $POST_BUILD + description = Linking C shared library $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for running custom commands. + +rule CUSTOM_COMMAND + command = $COMMAND + description = $DESC + + +############################################# +# Rule for re-running cmake. + +rule RERUN_CMAKE + command = /home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake --regenerate-during-build -S/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp -B/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a + description = Re-running CMake... + generator = 1 + + +############################################# +# Rule for cleaning all built files. + +rule CLEAN + command = /home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja $FILE_ARG -t clean $TARGETS + description = Cleaning all built files... + + +############################################# +# Rule for printing all primary targets available. + +rule HELP + command = /home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja -t targets + description = All primary targets available: + diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/additional_project_files.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/additional_project_files.txt new file mode 100644 index 00000000..e69de29b diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/android_gradle_build.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/android_gradle_build.json new file mode 100644 index 00000000..8526f9de --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/android_gradle_build.json @@ -0,0 +1,38 @@ +{ + "buildFiles": [ + "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt" + ], + "cleanCommandsComponents": [ + [ + "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja", + "-C", + "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a", + "clean" + ] + ], + "buildTargetsCommandComponents": [ + "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja", + "-C", + "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a", + "{LIST_OF_TARGETS_TO_BUILD}" + ], + "libraries": { + "lui_jni_bridge::@6890427a1f51a3e7e1df": { + "toolchain": "toolchain", + "abi": "arm64-v8a", + "artifactName": "lui_jni_bridge", + "output": "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so", + "runtimeFiles": [] + } + }, + "toolchains": { + "toolchain": { + "cCompilerExecutable": "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang.lld", + "cppCompilerExecutable": "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.lld" + } + }, + "cFileExtensions": [ + "c" + ], + "cppFileExtensions": [] +} \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/android_gradle_build_mini.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/android_gradle_build_mini.json new file mode 100644 index 00000000..1ce7ed08 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/android_gradle_build_mini.json @@ -0,0 +1,27 @@ +{ + "buildFiles": [ + "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt" + ], + "cleanCommandsComponents": [ + [ + "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja", + "-C", + "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a", + "clean" + ] + ], + "buildTargetsCommandComponents": [ + "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja", + "-C", + "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a", + "{LIST_OF_TARGETS_TO_BUILD}" + ], + "libraries": { + "lui_jni_bridge::@6890427a1f51a3e7e1df": { + "artifactName": "lui_jni_bridge", + "abi": "arm64-v8a", + "output": "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so", + "runtimeFiles": [] + } + } +} \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/build.ninja b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/build.ninja new file mode 100644 index 00000000..c3913c71 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/build.ninja @@ -0,0 +1,154 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.22 + +# This file contains all the build statements describing the +# compilation DAG. + +# ============================================================================= +# Write statements declared in CMakeLists.txt: +# +# Which is the root file. +# ============================================================================= + +# ============================================================================= +# Project: lui_components_bridge +# Configurations: Debug +# ============================================================================= + +############################################# +# Minimal version of Ninja required by this file + +ninja_required_version = 1.5 + + +############################################# +# Set configuration variable for custom commands. + +CONFIGURATION = Debug +# ============================================================================= +# Include auxiliary files. + + +############################################# +# Include rules file. + +include CMakeFiles/rules.ninja + +# ============================================================================= + +############################################# +# Logical path to working directory; prefix for absolute paths. + +cmake_ninja_workdir = /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/ +# ============================================================================= +# Object build statements for SHARED_LIBRARY target lui_jni_bridge + + +############################################# +# Order-only phony target for lui_jni_bridge + +build cmake_object_order_depends_target_lui_jni_bridge: phony || CMakeFiles/lui_jni_bridge.dir + +build CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o: C_COMPILER__lui_jni_bridge_Debug /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c || cmake_object_order_depends_target_lui_jni_bridge + DEFINES = -Dlui_jni_bridge_EXPORTS + DEP_FILE = CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o.d + FLAGS = -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC + OBJECT_DIR = CMakeFiles/lui_jni_bridge.dir + OBJECT_FILE_DIR = CMakeFiles/lui_jni_bridge.dir + TARGET_COMPILE_PDB = CMakeFiles/lui_jni_bridge.dir/ + TARGET_PDB = /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.pdb + + +# ============================================================================= +# Link build statements for SHARED_LIBRARY target lui_jni_bridge + + +############################################# +# Link the shared library /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so + +build /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so: C_SHARED_LIBRARY_LINKER__lui_jni_bridge_Debug CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o | /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/liblog.so + LANGUAGE_COMPILE_FLAGS = -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info + LINK_FLAGS = -static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments + LINK_LIBRARIES = /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/liblog.so -latomic -lm + OBJECT_DIR = CMakeFiles/lui_jni_bridge.dir + POST_BUILD = : + PRE_LINK = : + SONAME = liblui_jni_bridge.so + SONAME_FLAG = -Wl,-soname, + TARGET_COMPILE_PDB = CMakeFiles/lui_jni_bridge.dir/ + TARGET_FILE = /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so + TARGET_PDB = /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.pdb + + +############################################# +# Utility command for edit_cache + +build CMakeFiles/edit_cache.util: CUSTOM_COMMAND + COMMAND = cd /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a && /home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. + DESC = No interactive CMake dialog available... + restat = 1 + +build edit_cache: phony CMakeFiles/edit_cache.util + + +############################################# +# Utility command for rebuild_cache + +build CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cd /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a && /home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake --regenerate-during-build -S/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp -B/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a + DESC = Running CMake to regenerate build system... + pool = console + restat = 1 + +build rebuild_cache: phony CMakeFiles/rebuild_cache.util + +# ============================================================================= +# Target aliases. + +build liblui_jni_bridge.so: phony /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so + +build lui_jni_bridge: phony /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so + +# ============================================================================= +# Folder targets. + +# ============================================================================= + +############################################# +# Folder: /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a + +build all: phony /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a/liblui_jni_bridge.so + +# ============================================================================= +# Built-in targets + + +############################################# +# Re-run CMake if any of its inputs changed. + +build build.ninja: RERUN_CMAKE | /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCompilerIdDetection.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompileFeatures.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeFindBinUtils.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeGenericSystem.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeInitializeConfigs.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitIncludeInfo.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseLibraryArchitecture.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystem.cmake.in /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ADSP-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMCC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/AppleClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Borland-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Bruce-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-FindBinUtils.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Compaq-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Cray-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Embarcadero-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Fujitsu-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GHS-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/HP-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IAR-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Intel-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/MSVC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVHPC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVIDIA-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PGI-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PathScale-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SCO-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SDCC-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SunPro-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TI-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Watcom-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XL-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XLClang-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/zOS-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Internal/FeatureTesting.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Initialize.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android/Determine-Compiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Linux.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/UnixPaths.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android-legacy.toolchain.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/flags.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Clang.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Determine.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Initialize.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Determine-Compiler.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/platforms.cmake /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt CMakeCache.txt CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake + pool = console + + +############################################# +# A missing CMake input file is not an error. + +build /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCompilerIdDetection.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompileFeatures.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeFindBinUtils.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeGenericSystem.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeInitializeConfigs.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitIncludeInfo.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseLibraryArchitecture.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystem.cmake.in /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ADSP-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMCC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/AppleClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Borland-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Bruce-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-FindBinUtils.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Compaq-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Cray-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Embarcadero-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Fujitsu-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GHS-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/HP-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IAR-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Intel-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/MSVC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVHPC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVIDIA-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PGI-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PathScale-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SCO-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SDCC-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SunPro-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TI-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Watcom-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XL-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XLClang-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/zOS-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Internal/FeatureTesting.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Initialize.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android/Determine-Compiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Linux.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/UnixPaths.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android-legacy.toolchain.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/flags.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Clang.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Determine.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Initialize.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Determine-Compiler.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/platforms.cmake /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt CMakeCache.txt CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake: phony + + +############################################# +# Clean all the built files. + +build clean: CLEAN + + +############################################# +# Print all primary targets available. + +build help: HELP + + +############################################# +# Make the all target the default. + +default all diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/build_file_index.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/build_file_index.txt new file mode 100644 index 00000000..68b383b9 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/build_file_index.txt @@ -0,0 +1 @@ +/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/cmake_install.cmake b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/cmake_install.cmake new file mode 100644 index 00000000..717f8a46 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/cmake_install.cmake @@ -0,0 +1,54 @@ +# Install script for directory: /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "TRUE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objdump") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/compile_commands.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/compile_commands.json new file mode 100644 index 00000000..4fc5cabf --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/compile_commands.json @@ -0,0 +1,7 @@ +[ +{ + "directory": "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a", + "command": "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android24 --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dlui_jni_bridge_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -o CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o -c /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c", + "file": "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c" +} +] \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/compile_commands.json.bin b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/compile_commands.json.bin new file mode 100644 index 00000000..2f1e922b Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/compile_commands.json.bin differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/configure_fingerprint.bin b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/configure_fingerprint.bin new file mode 100644 index 00000000..94eab4a2 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/configure_fingerprint.bin @@ -0,0 +1,29 @@ +C/C++ Structured Logu +s +q/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/additional_project_files.txtC +A +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  äàÂ…‘4  »àÂ…‘4r +p +n/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/android_gradle_build.json  äàÂ…‘4… + ¿àÂ…‘4w +u +s/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/android_gradle_build_mini.json  äàÂ…‘4õ ÎàÂ…‘4d +b +`/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/build.ninja  äàÂ…‘4ܵ ¥àÂ…‘4h +f +d/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/build.ninja.txt  äàÂ…‘4m +k +i/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/build_file_index.txt  äàÂ…‘4 R ÑàÂ…‘4n +l +j/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/compile_commands.json  äàÂ…‘4» ¥àÂ…‘4r +p +n/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/compile_commands.json.bin  äàÂ…‘4 š ¥àÂ…‘4x +v +t/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/metadata_generation_command.txt  äàÂ…‘4 +– ÎàÂ…‘4k +i +g/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/prefab_config.json  äàÂ…‘4  ( ÎàÂ…‘4p +n +l/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/symbol_folder_index.txt  äàÂ…‘4  k ÑàÂ…‘4V +T +R/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt  äàÂ…‘4 ¨ Ð芅‘4 \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/metadata_generation_command.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/metadata_generation_command.txt new file mode 100644 index 00000000..d08792c2 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/metadata_generation_command.txt @@ -0,0 +1,18 @@ + -H/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp +-DCMAKE_SYSTEM_NAME=Android +-DCMAKE_EXPORT_COMPILE_COMMANDS=ON +-DCMAKE_SYSTEM_VERSION=24 +-DANDROID_PLATFORM=android-24 +-DANDROID_ABI=arm64-v8a +-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a +-DANDROID_NDK=/home/ubuntu/android-sdk/ndk/26.1.10909125 +-DCMAKE_ANDROID_NDK=/home/ubuntu/android-sdk/ndk/26.1.10909125 +-DCMAKE_TOOLCHAIN_FILE=/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake +-DCMAKE_MAKE_PROGRAM=/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja +-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a +-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a +-DCMAKE_BUILD_TYPE=Debug +-B/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a +-GNinja + Build command args: [] + Version: 2 \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/prefab_config.json b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/prefab_config.json new file mode 100644 index 00000000..e799de86 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/prefab_config.json @@ -0,0 +1,4 @@ +{ + "enabled": false, + "packages": [] +} \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/symbol_folder_index.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/symbol_folder_index.txt new file mode 100644 index 00000000..b8fa15d6 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a/symbol_folder_index.txt @@ -0,0 +1 @@ +/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/hash_key.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/hash_key.txt new file mode 100644 index 00000000..d8c3567d --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/hash_key.txt @@ -0,0 +1,25 @@ +# Values used to calculate the hash in this folder name. +# Should not depend on the absolute path of the project itself. +# - AGP: 8.6.1. +# - $NDK is the path to NDK 26.1.10909125. +# - $PROJECT is the path to the parent folder of the root Gradle build file. +# - $ABI is the ABI to be built with. The specific value doesn't contribute to the value of the hash. +# - $HASH is the hash value computed from this text. +# - $CMAKE is the path to CMake 3.22.1. +# - $NINJA is the path to Ninja. +-H$PROJECT/app/src/main/cpp +-DCMAKE_SYSTEM_NAME=Android +-DCMAKE_EXPORT_COMPILE_COMMANDS=ON +-DCMAKE_SYSTEM_VERSION=24 +-DANDROID_PLATFORM=android-24 +-DANDROID_ABI=$ABI +-DCMAKE_ANDROID_ARCH_ABI=$ABI +-DANDROID_NDK=$NDK +-DCMAKE_ANDROID_NDK=$NDK +-DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake +-DCMAKE_MAKE_PROGRAM=$NINJA +-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$PROJECT/app/build/intermediates/cxx/Debug/$HASH/obj/$ABI +-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$PROJECT/app/build/intermediates/cxx/Debug/$HASH/obj/$ABI +-DCMAKE_BUILD_TYPE=Debug +-B$PROJECT/app/.cxx/Debug/$HASH/$ABI +-GNinja \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/query/client-agp/cache-v2 b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/query/client-agp/cache-v2 new file mode 100644 index 00000000..e69de29b diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/query/client-agp/cmakeFiles-v1 b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/query/client-agp/cmakeFiles-v1 new file mode 100644 index 00000000..e69de29b diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/query/client-agp/codemodel-v2 b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/query/client-agp/codemodel-v2 new file mode 100644 index 00000000..e69de29b diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/cache-v2-2212472cb17d9cbd701d.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/cache-v2-2212472cb17d9cbd701d.json new file mode 100644 index 00000000..daaa9bda --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/cache-v2-2212472cb17d9cbd701d.json @@ -0,0 +1,1219 @@ +{ + "entries" : + [ + { + "name" : "ANDROID_ABI", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "x86_64" + }, + { + "name" : "ANDROID_NDK", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125" + }, + { + "name" : "ANDROID_PLATFORM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "android-24" + }, + { + "name" : "CMAKE_ADDR2LINE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-addr2line" + }, + { + "name" : "CMAKE_ANDROID_ARCH_ABI", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "x86_64" + }, + { + "name" : "CMAKE_ANDROID_NDK", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125" + }, + { + "name" : "CMAKE_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Archiver" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" + }, + { + "name" : "CMAKE_ASM_FLAGS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_ASM_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during debug builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_ASM_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during release builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_BUILD_TYPE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..." + } + ], + "type" : "STRING", + "value" : "Debug" + }, + { + "name" : "CMAKE_CACHEFILE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "This is the directory where this CMakeCache.txt was created" + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64" + }, + { + "name" : "CMAKE_CACHE_MAJOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Major version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "3" + }, + { + "name" : "CMAKE_CACHE_MINOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Minor version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "22" + }, + { + "name" : "CMAKE_CACHE_PATCH_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Patch version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake executable." + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake" + }, + { + "name" : "CMAKE_CPACK_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to cpack program executable." + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/cpack" + }, + { + "name" : "CMAKE_CTEST_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to ctest program executable." + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ctest" + }, + { + "name" : "CMAKE_CXX_FLAGS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during debug builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during release builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "LLVM archiver" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" + }, + { + "name" : "CMAKE_C_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Generate index for LLVM archive" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib" + }, + { + "name" : "CMAKE_C_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during debug builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the compiler during release builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_C_STANDARD_LIBRARIES", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Libraries linked by default with all C applications." + } + ], + "type" : "STRING", + "value" : "-latomic -lm" + }, + { + "name" : "CMAKE_DLLTOOL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "CMAKE_DLLTOOL-NOTFOUND" + }, + { + "name" : "CMAKE_EXECUTABLE_FORMAT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Executable file format" + } + ], + "type" : "INTERNAL", + "value" : "ELF" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXPORT_COMPILE_COMMANDS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "ON" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of external makefile project generator." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator." + } + ], + "type" : "INTERNAL", + "value" : "Ninja" + }, + { + "name" : "CMAKE_GENERATOR_INSTANCE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Generator instance identifier." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_PLATFORM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator platform." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_TOOLSET", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator toolset." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_HOME_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Source directory with the top level CMakeLists.txt file for this project" + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp" + }, + { + "name" : "CMAKE_INSTALL_PREFIX", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Install path prefix, prepended onto install directories." + } + ], + "type" : "PATH", + "value" : "/usr/local" + }, + { + "name" : "CMAKE_INSTALL_SO_NO_EXE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Install .so files without execute permission." + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_LIBRARY_OUTPUT_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64" + }, + { + "name" : "CMAKE_LINKER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld" + }, + { + "name" : "CMAKE_MAKE_PROGRAM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_NM", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm" + }, + { + "name" : "CMAKE_NUMBER_OF_MAKEFILES", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "number of local generators" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_OBJCOPY", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objcopy" + }, + { + "name" : "CMAKE_OBJDUMP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objdump" + }, + { + "name" : "CMAKE_PLATFORM_INFO_INITIALIZED", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Platform information initialized" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_PROJECT_DESCRIPTION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_HOMEPAGE_URL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_NAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "lui_components_bridge" + }, + { + "name" : "CMAKE_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Ranlib" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib" + }, + { + "name" : "CMAKE_READELF", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readelf" + }, + { + "name" : "CMAKE_ROOT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake installation." + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22" + }, + { + "name" : "CMAKE_RUNTIME_OUTPUT_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of dll's." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SKIP_INSTALL_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when installing shared libraries, but are added when building." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_SKIP_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when using shared libraries." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STRIP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Strip" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip" + }, + { + "name" : "CMAKE_SYSTEM_NAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "Android" + }, + { + "name" : "CMAKE_SYSTEM_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "UNINITIALIZED", + "value" : "24" + }, + { + "name" : "CMAKE_TOOLCHAIN_FILE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "The CMake toolchain file" + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake" + }, + { + "name" : "CMAKE_UNAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "uname command" + } + ], + "type" : "INTERNAL", + "value" : "/usr/bin/uname" + }, + { + "name" : "CMAKE_VERBOSE_MAKEFILE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo." + } + ], + "type" : "BOOL", + "value" : "FALSE" + }, + { + "name" : "log_lib", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to a library." + } + ], + "type" : "FILEPATH", + "value" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/liblog.so" + }, + { + "name" : "lui_components_bridge_BINARY_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64" + }, + { + "name" : "lui_components_bridge_IS_TOP_LEVEL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "ON" + }, + { + "name" : "lui_components_bridge_SOURCE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp" + } + ], + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/cmakeFiles-v1-365eb2c77d0cb65a5b49.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/cmakeFiles-v1-365eb2c77d0cb65a5b49.json new file mode 100644 index 00000000..71a7da80 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/cmakeFiles-v1-365eb2c77d0cb65a5b49.json @@ -0,0 +1,471 @@ +{ + "inputs" : + [ + { + "path" : "CMakeLists.txt" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android-legacy.toolchain.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/platforms.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Determine.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystem.cmake.in" + }, + { + "isGenerated" : true, + "path" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Initialize.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Initialize.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android/Determine-Compiler.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Determine-Compiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCompilerIdDetection.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ADSP-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Borland-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Bruce-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Cray-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GHS-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/HP-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IAR-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Intel-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/MSVC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVHPC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVIDIA-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PGI-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PathScale-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SCO-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TI-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Watcom-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XL-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XLClang-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeFindBinUtils.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-FindBinUtils.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in" + }, + { + "isGenerated" : true, + "path" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeGenericSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeInitializeConfigs.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Linux.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/UnixPaths.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Clang.cmake" + }, + { + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/flags.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitIncludeInfo.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseLibraryArchitecture.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompileFeatures.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Internal/FeatureTesting.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in" + }, + { + "isGenerated" : true, + "path" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake" + } + ], + "kind" : "cmakeFiles", + "paths" : + { + "build" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64", + "source" : "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp" + }, + "version" : + { + "major" : 1, + "minor" : 0 + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/codemodel-v2-eec1c6e44002442862a0.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/codemodel-v2-eec1c6e44002442862a0.json new file mode 100644 index 00000000..1ba50df3 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/codemodel-v2-eec1c6e44002442862a0.json @@ -0,0 +1,60 @@ +{ + "configurations" : + [ + { + "directories" : + [ + { + "build" : ".", + "jsonFile" : "directory-.-Debug-f5ebdc15457944623624.json", + "minimumCMakeVersion" : + { + "string" : "3.6.0" + }, + "projectIndex" : 0, + "source" : ".", + "targetIndexes" : + [ + 0 + ] + } + ], + "name" : "Debug", + "projects" : + [ + { + "directoryIndexes" : + [ + 0 + ], + "name" : "lui_components_bridge", + "targetIndexes" : + [ + 0 + ] + } + ], + "targets" : + [ + { + "directoryIndex" : 0, + "id" : "lui_jni_bridge::@6890427a1f51a3e7e1df", + "jsonFile" : "target-lui_jni_bridge-Debug-a3d79980adbcdc46feee.json", + "name" : "lui_jni_bridge", + "projectIndex" : 0 + } + ] + } + ], + "kind" : "codemodel", + "paths" : + { + "build" : "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64", + "source" : "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp" + }, + "version" : + { + "major" : 2, + "minor" : 3 + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json new file mode 100644 index 00000000..3a67af9c --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json @@ -0,0 +1,14 @@ +{ + "backtraceGraph" : + { + "commands" : [], + "files" : [], + "nodes" : [] + }, + "installers" : [], + "paths" : + { + "build" : ".", + "source" : "." + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/index-2026-10-06T10-09-37-0911.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/index-2026-10-06T10-09-37-0911.json new file mode 100644 index 00000000..868380ba --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/index-2026-10-06T10-09-37-0911.json @@ -0,0 +1,92 @@ +{ + "cmake" : + { + "generator" : + { + "multiConfig" : false, + "name" : "Ninja" + }, + "paths" : + { + "cmake" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake", + "cpack" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/cpack", + "ctest" : "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ctest", + "root" : "/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22" + }, + "version" : + { + "isDirty" : false, + "major" : 3, + "minor" : 22, + "patch" : 1, + "string" : "3.22.1-g37088a8", + "suffix" : "g37088a8" + } + }, + "objects" : + [ + { + "jsonFile" : "codemodel-v2-eec1c6e44002442862a0.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + }, + { + "jsonFile" : "cache-v2-2212472cb17d9cbd701d.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "cmakeFiles-v1-365eb2c77d0cb65a5b49.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + ], + "reply" : + { + "client-agp" : + { + "cache-v2" : + { + "jsonFile" : "cache-v2-2212472cb17d9cbd701d.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + "cmakeFiles-v1" : + { + "jsonFile" : "cmakeFiles-v1-365eb2c77d0cb65a5b49.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + "codemodel-v2" : + { + "jsonFile" : "codemodel-v2-eec1c6e44002442862a0.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + } + } + } +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/target-lui_jni_bridge-Debug-a3d79980adbcdc46feee.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/target-lui_jni_bridge-Debug-a3d79980adbcdc46feee.json new file mode 100644 index 00000000..05688e5b --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.cmake/api/v1/reply/target-lui_jni_bridge-Debug-a3d79980adbcdc46feee.json @@ -0,0 +1,117 @@ +{ + "artifacts" : + [ + { + "path" : "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_library", + "target_link_libraries" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 32, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 34, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC" + } + ], + "defines" : + [ + { + "define" : "lui_jni_bridge_EXPORTS" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0 + ], + "sysroot" : + { + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot" + } + } + ], + "id" : "lui_jni_bridge::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments", + "role" : "flags" + }, + { + "backtrace" : 2, + "fragment" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/liblog.so", + "role" : "libraries" + }, + { + "fragment" : "-latomic -lm", + "role" : "libraries" + } + ], + "language" : "C", + "sysroot" : + { + "path" : "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot" + } + }, + "name" : "lui_jni_bridge", + "nameOnDisk" : "liblui_jni_bridge.so", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "lui_jni_bridge_stub.c", + "sourceGroupIndex" : 0 + } + ], + "type" : "SHARED_LIBRARY" +} diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.ninja_deps b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.ninja_deps new file mode 100644 index 00000000..f8cbb1d0 Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.ninja_deps differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.ninja_log b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.ninja_log new file mode 100644 index 00000000..5d970df5 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/.ninja_log @@ -0,0 +1,3 @@ +# ninja log v5 +0 33 1791281377982546075 CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o 10461965f4f7e463 +33 103 1791281378051545660 /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so 3733d40c0a5ccda diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeCache.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeCache.txt new file mode 100644 index 00000000..bcdf6681 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeCache.txt @@ -0,0 +1,365 @@ +# This is the CMakeCache file. +# For build in directory: /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64 +# It was generated by CMake: /home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//No help, variable specified on the command line. +ANDROID_ABI:UNINITIALIZED=x86_64 + +//No help, variable specified on the command line. +ANDROID_NDK:UNINITIALIZED=/home/ubuntu/android-sdk/ndk/26.1.10909125 + +//No help, variable specified on the command line. +ANDROID_PLATFORM:UNINITIALIZED=android-24 + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-addr2line + +//No help, variable specified on the command line. +CMAKE_ANDROID_ARCH_ABI:UNINITIALIZED=x86_64 + +//No help, variable specified on the command line. +CMAKE_ANDROID_NDK:UNINITIALIZED=/home/ubuntu/android-sdk/ndk/26.1.10909125 + +//Archiver +CMAKE_AR:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar + +//Flags used by the compiler during all build types. +CMAKE_ASM_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_ASM_FLAGS_DEBUG:STRING= + +//Flags used by the compiler during release builds. +CMAKE_ASM_FLAGS_RELEASE:STRING= + +//Choose the type of build, options are: None Debug Release RelWithDebInfo +// MinSizeRel ... +CMAKE_BUILD_TYPE:STRING=Debug + +//Flags used by the compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_CXX_FLAGS_DEBUG:STRING= + +//Flags used by the compiler during release builds. +CMAKE_CXX_FLAGS_RELEASE:STRING= + +//LLVM archiver +CMAKE_C_COMPILER_AR:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar + +//Generate index for LLVM archive +CMAKE_C_COMPILER_RANLIB:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING= + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_C_FLAGS_RELEASE:STRING= + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Libraries linked by default with all C applications. +CMAKE_C_STANDARD_LIBRARIES:STRING=-latomic -lm + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//No help, variable specified on the command line. +CMAKE_EXPORT_COMPILE_COMMANDS:UNINITIALIZED=ON + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//No help, variable specified on the command line. +CMAKE_LIBRARY_OUTPUT_DIRECTORY:UNINITIALIZED=/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64 + +//Path to a program. +CMAKE_LINKER:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld + +//No help, variable specified on the command line. +CMAKE_MAKE_PROGRAM:UNINITIALIZED=/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objdump + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=lui_components_bridge + +//Ranlib +CMAKE_RANLIB:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readelf + +//No help, variable specified on the command line. +CMAKE_RUNTIME_OUTPUT_DIRECTORY:UNINITIALIZED=/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64 + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Strip +CMAKE_STRIP:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip + +//No help, variable specified on the command line. +CMAKE_SYSTEM_NAME:UNINITIALIZED=Android + +//No help, variable specified on the command line. +CMAKE_SYSTEM_VERSION:UNINITIALIZED=24 + +//The CMake toolchain file +CMAKE_TOOLCHAIN_FILE:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Path to a library. +log_lib:FILEPATH=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/liblog.so + +//Value Computed by CMake +lui_components_bridge_BINARY_DIR:STATIC=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64 + +//Value Computed by CMake +lui_components_bridge_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +lui_components_bridge_SOURCE_DIR:STATIC=/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64 +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=22 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/home/ubuntu/android-sdk/cmake/3.22.1/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/home/ubuntu/android-sdk/cmake/3.22.1/bin/ctest +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES +CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Ninja +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake new file mode 100644 index 00000000..ac9db3dc --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake @@ -0,0 +1,72 @@ +set(CMAKE_C_COMPILER "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "Clang") +set(CMAKE_C_COMPILER_VERSION "17.0.2") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17") +set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") +set(CMAKE_C17_COMPILE_FEATURES "c_std_17") +set(CMAKE_C23_COMPILE_FEATURES "c_std_23") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU") +set(CMAKE_C_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar") +set(CMAKE_C_COMPILER_AR "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar") +set(CMAKE_RANLIB "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib") +set(CMAKE_C_COMPILER_RANLIB "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib") +set(CMAKE_LINKER "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCC ) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_C_LIBRARY_ARCHITECTURE "") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "-l:libunwind.a;dl;c;-l:libunwind.a;dl") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/x86_64;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 00000000..c9404af1 Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake new file mode 100644 index 00000000..475181a5 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-6.8.0-1061-aws") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "6.8.0-1061-aws") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + +include("/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake") + +set(CMAKE_SYSTEM "Android-1") +set(CMAKE_SYSTEM_NAME "Android") +set(CMAKE_SYSTEM_VERSION "1") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") + +set(CMAKE_CROSSCOMPILING "TRUE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 00000000..41b99d77 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,803 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if !defined(__STDC__) && !defined(__clang__) +# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) +# define C_VERSION "90" +# else +# define C_VERSION +# endif +#elif __STDC_VERSION__ > 201710L +# define C_VERSION "23" +#elif __STDC_VERSION__ >= 201710L +# define C_VERSION "17" +#elif __STDC_VERSION__ >= 201000L +# define C_VERSION "11" +#elif __STDC_VERSION__ >= 199901L +# define C_VERSION "99" +#else +# define C_VERSION "90" +#endif +const char* info_language_standard_default = + "INFO" ":" "standard_default[" C_VERSION "]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */ +#if (defined(__clang__) || defined(__GNUC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) && !defined(_MSC_VER) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o new file mode 100644 index 00000000..6c76f3cf Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/CMakeOutput.log b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/CMakeOutput.log new file mode 100644 index 00000000..bc395ad2 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/CMakeOutput.log @@ -0,0 +1,126 @@ +The target system is: Android - 1 - x86_64 +The host system is: Linux - 6.8.0-1061-aws - x86_64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang +Build flags: -g;-DANDROID;-fdata-sections;-ffunction-sections;-funwind-tables;-fstack-protector-strong;-no-canonical-prefixes;-D_FORTIFY_SOURCE=2;-Wformat;-Werror=format-security; +Id flags: -c;--target=x86_64-none-linux-android24 + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o" + +The C compiler identification is Clang, found in "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o" + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/CMakeTmp + +Run Build Command(s):/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja cmTC_3cf1c && [1/2] Building C object CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o +Android (10552028, +pgo, +bolt, +lto, -mlgo, based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362) +Target: x86_64-none-linux-android24 +Thread model: posix +InstalledDir: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin + (in-process) + "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" -cc1 -triple x86_64-none-linux-android24 -emit-obj -mrelax-all -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -target-feature +sse4.2 -target-feature +popcnt -target-feature +cx16 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/CMakeTmp -resource-dir /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17 -dependency-file CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o.d -MT CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o -sys-header-deps -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -internal-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include -internal-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -Wformat -fdebug-compilation-dir=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/CMakeTmp -ferror-limit 19 -stack-protector 2 -fgnuc-version=4.2.1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o -x c /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c +clang -cc1 version 17.0.2 based upon LLVM 17.0.2 default target x86_64-unknown-linux-gnu +ignoring nonexistent directory "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include" +ignoring nonexistent directory "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include" +#include "..." search starts here: +#include <...> search starts here: + /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include + /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android + /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include +End of search list. +[2/2] Linking C executable cmTC_3cf1c +Android (10552028, +pgo, +bolt, +lto, -mlgo, based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362) +Target: x86_64-none-linux-android24 +Thread model: posix +InstalledDir: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin + "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld" --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -pie -z now -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /system/bin/linker64 -o cmTC_3cf1c /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtbegin_dynamic.o -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/x86_64 -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24 -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib --build-id=sha1 --no-rosegment --no-undefined-version --fatal-warnings --no-undefined CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a -l:libunwind.a -ldl -lc /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a -l:libunwind.a -ldl /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtend_android.o + + + +Parsed C implicit include dir info from above output: rv=done + found start of include info + found start of implicit include info + add: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include] + add: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android] + add: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] + end of search list found + collapse include dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include] + collapse include dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android] + collapse include dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] + implicit include dirs: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld\.lld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja cmTC_3cf1c && [1/2] Building C object CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o] + ignore line: [Android (10552028 +pgo +bolt +lto -mlgo based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)] + ignore line: [Target: x86_64-none-linux-android24] + ignore line: [Thread model: posix] + ignore line: [InstalledDir: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin] + ignore line: [ (in-process)] + ignore line: [ "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" -cc1 -triple x86_64-none-linux-android24 -emit-obj -mrelax-all -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -target-feature +sse4.2 -target-feature +popcnt -target-feature +cx16 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/CMakeTmp -resource-dir /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17 -dependency-file CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o.d -MT CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o -sys-header-deps -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -internal-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include -internal-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include -internal-externc-isystem /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -Wformat -fdebug-compilation-dir=/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/CMakeTmp -ferror-limit 19 -stack-protector 2 -fgnuc-version=4.2.1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o -x c /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c] + ignore line: [clang -cc1 version 17.0.2 based upon LLVM 17.0.2 default target x86_64-unknown-linux-gnu] + ignore line: [ignoring nonexistent directory "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include"] + ignore line: [ignoring nonexistent directory "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/include] + ignore line: [ /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android] + ignore line: [ /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] + ignore line: [End of search list.] + ignore line: [[2/2] Linking C executable cmTC_3cf1c] + ignore line: [Android (10552028 +pgo +bolt +lto -mlgo based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)] + ignore line: [Target: x86_64-none-linux-android24] + ignore line: [Thread model: posix] + ignore line: [InstalledDir: /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin] + link line: [ "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld" --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -pie -z now -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /system/bin/linker64 -o cmTC_3cf1c /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtbegin_dynamic.o -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/x86_64 -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24 -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android -L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib --build-id=sha1 --no-rosegment --no-undefined-version --fatal-warnings --no-undefined CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a -l:libunwind.a -ldl -lc /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a -l:libunwind.a -ldl /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtend_android.o] + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld] ==> ignore + arg [--sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot] ==> ignore + arg [-pie] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/system/bin/linker64] ==> ignore + arg [-o] ==> ignore + arg [cmTC_3cf1c] ==> ignore + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtbegin_dynamic.o] ==> obj [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtbegin_dynamic.o] + arg [-L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/x86_64] ==> dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/x86_64] + arg [-L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24] ==> dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24] + arg [-L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android] ==> dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android] + arg [-L/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] ==> dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] + arg [--build-id=sha1] ==> ignore + arg [--no-rosegment] ==> ignore + arg [--no-undefined-version] ==> ignore + arg [--fatal-warnings] ==> ignore + arg [--no-undefined] ==> ignore + arg [CMakeFiles/cmTC_3cf1c.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a] ==> lib [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a] + arg [-l:libunwind.a] ==> lib [-l:libunwind.a] + arg [-ldl] ==> lib [dl] + arg [-lc] ==> lib [c] + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a] ==> lib [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a] + arg [-l:libunwind.a] ==> lib [-l:libunwind.a] + arg [-ldl] ==> lib [dl] + arg [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtend_android.o] ==> obj [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtend_android.o] + remove lib [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a] + remove lib [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/libclang_rt.builtins-x86_64-android.a] + collapse library dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/x86_64] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/x86_64] + collapse library dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24] + collapse library dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android] + collapse library dir [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] ==> [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] + implicit libs: [-l:libunwind.a;dl;c;-l:libunwind.a;dl] + implicit objs: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtbegin_dynamic.o;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/crtend_android.o] + implicit dirs: [/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/x86_64;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android;/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] + implicit fwks: [] + + diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/TargetDirectories.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/TargetDirectories.txt new file mode 100644 index 00000000..8976b414 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,3 @@ +/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/lui_jni_bridge.dir +/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/edit_cache.dir +/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/rebuild_cache.dir diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/cmake.check_cache b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/cmake.check_cache new file mode 100644 index 00000000..3dccd731 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o new file mode 100644 index 00000000..5572dbb3 Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/rules.ninja b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/rules.ninja new file mode 100644 index 00000000..0edd1fd6 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/CMakeFiles/rules.ninja @@ -0,0 +1,64 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.22 + +# This file contains all the rules used to get the outputs files +# built from the input files. +# It is included in the main 'build.ninja'. + +# ============================================================================= +# Project: lui_components_bridge +# Configurations: Debug +# ============================================================================= +# ============================================================================= + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__lui_jni_bridge_Debug + depfile = $DEP_FILE + deps = gcc + command = /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=x86_64-none-linux-android24 --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C shared library. + +rule C_SHARED_LIBRARY_LINKER__lui_jni_bridge_Debug + command = $PRE_LINK && /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=x86_64-none-linux-android24 --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE $in $LINK_PATH $LINK_LIBRARIES && $POST_BUILD + description = Linking C shared library $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for running custom commands. + +rule CUSTOM_COMMAND + command = $COMMAND + description = $DESC + + +############################################# +# Rule for re-running cmake. + +rule RERUN_CMAKE + command = /home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake --regenerate-during-build -S/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp -B/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64 + description = Re-running CMake... + generator = 1 + + +############################################# +# Rule for cleaning all built files. + +rule CLEAN + command = /home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja $FILE_ARG -t clean $TARGETS + description = Cleaning all built files... + + +############################################# +# Rule for printing all primary targets available. + +rule HELP + command = /home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja -t targets + description = All primary targets available: + diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/additional_project_files.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/additional_project_files.txt new file mode 100644 index 00000000..e69de29b diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/android_gradle_build.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/android_gradle_build.json new file mode 100644 index 00000000..6acdc78d --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/android_gradle_build.json @@ -0,0 +1,38 @@ +{ + "buildFiles": [ + "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt" + ], + "cleanCommandsComponents": [ + [ + "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja", + "-C", + "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64", + "clean" + ] + ], + "buildTargetsCommandComponents": [ + "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja", + "-C", + "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64", + "{LIST_OF_TARGETS_TO_BUILD}" + ], + "libraries": { + "lui_jni_bridge::@6890427a1f51a3e7e1df": { + "toolchain": "toolchain", + "abi": "x86_64", + "artifactName": "lui_jni_bridge", + "output": "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so", + "runtimeFiles": [] + } + }, + "toolchains": { + "toolchain": { + "cCompilerExecutable": "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang.lld", + "cppCompilerExecutable": "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.lld" + } + }, + "cFileExtensions": [ + "c" + ], + "cppFileExtensions": [] +} \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/android_gradle_build_mini.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/android_gradle_build_mini.json new file mode 100644 index 00000000..b36e6b61 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/android_gradle_build_mini.json @@ -0,0 +1,27 @@ +{ + "buildFiles": [ + "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt" + ], + "cleanCommandsComponents": [ + [ + "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja", + "-C", + "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64", + "clean" + ] + ], + "buildTargetsCommandComponents": [ + "/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja", + "-C", + "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64", + "{LIST_OF_TARGETS_TO_BUILD}" + ], + "libraries": { + "lui_jni_bridge::@6890427a1f51a3e7e1df": { + "artifactName": "lui_jni_bridge", + "abi": "x86_64", + "output": "/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so", + "runtimeFiles": [] + } + } +} \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/build.ninja b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/build.ninja new file mode 100644 index 00000000..7ad01bc8 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/build.ninja @@ -0,0 +1,154 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.22 + +# This file contains all the build statements describing the +# compilation DAG. + +# ============================================================================= +# Write statements declared in CMakeLists.txt: +# +# Which is the root file. +# ============================================================================= + +# ============================================================================= +# Project: lui_components_bridge +# Configurations: Debug +# ============================================================================= + +############################################# +# Minimal version of Ninja required by this file + +ninja_required_version = 1.5 + + +############################################# +# Set configuration variable for custom commands. + +CONFIGURATION = Debug +# ============================================================================= +# Include auxiliary files. + + +############################################# +# Include rules file. + +include CMakeFiles/rules.ninja + +# ============================================================================= + +############################################# +# Logical path to working directory; prefix for absolute paths. + +cmake_ninja_workdir = /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/ +# ============================================================================= +# Object build statements for SHARED_LIBRARY target lui_jni_bridge + + +############################################# +# Order-only phony target for lui_jni_bridge + +build cmake_object_order_depends_target_lui_jni_bridge: phony || CMakeFiles/lui_jni_bridge.dir + +build CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o: C_COMPILER__lui_jni_bridge_Debug /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c || cmake_object_order_depends_target_lui_jni_bridge + DEFINES = -Dlui_jni_bridge_EXPORTS + DEP_FILE = CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o.d + FLAGS = -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC + OBJECT_DIR = CMakeFiles/lui_jni_bridge.dir + OBJECT_FILE_DIR = CMakeFiles/lui_jni_bridge.dir + TARGET_COMPILE_PDB = CMakeFiles/lui_jni_bridge.dir/ + TARGET_PDB = /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.pdb + + +# ============================================================================= +# Link build statements for SHARED_LIBRARY target lui_jni_bridge + + +############################################# +# Link the shared library /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so + +build /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so: C_SHARED_LIBRARY_LINKER__lui_jni_bridge_Debug CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o | /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/liblog.so + LANGUAGE_COMPILE_FLAGS = -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info + LINK_FLAGS = -static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments + LINK_LIBRARIES = /home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/24/liblog.so -latomic -lm + OBJECT_DIR = CMakeFiles/lui_jni_bridge.dir + POST_BUILD = : + PRE_LINK = : + SONAME = liblui_jni_bridge.so + SONAME_FLAG = -Wl,-soname, + TARGET_COMPILE_PDB = CMakeFiles/lui_jni_bridge.dir/ + TARGET_FILE = /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so + TARGET_PDB = /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.pdb + + +############################################# +# Utility command for edit_cache + +build CMakeFiles/edit_cache.util: CUSTOM_COMMAND + COMMAND = cd /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64 && /home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. + DESC = No interactive CMake dialog available... + restat = 1 + +build edit_cache: phony CMakeFiles/edit_cache.util + + +############################################# +# Utility command for rebuild_cache + +build CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cd /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64 && /home/ubuntu/android-sdk/cmake/3.22.1/bin/cmake --regenerate-during-build -S/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp -B/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64 + DESC = Running CMake to regenerate build system... + pool = console + restat = 1 + +build rebuild_cache: phony CMakeFiles/rebuild_cache.util + +# ============================================================================= +# Target aliases. + +build liblui_jni_bridge.so: phony /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so + +build lui_jni_bridge: phony /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so + +# ============================================================================= +# Folder targets. + +# ============================================================================= + +############################################# +# Folder: /home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64 + +build all: phony /home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64/liblui_jni_bridge.so + +# ============================================================================= +# Built-in targets + + +############################################# +# Re-run CMake if any of its inputs changed. + +build build.ninja: RERUN_CMAKE | /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCompilerIdDetection.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompileFeatures.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeFindBinUtils.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeGenericSystem.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeInitializeConfigs.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitIncludeInfo.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseLibraryArchitecture.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystem.cmake.in /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ADSP-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMCC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/AppleClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Borland-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Bruce-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-FindBinUtils.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Compaq-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Cray-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Embarcadero-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Fujitsu-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GHS-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/HP-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IAR-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Intel-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/MSVC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVHPC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVIDIA-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PGI-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PathScale-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SCO-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SDCC-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SunPro-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TI-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Watcom-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XL-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XLClang-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/zOS-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Internal/FeatureTesting.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Initialize.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android/Determine-Compiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Linux.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/UnixPaths.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android-legacy.toolchain.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/flags.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Clang.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Determine.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Initialize.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Determine-Compiler.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/platforms.cmake /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt CMakeCache.txt CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake + pool = console + + +############################################# +# A missing CMake input file is not an error. + +build /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCCompilerABI.c /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeCompilerIdDetection.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompileFeatures.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeFindBinUtils.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeGenericSystem.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeInitializeConfigs.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitIncludeInfo.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeParseLibraryArchitecture.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystem.cmake.in /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInformation.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ADSP-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMCC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/ARMClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/AppleClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Borland-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Bruce-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang-FindBinUtils.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Clang.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Compaq-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Cray-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Embarcadero-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Fujitsu-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GHS-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/GNU.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/HP-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IAR-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Intel-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/MSVC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVHPC-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/NVIDIA-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PGI-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/PathScale-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SCO-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SDCC-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/SunPro-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TI-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/Watcom-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XL-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/XLClang-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Compiler/zOS-C-DetermineCompiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Internal/FeatureTesting.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Clang.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine-C.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Determine.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android-Initialize.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Android/Determine-Compiler.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/Linux.cmake /home/ubuntu/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/Platform/UnixPaths.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android-legacy.toolchain.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/flags.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Clang.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Determine.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android-Initialize.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Android.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/hooks/pre/Determine-Compiler.cmake /home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/platforms.cmake /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt CMakeCache.txt CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake: phony + + +############################################# +# Clean all the built files. + +build clean: CLEAN + + +############################################# +# Print all primary targets available. + +build help: HELP + + +############################################# +# Make the all target the default. + +default all diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/build_file_index.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/build_file_index.txt new file mode 100644 index 00000000..68b383b9 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/build_file_index.txt @@ -0,0 +1 @@ +/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/cmake_install.cmake b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/cmake_install.cmake new file mode 100644 index 00000000..4efb5184 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/cmake_install.cmake @@ -0,0 +1,54 @@ +# Install script for directory: /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "TRUE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objdump") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/compile_commands.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/compile_commands.json new file mode 100644 index 00000000..0cbcb2ea --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/compile_commands.json @@ -0,0 +1,7 @@ +[ +{ + "directory": "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64", + "command": "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=x86_64-none-linux-android24 --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dlui_jni_bridge_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -o CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o -c /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c", + "file": "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c" +} +] \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/compile_commands.json.bin b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/compile_commands.json.bin new file mode 100644 index 00000000..17fd8973 Binary files /dev/null and b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/compile_commands.json.bin differ diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/configure_fingerprint.bin b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/configure_fingerprint.bin new file mode 100644 index 00000000..abf052bd --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/configure_fingerprint.bin @@ -0,0 +1,28 @@ +C/C++ Structured Logr +p +n/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/additional_project_files.txtC +A +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ‡åÂ…‘4  þäÂ…‘4o +m +k/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/android_gradle_build.json  ‡åÂ…‘4ù ÿäÂ…‘4t +r +p/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/android_gradle_build_mini.json  ‡åÂ…‘4é …åÂ…‘4a +_ +]/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/build.ninja  ‡åÂ…‘4³µ ôäÂ…‘4e +c +a/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/build.ninja.txt  ‡åÂ…‘4j +h +f/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/build_file_index.txt  ‡åÂ…‘4 R †åÂ…‘4k +i +g/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/compile_commands.json  ‡åÂ…‘4· ôäÂ…‘4o +m +k/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/compile_commands.json.bin  ‡åÂ…‘4 – ôäÂ…‘4u +s +q/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/metadata_generation_command.txt  ˆåÂ…‘4 +‡ †åÂ…‘4h +f +d/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/prefab_config.json  ˆåÂ…‘4  ( †åÂ…‘4m +k +i/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/symbol_folder_index.txt  ˆåÂ…‘4  h †åÂ…‘4V +T +R/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/CMakeLists.txt  ˆåÂ…‘4 ¨ Ð芅‘4 \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/metadata_generation_command.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/metadata_generation_command.txt new file mode 100644 index 00000000..a6da34c3 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/metadata_generation_command.txt @@ -0,0 +1,18 @@ + -H/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp +-DCMAKE_SYSTEM_NAME=Android +-DCMAKE_EXPORT_COMPILE_COMMANDS=ON +-DCMAKE_SYSTEM_VERSION=24 +-DANDROID_PLATFORM=android-24 +-DANDROID_ABI=x86_64 +-DCMAKE_ANDROID_ARCH_ABI=x86_64 +-DANDROID_NDK=/home/ubuntu/android-sdk/ndk/26.1.10909125 +-DCMAKE_ANDROID_NDK=/home/ubuntu/android-sdk/ndk/26.1.10909125 +-DCMAKE_TOOLCHAIN_FILE=/home/ubuntu/android-sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake +-DCMAKE_MAKE_PROGRAM=/home/ubuntu/android-sdk/cmake/3.22.1/bin/ninja +-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64 +-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64 +-DCMAKE_BUILD_TYPE=Debug +-B/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64 +-GNinja + Build command args: [] + Version: 2 \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/prefab_config.json b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/prefab_config.json new file mode 100644 index 00000000..e799de86 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/prefab_config.json @@ -0,0 +1,4 @@ +{ + "enabled": false, + "packages": [] +} \ No newline at end of file diff --git a/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/symbol_folder_index.txt b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/symbol_folder_index.txt new file mode 100644 index 00000000..46468415 --- /dev/null +++ b/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64/symbol_folder_index.txt @@ -0,0 +1 @@ +/home/ubuntu/repos/lui/examples/components/android/app/build/intermediates/cxx/Debug/406wr1e2/obj/x86_64 \ No newline at end of file diff --git a/examples/components/android/app/.cxx/tools/debug/arm64-v8a/compile_commands.json b/examples/components/android/app/.cxx/tools/debug/arm64-v8a/compile_commands.json new file mode 100644 index 00000000..4fc5cabf --- /dev/null +++ b/examples/components/android/app/.cxx/tools/debug/arm64-v8a/compile_commands.json @@ -0,0 +1,7 @@ +[ +{ + "directory": "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/arm64-v8a", + "command": "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android24 --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dlui_jni_bridge_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -o CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o -c /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c", + "file": "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c" +} +] \ No newline at end of file diff --git a/examples/components/android/app/.cxx/tools/debug/x86_64/compile_commands.json b/examples/components/android/app/.cxx/tools/debug/x86_64/compile_commands.json new file mode 100644 index 00000000..0cbcb2ea --- /dev/null +++ b/examples/components/android/app/.cxx/tools/debug/x86_64/compile_commands.json @@ -0,0 +1,7 @@ +[ +{ + "directory": "/home/ubuntu/repos/lui/examples/components/android/app/.cxx/Debug/406wr1e2/x86_64", + "command": "/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=x86_64-none-linux-android24 --sysroot=/home/ubuntu/android-sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dlui_jni_bridge_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -o CMakeFiles/lui_jni_bridge.dir/lui_jni_bridge_stub.c.o -c /home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c", + "file": "/home/ubuntu/repos/lui/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c" +} +] \ No newline at end of file diff --git a/examples/components/android/app/build.gradle.kts b/examples/components/android/app/build.gradle.kts new file mode 100644 index 00000000..dcbc4d8d --- /dev/null +++ b/examples/components/android/app/build.gradle.kts @@ -0,0 +1,70 @@ +plugins { + id("com.android.application") + id("org.jetbrains.kotlin.android") + id("org.jetbrains.kotlin.plugin.compose") +} + +val ocamlInclude = providers.gradleProperty("lui.ocaml.include") + .orElse(providers.environmentVariable("LUI_OCAML_INCLUDE")) + .orElse( + providers.environmentVariable("LUI_MOBILE_TOOLCHAIN_ROOT") + .map { "$it/lib/ocaml" }, + ) + .orElse( + providers.environmentVariable("LG_ANDROID_OCAML_PREFIX") + .map { "$it/lib/ocaml" }, + ) + .orNull + +android { + namespace = "dev.lui.components" + compileSdk = 35 + + defaultConfig { + applicationId = "dev.lui.components" + minSdk = 24 + targetSdk = 35 + versionCode = 1 + versionName = "1.0" + + externalNativeBuild { + cmake { + arguments += listOfNotNull( + ocamlInclude?.let { "-DLUI_OCAML_INCLUDE=$it" }, + ) + abiFilters += listOf("arm64-v8a", "x86_64") + } + } + } + + externalNativeBuild { + cmake { + path = file("src/main/cpp/CMakeLists.txt") + version = "3.22.1" + } + } + + buildFeatures { + compose = true + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlin { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) + } + } +} + +dependencies { + implementation(project(":lui")) + implementation(platform("androidx.compose:compose-bom:2024.10.01")) + implementation("androidx.compose.ui:ui") + implementation("androidx.compose.material3:material3") + implementation("androidx.compose.material:material-icons-extended") + implementation("androidx.activity:activity-compose:1.9.3") +} diff --git a/examples/components/android/app/src/main/AndroidManifest.xml b/examples/components/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..2572485c --- /dev/null +++ b/examples/components/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + diff --git a/examples/components/android/app/src/main/cpp/CMakeLists.txt b/examples/components/android/app/src/main/cpp/CMakeLists.txt new file mode 100644 index 00000000..f7e61c06 --- /dev/null +++ b/examples/components/android/app/src/main/cpp/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.22.1) +project(lui_components_bridge C) + +# Compiles the JNI bridge into liblui_jni_bridge.so and links it against +# the OCaml runtime packaged by tooling/mobile/build_components_android.sh +# as jniLibs//liblui_components.so. +# +# LUI_OCAML_INCLUDE must point at the OCaml headers (/lib/ocaml) +# from the lg Android toolchain, and the liblui_components.so for this ABI +# must already exist under jniLibs. When either is missing we compile the +# stub exports instead so the app still builds and launches (the bridge +# reports "not accepted" and the gallery shows a placeholder). + +set(LUI_BACKEND_DIR "${CMAKE_SOURCE_DIR}/../../../../../../platform/android/lui") +set(LUI_COMPONENTS_SO "${CMAKE_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/liblui_components.so") + +find_library(log_lib log) + +if(LUI_OCAML_INCLUDE AND EXISTS "${LUI_COMPONENTS_SO}") + add_library(lui_jni_bridge SHARED + "${LUI_BACKEND_DIR}/src/main/cpp/lui_jni_bridge.c") + target_include_directories(lui_jni_bridge PRIVATE "${LUI_OCAML_INCLUDE}") + + add_library(lui_components SHARED IMPORTED) + set_target_properties(lui_components PROPERTIES + IMPORTED_LOCATION "${LUI_COMPONENTS_SO}") + target_link_libraries(lui_jni_bridge lui_components ${log_lib}) +else() + message(WARNING + "OCaml toolchain or liblui_components.so missing for ${ANDROID_ABI}; " + "building stub LuiBridge exports") + add_library(lui_jni_bridge SHARED + "${CMAKE_SOURCE_DIR}/lui_jni_bridge_stub.c") + target_link_libraries(lui_jni_bridge ${log_lib}) +endif() diff --git a/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c b/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c new file mode 100644 index 00000000..e44e6ce1 --- /dev/null +++ b/examples/components/android/app/src/main/cpp/lui_jni_bridge_stub.c @@ -0,0 +1,91 @@ +/* Stub exports for builds without the lg Android OCaml toolchain: every + * dev.lui.LuiBridge JNI entry resolves but returns "not accepted", so the + * gallery app still compiles and launches while showing its + * runtime-unavailable placeholder. The real implementation is + * platform/android/lui/src/main/cpp/lui_jni_bridge.c. */ + +#include + +#define LUI_JNI_NAME(name) Java_dev_lui_LuiBridge_##name + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeStart)( + JNIEnv *env, jclass clazz, jint platform_code, jint host_code) { + (void)env; (void)clazz; (void)platform_code; (void)host_code; + return 0; +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeThreadRegister)(JNIEnv *env, jclass clazz) { + (void)env; (void)clazz; + return 0; +} + +#define LUI_STUB_NODE(name) \ + JNIEXPORT jint JNICALL LUI_JNI_NAME(name)(JNIEnv *env, jclass clazz, \ + jlong node) { \ + (void)env; (void)clazz; (void)node; \ + return 0; \ + } + +LUI_STUB_NODE(nativeAppear) +LUI_STUB_NODE(nativePress) +LUI_STUB_NODE(nativeLongPress) +LUI_STUB_NODE(nativeSubmit) +LUI_STUB_NODE(nativeDismiss) +LUI_STUB_NODE(nativeDoublePress) +LUI_STUB_NODE(nativeRadioChanged) +LUI_STUB_NODE(nativePointerEnter) +LUI_STUB_NODE(nativePointerLeave) + +#define LUI_STUB_NODE_STRING(name) \ + JNIEXPORT jint JNICALL LUI_JNI_NAME(name)(JNIEnv *env, jclass clazz, \ + jlong node, jstring text) { \ + (void)env; (void)clazz; (void)node; (void)text; \ + return 0; \ + } + +LUI_STUB_NODE_STRING(nativeTextChanged) +LUI_STUB_NODE_STRING(nativePicked) + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeToggleChanged)( + JNIEnv *env, jclass clazz, jlong node, jint checked) { + (void)env; (void)clazz; (void)node; (void)checked; + return 0; +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeSliderChanged)( + JNIEnv *env, jclass clazz, jlong node, jdouble fraction) { + (void)env; (void)clazz; (void)node; (void)fraction; + return 0; +} + +#define LUI_STUB_POINTER(name) \ + JNIEXPORT jint JNICALL LUI_JNI_NAME(name)( \ + JNIEnv *env, jclass clazz, jlong node, jdouble x, jdouble y, \ + jint modifiers, jint button, jstring target_class) { \ + (void)env; (void)clazz; (void)node; (void)x; (void)y; \ + (void)modifiers; (void)button; (void)target_class; \ + return 0; \ + } + +LUI_STUB_POINTER(nativePressDetail) +LUI_STUB_POINTER(nativePointerDown) +LUI_STUB_POINTER(nativePointerUp) +LUI_STUB_POINTER(nativeContextMenuPress) + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeExtensionEvent)( + JNIEnv *env, jclass clazz, jlong node, jstring identifier, + jstring name, jstring json_values) { + (void)env; (void)clazz; (void)node; + (void)identifier; (void)name; (void)json_values; + return 0; +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeStop)(JNIEnv *env, jclass clazz) { + (void)env; (void)clazz; + return 0; +} + +JNIEXPORT jlong JNICALL LUI_JNI_NAME(nativeRootNode)(JNIEnv *env, jclass clazz) { + (void)env; (void)clazz; + return -1; +} diff --git a/examples/components/android/app/src/main/java/dev/lui/components/GalleryExtensions.kt b/examples/components/android/app/src/main/java/dev/lui/components/GalleryExtensions.kt new file mode 100644 index 00000000..4d120759 --- /dev/null +++ b/examples/components/android/app/src/main/java/dev/lui/components/GalleryExtensions.kt @@ -0,0 +1,59 @@ +package dev.lui.components + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Card +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import dev.lui.LuiExtensionProperty +import dev.lui.LuiExtensionRegistry +import dev.lui.LuiExtensionValueKind +import dev.lui.LuiSplit + +/** + * Gallery extension set for the Kotlin host: the LUI split components plus + * the gallery's own native-card and gallery-accent declarations. The + * fingerprint literals must equal the ones Lui_extension computes from + * examples/gallery/extension_schemas.ml — the drift check in test_lui.ml + * enforces the same invariant for the other hosts. + */ +object GalleryExtensions { + + private const val NATIVE_CARD_FINGERPRINT = + "lui-extension-v1|10:native-card|profiles:android/kotlin,web/web|standard-children:0|children:|properties:5:title:string:required:none|events:" + private const val GALLERY_ACCENT_FINGERPRINT = + "lui-tweak-v1|14:gallery-accent|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|properties:" + + fun register(registry: LuiExtensionRegistry) { + LuiSplit.register(registry) + registry.register( + identifier = "native-card", + fingerprint = NATIVE_CARD_FINGERPRINT, + properties = listOf( + LuiExtensionProperty("title", LuiExtensionValueKind.STRING, required = true), + ), + builder = { + Card(Modifier.fillMaxSize().padding(8.dp)) { + Column(Modifier.padding(16.dp)) { + Text( + string("title") ?: "", + style = MaterialTheme.typography.titleMedium, + ) + } + } + }, + ) + registry.registerTweak( + identifier = "gallery-accent", + fingerprint = GALLERY_ACCENT_FINGERPRINT, + ) { + Column(Modifier.fillMaxSize()) { + children.forEach { child(it) } + } + } + } +} diff --git a/examples/components/android/app/src/main/java/dev/lui/components/MainActivity.kt b/examples/components/android/app/src/main/java/dev/lui/components/MainActivity.kt new file mode 100644 index 00000000..93023d9d --- /dev/null +++ b/examples/components/android/app/src/main/java/dev/lui/components/MainActivity.kt @@ -0,0 +1,94 @@ +package dev.lui.components + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import dev.lui.LuiBackend +import dev.lui.LuiBridge +import dev.lui.LuiTheme +import dev.lui.dispatchToBridge + +/** + * Components-gallery host: starts the OCaml runtime through [LuiBridge], + * applies each delivered patch batch to [LuiBackend], and renders the + * retained tree. When the OCaml toolchain .so was absent at build time the + * bridge is a stub (start returns false) and a placeholder is shown. + */ +class MainActivity : ComponentActivity() { + + private val backend = LuiBackend( + onEvent = { event -> event.dispatchToBridge() } + ) + + private var runtimeStarted = false + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + enableEdgeToEdge() + GalleryExtensions.register(backend.extensions) + + runtimeStarted = runCatching { + LuiBridge.start(libraryName = "lui_jni_bridge") { json -> + backend.applyBatch(json) + } + }.getOrDefault(false) + + setContent { + LuiTheme(dark = isSystemInDarkTheme()) { + Surface( + modifier = Modifier.fillMaxSize(), + color = MaterialTheme.colorScheme.background, + ) { + if (runtimeStarted) { + backend.Content() + } else { + RuntimeUnavailable() + } + } + } + } + } + + override fun onDestroy() { + if (runtimeStarted) { + LuiBridge.stop() + } + super.onDestroy() + } +} + +@Composable +private fun RuntimeUnavailable() { + Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier.padding(32.dp), + ) { + Text( + "LUI runtime unavailable", + style = MaterialTheme.typography.titleMedium, + ) + Text( + "liblui_components.so was not built for this ABI — run " + + "tooling/mobile/build_components_android.sh with the lg " + + "Android OCaml toolchain, then rebuild.", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.padding(top = 8.dp), + ) + } + } +} diff --git a/examples/components/android/app/src/main/res/drawable/ic_launcher.xml b/examples/components/android/app/src/main/res/drawable/ic_launcher.xml new file mode 100644 index 00000000..56f2eb55 --- /dev/null +++ b/examples/components/android/app/src/main/res/drawable/ic_launcher.xml @@ -0,0 +1,12 @@ + + + + diff --git a/examples/components/android/build.gradle.kts b/examples/components/android/build.gradle.kts new file mode 100644 index 00000000..274bcb5d --- /dev/null +++ b/examples/components/android/build.gradle.kts @@ -0,0 +1,8 @@ +plugins { + id("com.android.application") version "8.6.1" apply false + id("com.android.library") version "8.6.1" apply false + id("org.jetbrains.kotlin.android") version "2.0.21" apply false + id("org.jetbrains.kotlin.plugin.compose") version "2.0.21" apply false + id("org.jetbrains.kotlin.plugin.serialization") version "2.0.21" apply false + id("app.cash.paparazzi") version "1.3.5" apply false +} diff --git a/examples/components/android/gradle.properties b/examples/components/android/gradle.properties new file mode 100644 index 00000000..a311f807 --- /dev/null +++ b/examples/components/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8 +android.useAndroidX=true +android.nonTransitiveRClass=true +kotlin.code.style=official diff --git a/examples/components/android/settings.gradle.kts b/examples/components/android/settings.gradle.kts new file mode 100644 index 00000000..0a85fc89 --- /dev/null +++ b/examples/components/android/settings.gradle.kts @@ -0,0 +1,20 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } +} + +rootProject.name = "lui-components-android" + +include(":app") +include(":lui") +project(":lui").projectDir = file("../../../platform/android/lui") diff --git a/examples/components/ios-swiftui/Sources/LUIComponentsApp/GalleryExtensions.swift b/examples/components/ios-swiftui/Sources/LUIComponentsApp/GalleryExtensions.swift index 4ee1e7ad..6d8833fc 100644 --- a/examples/components/ios-swiftui/Sources/LUIComponentsApp/GalleryExtensions.swift +++ b/examples/components/ios-swiftui/Sources/LUIComponentsApp/GalleryExtensions.swift @@ -37,7 +37,7 @@ func galleryExtensionRegistry() throws -> LUIAppleExtensionRegistry { try registry.registerTweak( LUIAppleTweak( identifier: "gallery-accent", - fingerprint: "lui-tweak-v1|14:gallery-accent|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|properties:" + fingerprint: "lui-tweak-v1|14:gallery-accent|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|properties:" ) { content, _ in AnyView( content diff --git a/examples/components/native/components_bridge.ml b/examples/components/native/components_bridge.ml index a506759b..f5f4d50b 100644 --- a/examples/components/native/components_bridge.ml +++ b/examples/components/native/components_bridge.ml @@ -25,6 +25,7 @@ let operating_system = function let host_kind = function | 1 -> WebHost | 2 -> SwiftUIHost + | 4 -> KotlinHost | 6 -> GPUIHost | _ -> GenericHost @@ -108,6 +109,17 @@ let context_menu_press node x y modifiers button target_class = dispatch (ContextMenuPress (node, pointer_detail x y modifiers button target_class)) +(* Extension events travel as a flat JSON object of scalar values; decode it + and let the runtime validate the payload against the declared schema. *) +let extension_event node identifier name json_values = + let values = + match Lui_json.parse_values json_values with + | values -> values + | exception Lui_json.Parse_error message -> + invalid_arg ("invalid extension event payload: " ^ message) + in + dispatch (ExtensionEvent (node, identifier, name, values)) + let dispose () = latest_patch := ""; ignore (Lui_app.dispose (app ())); @@ -135,10 +147,13 @@ let register prefix = register (prefix ^ "_pointer_enter") pointer_enter; register (prefix ^ "_pointer_leave") pointer_leave; register (prefix ^ "_context_menu_press") context_menu_press; + register (prefix ^ "_extension_event") extension_event; register (prefix ^ "_dispose") dispose; register (prefix ^ "_root_node") root_node -(* platform/native/lui_ocaml_bridge.c looks up "lui_ocaml_*". *) +(* platform/native/lui_ocaml_bridge.c looks up "lui_ocaml_*"; + platform/android/lui's JNI bridge looks up "lui_kotlin_*". *) let () = Printexc.record_backtrace true; - register "lui_ocaml" + register "lui_ocaml"; + register "lui_kotlin" diff --git a/examples/gallery/extension_schemas.json b/examples/gallery/extension_schemas.json index 21e073f5..f690ee00 100644 --- a/examples/gallery/extension_schemas.json +++ b/examples/gallery/extension_schemas.json @@ -46,6 +46,10 @@ { "os": "windows", "host": "gpui" + }, + { + "os": "android", + "host": "kotlin" } ], "splits": [ @@ -72,6 +76,10 @@ { "os": "windows", "host": "gpui" + }, + { + "os": "android", + "host": "kotlin" } ], "web": [ @@ -105,6 +113,16 @@ "os": "windows", "host": "gpui" } + ], + "web-and-kotlin": [ + { + "os": "web", + "host": "web" + }, + { + "os": "android", + "host": "kotlin" + } ] }, "components": [ @@ -281,7 +299,7 @@ }, { "identifier": "native-card", - "profiles": "web", + "profiles": "web-and-kotlin", "standardChildren": false, "children": [], "properties": [ diff --git a/examples/gallery/extension_schemas.ml b/examples/gallery/extension_schemas.ml index 32e899a3..9f83e043 100644 --- a/examples/gallery/extension_schemas.ml +++ b/examples/gallery/extension_schemas.ml @@ -274,35 +274,35 @@ let simulator_camera_schema = [ Lui_extension.event "state-change" [ Lui_extension.event_field "state" Lui_extension.StringScalar true ] ] let native_card_schema = - Lui_extension.component "native-card" [ { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost } ] + Lui_extension.component "native-card" [ { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = AndroidOS; Lui_protocol.profile_host = KotlinHost } ] false [ ] [ Lui_extension.property "title" Lui_extension.StringScalar true None ] [ ] let split_view_schema = - Lui_extension.component "split-view" [ { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost } ] + Lui_extension.component "split-view" [ { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = AndroidOS; Lui_protocol.profile_host = KotlinHost } ] false [ "split-branch"; "split-pane" ] [ Lui_extension.property "divider-thickness" Lui_extension.FloatScalar false None; Lui_extension.property "animation" Lui_extension.BoolScalar false None; Lui_extension.property "accessibility-identifier" Lui_extension.StringScalar false None ] [ ] let split_branch_schema = - Lui_extension.component "split-branch" [ { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost } ] + Lui_extension.component "split-branch" [ { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = AndroidOS; Lui_protocol.profile_host = KotlinHost } ] false [ "split-branch"; "split-pane" ] [ Lui_extension.property "orientation" Lui_extension.StringScalar true None; Lui_extension.property "ratio" Lui_extension.FloatScalar true None ] [ Lui_extension.event "ratio-changed" [ Lui_extension.event_field "ratio" Lui_extension.FloatScalar true ] ] let split_pane_schema = - Lui_extension.component "split-pane" [ { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost } ] + Lui_extension.component "split-pane" [ { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = AndroidOS; Lui_protocol.profile_host = KotlinHost } ] false [ "split-tab" ] [ Lui_extension.property "pane-id" Lui_extension.StringScalar true None; Lui_extension.property "selected" Lui_extension.StringScalar false None; Lui_extension.property "focused" Lui_extension.BoolScalar false None; Lui_extension.property "accessibility-identifier" Lui_extension.StringScalar false None ] [ Lui_extension.event "tab-selected" [ Lui_extension.event_field "tab" Lui_extension.StringScalar true ]; Lui_extension.event "tab-closed" [ Lui_extension.event_field "tab" Lui_extension.StringScalar true ]; Lui_extension.event "tab-moved" [ Lui_extension.event_field "tab" Lui_extension.StringScalar true; Lui_extension.event_field "index" Lui_extension.IntScalar true; Lui_extension.event_field "from-pane" Lui_extension.StringScalar true ]; Lui_extension.event "pane-focused" [ ]; Lui_extension.event "navigate" [ Lui_extension.event_field "direction" Lui_extension.StringScalar true ]; Lui_extension.event "split-requested" [ Lui_extension.event_field "orientation" Lui_extension.StringScalar true ]; Lui_extension.event "split-drop" [ Lui_extension.event_field "tab" Lui_extension.StringScalar true; Lui_extension.event_field "from-pane" Lui_extension.StringScalar true; Lui_extension.event_field "edge" Lui_extension.StringScalar true ]; Lui_extension.event "pane-closed" [ ] ] let split_tab_schema = - Lui_extension.component "split-tab" [ { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost } ] + Lui_extension.component "split-tab" [ { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = AndroidOS; Lui_protocol.profile_host = KotlinHost } ] true [ ] [ Lui_extension.property "tab-id" Lui_extension.StringScalar true None; Lui_extension.property "title" Lui_extension.StringScalar true None; Lui_extension.property "icon" Lui_extension.StringScalar false None; Lui_extension.property "dirty" Lui_extension.BoolScalar false None; Lui_extension.property "closable" Lui_extension.BoolScalar false None; Lui_extension.property "accessibility-identifier" Lui_extension.StringScalar false None ] @@ -351,7 +351,7 @@ let gpui_table_schema = [ ] let gallery_accent_schema = - Lui_extension.tweak "gallery-accent" [ { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost } ] + Lui_extension.tweak "gallery-accent" [ { Lui_protocol.profile_os = IOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = SwiftUIHost }; { Lui_protocol.profile_os = WebOS; Lui_protocol.profile_host = WebHost }; { Lui_protocol.profile_os = MacOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = LinuxOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = WindowsOS; Lui_protocol.profile_host = GPUIHost }; { Lui_protocol.profile_os = AndroidOS; Lui_protocol.profile_host = KotlinHost } ] [ ] let registry () = diff --git a/platform/android/build.gradle.kts b/platform/android/build.gradle.kts new file mode 100644 index 00000000..c031eddb --- /dev/null +++ b/platform/android/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + id("com.android.library") version "8.6.1" apply false + id("org.jetbrains.kotlin.android") version "2.0.21" apply false + id("org.jetbrains.kotlin.plugin.compose") version "2.0.21" apply false + id("org.jetbrains.kotlin.plugin.serialization") version "2.0.21" apply false + id("app.cash.paparazzi") version "1.3.5" apply false +} diff --git a/platform/android/gradle.properties b/platform/android/gradle.properties new file mode 100644 index 00000000..0c4dfe0d --- /dev/null +++ b/platform/android/gradle.properties @@ -0,0 +1,6 @@ +org.gradle.jvmargs=-Xmx4g +org.gradle.parallel=true +org.gradle.caching=true +android.useAndroidX=true +android.nonTransitiveRClass=true +kotlin.code.style=official diff --git a/platform/android/gradle/wrapper/gradle-wrapper.jar b/platform/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..a4b76b95 Binary files /dev/null and b/platform/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/platform/android/gradle/wrapper/gradle-wrapper.properties b/platform/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..df97d72b --- /dev/null +++ b/platform/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/platform/android/gradlew b/platform/android/gradlew new file mode 100755 index 00000000..f5feea6d --- /dev/null +++ b/platform/android/gradlew @@ -0,0 +1,252 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/platform/android/gradlew.bat b/platform/android/gradlew.bat new file mode 100644 index 00000000..9b42019c --- /dev/null +++ b/platform/android/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/platform/android/lui/build.gradle.kts b/platform/android/lui/build.gradle.kts new file mode 100644 index 00000000..e4b3eaa9 --- /dev/null +++ b/platform/android/lui/build.gradle.kts @@ -0,0 +1,64 @@ +plugins { + id("com.android.library") + id("org.jetbrains.kotlin.android") + id("org.jetbrains.kotlin.plugin.compose") + id("org.jetbrains.kotlin.plugin.serialization") + id("app.cash.paparazzi") +} + +android { + namespace = "dev.lui" + compileSdk = 35 + + defaultConfig { + minSdk = 24 + + externalNativeBuild { + cmake { + // The OCaml headers/libs come from the host app's CMake + // project; the bridge itself is compiled by the app + // (see examples/components/android). This module ships + // the source only. + } + } + } + + buildFeatures { + compose = true + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlin { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) + } + } + + testOptions { + unitTests.isReturnDefaultValues = true + } + + // The lui_jni_bridge.c source compiles inside the host app (which owns + // the OCaml static libs), so no externalNativeBuild block is set here + // deliberately. +} + +dependencies { + implementation(platform("androidx.compose:compose-bom:2024.10.01")) + implementation("androidx.compose.ui:ui") + implementation("androidx.compose.ui:ui-graphics") + implementation("androidx.compose.ui:ui-tooling-preview") + implementation("androidx.compose.foundation:foundation") + implementation("androidx.compose.material3:material3") + implementation("androidx.compose.material:material-icons-extended") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3") + + debugImplementation("androidx.compose.ui:ui-tooling") + + testImplementation("junit:junit:4.13.2") + testImplementation("app.cash.paparazzi:paparazzi:1.3.5") +} diff --git a/platform/android/lui/src/main/AndroidManifest.xml b/platform/android/lui/src/main/AndroidManifest.xml new file mode 100644 index 00000000..94cbbcfc --- /dev/null +++ b/platform/android/lui/src/main/AndroidManifest.xml @@ -0,0 +1 @@ + diff --git a/platform/android/lui/src/main/cpp/lui_jni_bridge.c b/platform/android/lui/src/main/cpp/lui_jni_bridge.c new file mode 100644 index 00000000..894dd6e4 --- /dev/null +++ b/platform/android/lui/src/main/cpp/lui_jni_bridge.c @@ -0,0 +1,442 @@ +/* JNI bridge between the Kotlin backend and the OCaml LUI runtime. + * + * Ported from platform/flutter/native/lui_ocaml_bridge.c. Each exported + * Java method corresponds to one OCaml-side dispatch entry; the named + * values use the "lui_kotlin_" prefix, which the app registers alongside + * the other host prefixes (see examples/components/native/components_bridge.ml). + * + * Lock discipline (same contract as the Flutter bridge): after start() the + * host thread does NOT hold the OCaml runtime lock between calls, so OCaml + * worker domains keep running (stop-the-world GC included) while the host + * sits in its event loop. Every export re-acquires the lock with + * caml_leave_blocking_section() on the way in and releases it with + * caml_enter_blocking_section() on the way out — including start, whose + * caml_startup leaves the lock held. + * + * Callers must be OCaml-registered threads: the thread that ran + * nativeStart, or one registered via caml_c_thread_register (exposed here + * as nativeThreadRegister). LuiBridge routes every call through its + * dedicated LuiThread to satisfy this. + * + * The patch callback runs while the OCaml domain lock is held. It copies + * the JSON into a Java string and hands it to LuiBridge.dispatchPatch, + * which enqueues to the UI thread — it must not call back into OCaml + * exports from inside the callback. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +static JavaVM *lui_jvm = NULL; +static jmethodID lui_dispatch_patch = NULL; +static int runtime_started = 0; + +#define LUI_JNI_NAME(name) Java_dev_lui_LuiBridge_##name + +JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { + (void)reserved; + JNIEnv *env = NULL; + lui_jvm = vm; + if ((*vm)->GetEnv(vm, (void **)&env, JNI_VERSION_1_6) != JNI_OK) { + return JNI_ERR; + } + jclass bridge = (*env)->FindClass(env, "dev/lui/LuiBridge"); + if (bridge == NULL) { + return JNI_ERR; + } + lui_dispatch_patch = (*env)->GetStaticMethodID( + env, bridge, "dispatchPatch", "(Ljava/lang/String;)V"); + if (lui_dispatch_patch == NULL) { + return JNI_ERR; + } + return JNI_VERSION_1_6; +} + +/* Invoked by OCaml while the runtime lock is held. Copy the JSON out and + * enqueue it; never call back into the exports below from here. */ +static void dispatch_patch_to_jvm(const char *json) { + JNIEnv *env = NULL; + int attached = 0; + jstring value; + if (lui_jvm == NULL || lui_dispatch_patch == NULL || json == NULL) { + return; + } + if ((*lui_jvm)->GetEnv(lui_jvm, (void **)&env, JNI_VERSION_1_6) != JNI_OK) { + if ((*lui_jvm)->AttachCurrentThread(lui_jvm, &env, NULL) != JNI_OK) { + return; + } + attached = 1; + } + value = (*env)->NewStringUTF(env, json); + if (value != NULL) { + jclass bridge = + (*env)->FindClass(env, "dev/lui/LuiBridge"); + if (bridge != NULL) { + (*env)->CallStaticVoidMethod(env, bridge, lui_dispatch_patch, value); + if ((*env)->ExceptionCheck(env)) { + (*env)->ExceptionClear(env); + } + } + (*env)->DeleteLocalRef(env, value); + } + if (attached) { + (*lui_jvm)->DetachCurrentThread(lui_jvm); + } +} + +static int emit_patch(value result) { + if (Is_exception_result(result)) { + return 0; + } + const char *json = String_val(result); + if (json[0] != '\0') { + dispatch_patch_to_jvm(json); + } + return 1; +} + +/* Dispatches a zero-argument named callback under the lock. */ +static int dispatch_unit(const char *callback_name, int64_t node) { + const value *callback = caml_named_value(callback_name); + int accepted = 0; + if (callback == NULL) { + return 0; + } + caml_leave_blocking_section(); + accepted = emit_patch(caml_callback_exn(*callback, Val_long(node))); + caml_enter_blocking_section(); + return accepted; +} + +/* Dispatches a (node, string) named callback under the lock. The string is + * passed as an explicit byte length so embedded NULs survive. */ +static int dispatch_string( + const char *callback_name, + JNIEnv *env, + int64_t node, + jstring text) { + CAMLparam0(); + CAMLlocal2(text_value, result); + int accepted = 0; + const value *callback = caml_named_value(callback_name); + const char *bytes; + jsize length; + if (callback == NULL || text == NULL) { + CAMLreturnT(int, 0); + } + bytes = (*env)->GetStringUTFChars(env, text, NULL); + if (bytes == NULL) { + CAMLreturnT(int, 0); + } + length = (*env)->GetStringUTFLength(env, text); + caml_leave_blocking_section(); + text_value = caml_alloc_initialized_string((intnat)length, bytes); + (*env)->ReleaseStringUTFChars(env, text, bytes); + result = caml_callback2_exn(*callback, Val_long(node), text_value); + accepted = emit_patch(result); + caml_enter_blocking_section(); + CAMLreturnT(int, accepted); +} + +/* Dispatches a pointer event under the lock. The OCaml callback receives + * (node, x, y, modifiers, button, target_class) — six arguments, matching + * the registered lui_kotlin_* entry points in components_bridge.ml. */ +static int dispatch_pointer( + const char *callback_name, + JNIEnv *env, + int64_t node, + jdouble x, + jdouble y, + jint modifiers, + jint button, + jstring target_class) { + CAMLparam0(); + CAMLlocal4(x_value, y_value, class_value, result); + int accepted = 0; + const value *callback = caml_named_value(callback_name); + const char *class_bytes; + value arguments[6]; + if (callback == NULL) { + CAMLreturnT(int, 0); + } + class_bytes = + target_class == NULL ? NULL : (*env)->GetStringUTFChars(env, target_class, NULL); + caml_leave_blocking_section(); + x_value = caml_copy_double(x); + y_value = caml_copy_double(y); + class_value = caml_copy_string(class_bytes == NULL ? "" : class_bytes); + if (class_bytes != NULL) { + (*env)->ReleaseStringUTFChars(env, target_class, class_bytes); + } + arguments[0] = Val_long(node); + arguments[1] = x_value; + arguments[2] = y_value; + arguments[3] = Val_long(modifiers); + arguments[4] = Val_long(button); + arguments[5] = class_value; + result = caml_callbackN_exn(*callback, 6, arguments); + accepted = emit_patch(result); + caml_enter_blocking_section(); + CAMLreturnT(int, accepted); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeStart)( + JNIEnv *env, + jclass clazz, + jint platform_code, + jint host_code) { + int32_t accepted = 0; + (void)env; + (void)clazz; + if (!runtime_started) { + char *arguments[] = {"lui_kotlin", NULL}; + caml_startup(arguments); + runtime_started = 1; + } else { + caml_leave_blocking_section(); + } + + const value *initialize = caml_named_value("lui_kotlin_init"); + if (initialize != NULL) { + accepted = emit_patch(caml_callback2_exn( + *initialize, + Val_long(platform_code), + Val_long(host_code))); + } + caml_enter_blocking_section(); + return accepted; +} + +/* Registers the calling thread with the OCaml runtime so it can invoke the + * exports below. The caller must have previously released the runtime lock + * (any thread other than the one that ran nativeStart is fine). */ +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeThreadRegister)( + JNIEnv *env, + jclass clazz) { + (void)env; + (void)clazz; + return caml_c_thread_register() == 1 ? 1 : 0; +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeAppear)( + JNIEnv *env, jclass clazz, jlong node) { + (void)env; (void)clazz; + return dispatch_unit("lui_kotlin_appear", node); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativePress)( + JNIEnv *env, jclass clazz, jlong node) { + (void)env; (void)clazz; + return dispatch_unit("lui_kotlin_press", node); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeLongPress)( + JNIEnv *env, jclass clazz, jlong node) { + (void)env; (void)clazz; + return dispatch_unit("lui_kotlin_long_press", node); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeTextChanged)( + JNIEnv *env, jclass clazz, jlong node, jstring text) { + (void)clazz; + return dispatch_string("lui_kotlin_text_changed", env, node, text); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeSubmit)( + JNIEnv *env, jclass clazz, jlong node) { + (void)env; (void)clazz; + return dispatch_unit("lui_kotlin_submit", node); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeDismiss)( + JNIEnv *env, jclass clazz, jlong node) { + (void)env; (void)clazz; + return dispatch_unit("lui_kotlin_dismiss", node); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativePicked)( + JNIEnv *env, jclass clazz, jlong node, jstring payload) { + (void)clazz; + return dispatch_string("lui_kotlin_picked", env, node, payload); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeDoublePress)( + JNIEnv *env, jclass clazz, jlong node) { + (void)env; (void)clazz; + return dispatch_unit("lui_kotlin_double_press", node); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeToggleChanged)( + JNIEnv *env, jclass clazz, jlong node, jint checked) { + CAMLparam0(); + CAMLlocal1(result); + int32_t accepted = 0; + const value *dispatch = caml_named_value("lui_kotlin_toggle_changed"); + (void)env; (void)clazz; + if (dispatch == NULL) { + CAMLreturnT(jint, 0); + } + caml_leave_blocking_section(); + result = caml_callback2_exn( + *dispatch, Val_long(node), Val_bool(checked != 0)); + accepted = emit_patch(result); + caml_enter_blocking_section(); + CAMLreturnT(jint, accepted); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeRadioChanged)( + JNIEnv *env, jclass clazz, jlong node) { + (void)env; (void)clazz; + return dispatch_unit("lui_kotlin_radio_changed", node); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeSliderChanged)( + JNIEnv *env, jclass clazz, jlong node, jdouble fraction) { + CAMLparam0(); + CAMLlocal2(value_value, result); + int32_t accepted = 0; + const value *dispatch = caml_named_value("lui_kotlin_slider_changed"); + (void)env; (void)clazz; + if (dispatch == NULL) { + CAMLreturnT(jint, 0); + } + caml_leave_blocking_section(); + value_value = caml_copy_double(fraction); + result = caml_callback2_exn(*dispatch, Val_long(node), value_value); + accepted = emit_patch(result); + caml_enter_blocking_section(); + CAMLreturnT(jint, accepted); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativePressDetail)( + JNIEnv *env, jclass clazz, jlong node, jdouble x, jdouble y, + jint modifiers, jint button, jstring target_class) { + (void)clazz; + return dispatch_pointer( + "lui_kotlin_press_detail", env, node, x, y, modifiers, button, target_class); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativePointerDown)( + JNIEnv *env, jclass clazz, jlong node, jdouble x, jdouble y, + jint modifiers, jint button, jstring target_class) { + (void)clazz; + return dispatch_pointer( + "lui_kotlin_pointer_down", env, node, x, y, modifiers, button, target_class); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativePointerUp)( + JNIEnv *env, jclass clazz, jlong node, jdouble x, jdouble y, + jint modifiers, jint button, jstring target_class) { + (void)clazz; + return dispatch_pointer( + "lui_kotlin_pointer_up", env, node, x, y, modifiers, button, target_class); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativePointerEnter)( + JNIEnv *env, jclass clazz, jlong node) { + (void)env; (void)clazz; + return dispatch_unit("lui_kotlin_pointer_enter", node); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativePointerLeave)( + JNIEnv *env, jclass clazz, jlong node) { + (void)env; (void)clazz; + return dispatch_unit("lui_kotlin_pointer_leave", node); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeContextMenuPress)( + JNIEnv *env, jclass clazz, jlong node, jdouble x, jdouble y, + jint modifiers, jint button, jstring target_class) { + (void)clazz; + return dispatch_pointer( + "lui_kotlin_context_menu_press", env, node, x, y, modifiers, button, target_class); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeExtensionEvent)( + JNIEnv *env, + jclass clazz, + jlong node, + jstring identifier, + jstring name, + jstring json_values) { + CAMLparam0(); + CAMLlocal4(identifier_value, name_value, values_value, result); + int32_t accepted = 0; + const value *dispatch = caml_named_value("lui_kotlin_extension_event"); + const char *identifier_bytes; + const char *name_bytes; + const char *values_bytes; + value arguments[4]; + (void)clazz; + if (dispatch == NULL || identifier == NULL || name == NULL) { + CAMLreturnT(jint, 0); + } + identifier_bytes = (*env)->GetStringUTFChars(env, identifier, NULL); + name_bytes = (*env)->GetStringUTFChars(env, name, NULL); + values_bytes = + json_values == NULL ? NULL : (*env)->GetStringUTFChars(env, json_values, NULL); + if (identifier_bytes == NULL || name_bytes == NULL) { + if (identifier_bytes != NULL) { + (*env)->ReleaseStringUTFChars(env, identifier, identifier_bytes); + } + if (name_bytes != NULL) { + (*env)->ReleaseStringUTFChars(env, name, name_bytes); + } + if (values_bytes != NULL) { + (*env)->ReleaseStringUTFChars(env, json_values, values_bytes); + } + CAMLreturnT(jint, 0); + } + caml_leave_blocking_section(); + identifier_value = caml_copy_string(identifier_bytes); + name_value = caml_copy_string(name_bytes); + values_value = caml_copy_string(values_bytes == NULL ? "" : values_bytes); + (*env)->ReleaseStringUTFChars(env, identifier, identifier_bytes); + (*env)->ReleaseStringUTFChars(env, name, name_bytes); + if (values_bytes != NULL) { + (*env)->ReleaseStringUTFChars(env, json_values, values_bytes); + } + arguments[0] = Val_long(node); + arguments[1] = identifier_value; + arguments[2] = name_value; + arguments[3] = values_value; + result = caml_callbackN_exn(*dispatch, 4, arguments); + accepted = emit_patch(result); + caml_enter_blocking_section(); + CAMLreturnT(jint, accepted); +} + +JNIEXPORT jint JNICALL LUI_JNI_NAME(nativeStop)(JNIEnv *env, jclass clazz) { + const value *dispose = caml_named_value("lui_kotlin_dispose"); + int32_t accepted = 0; + (void)env; (void)clazz; + if (dispose == NULL) { + return 0; + } + caml_leave_blocking_section(); + accepted = emit_patch(caml_callback_exn(*dispose, Val_unit)); + caml_enter_blocking_section(); + return accepted; +} + +JNIEXPORT jlong JNICALL LUI_JNI_NAME(nativeRootNode)(JNIEnv *env, jclass clazz) { + const value *callback = caml_named_value("lui_kotlin_root_node"); + value result; + int64_t node; + (void)env; (void)clazz; + if (callback == NULL) { + return -1; + } + caml_leave_blocking_section(); + result = caml_callback_exn(*callback, Val_unit); + node = Is_exception_result(result) ? -1 : Long_val(result); + caml_enter_blocking_section(); + return node; +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiBackend.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiBackend.kt new file mode 100644 index 00000000..c02046a8 --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiBackend.kt @@ -0,0 +1,113 @@ +package dev.lui + +import android.graphics.BitmapFactory +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateMapOf +import androidx.compose.runtime.setValue +import androidx.compose.ui.graphics.ImageBitmap +import androidx.compose.ui.graphics.asImageBitmap + +/** + * Public entry point of the Kotlin/LUI backend: owns the retained tree, + * the extension registry, host-registered images, the icon resolver, and + * the event handler that forwards user events to the bridge. + * + * Typical use: + * ``` + * val backend = LuiBackend(onEvent = { it.dispatchToBridge() }) + * backend.applyJson(patchJson) + * setContent { backend.Content(rootId) } + * ``` + */ +class LuiBackend( + val onEvent: (LuiEvent) -> Unit = {}, + val extensions: LuiExtensionRegistry = LuiExtensionRegistry(), + val icons: LuiIconResolver = LuiIconResolver.DEFAULT, +) { + internal val tree = LuiRetainedTree(extensions) + + /** Bump on every applied batch so composables recompose. */ + internal var revision by mutableIntStateOf(0) + private set + + /** Host-registered raster images, keyed by the `image` prop id. */ + internal val images = mutableStateMapOf() + + /** Host-presented media frames, keyed by the `surface` prop id. */ + internal val mediaSurfaces = mutableStateMapOf() + + /** Resolver hook for `file-image` paths (e.g. remap asset paths). */ + var filePathResolver: ((String) -> String)? = null + + internal var lastError: String? = null + private set + + fun node(id: Long): LuiNode? = tree.nodes[id] + fun extensionNode(id: Long): LuiExtensionNode? = tree.extensionNodes[id] + + /** Apply one JSON patch batch. Returns false (state untouched) when the + * batch fails validation — mirrors the other backends' reject semantics. */ + fun applyJson(source: String?): Boolean { + if (source.isNullOrEmpty()) return false + return try { + tree.apply(LuiPatchBatch.parse(source)) + revision++ + lastError = null + true + } catch (error: LuiBackendException) { + lastError = error.message + false + } + } + + /** Alias of [applyJson] kept for internal callers. */ + fun applyBatch(source: String): Boolean = applyJson(source) + + fun emit(event: LuiEvent) = onEvent(event) + + internal fun emitExtensionEvent( + node: Long, + identifier: String, + name: String, + values: Map, + ) = emit(LuiEvent.Extension(node, identifier, name, values)) + + fun registerImage(id: Int, image: ImageBitmap) { + require(id > 0) { "registered image id must be positive" } + images[id] = image + } + + fun unregisterImage(id: Int) { + images.remove(id) + } + + fun presentMediaSurfaceFrame(id: Int, image: ImageBitmap) { + require(id > 0) { "media surface id must be positive" } + mediaSurfaces[id] = image + } + + fun unregisterMediaSurface(id: Int) { + mediaSurfaces.remove(id) + } + + /** + * Renders a node of the retained tree inside the ambient LuiTheme. + * Pass the id the bridge reports via `rootNode()`; a negative id + * renders every current root. + */ + @Composable + fun Content(rootId: Long = -1L) { + // Read the revision so this composable recomposes on each batch. + val applied = revision + if (applied == 0) return + if (rootId >= 0) { + LuiNodeView(backend = this, id = rootId) + return + } + for (id in tree.rootIds) { + LuiNodeView(backend = this, id = id) + } + } +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiBridge.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiBridge.kt new file mode 100644 index 00000000..c8a560ca --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiBridge.kt @@ -0,0 +1,303 @@ +package dev.lui + +import android.os.Handler +import android.os.HandlerThread +import android.os.Looper +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import java.util.concurrent.atomic.AtomicReference + +/** + * JNI bridge to the OCaml LUI runtime, porting the semantics of + * `platform/flutter/native/lui_ocaml_bridge.c` for Android. + * + * Threading contract (mirrors the C header's lock discipline): after + * [start], the OCaml runtime lock is NOT held between calls, so all + * `native*` exports must be invoked on an OCaml-registered thread. This + * object owns a dedicated [HandlerThread] (`lui-ocaml`) that runs + * [nativeStart] once; every event method then enqueues on that thread so + * ordering is preserved and callers never touch the runtime lock. + * + * Patch delivery: the OCaml callbacks return the pending patch batch as a + * JSON string while the domain lock is held; [dispatchPatch] copies it + * into the JVM and posts to the main thread — it must not call back into + * native exports from inside that callback. + */ +object LuiBridge { + /** platform_code for `operating_system` in components_bridge.ml. */ + const val PLATFORM_ANDROID: Int = 3 + + /** host_code for KotlinHost in components_bridge.ml. */ + const val HOST_KOTLIN: Int = 4 + + fun interface PatchSink { + fun onPatch(json: String) + } + + private val ocamlThread = HandlerThread("lui-ocaml").apply { start() } + private val ocamlHandler = Handler(ocamlThread.looper) + private val mainHandler = Handler(Looper.getMainLooper()) + + @Volatile + private var patchSink: PatchSink? = null + + @Volatile + private var started = false + + /** + * Called from JNI while the OCaml domain lock is held. Only copies the + * string into the JVM and enqueues delivery on the main thread — never + * call back into native exports from here. + */ + @JvmStatic + @Suppress("unused") + private fun dispatchPatch(json: String) { + val sink = patchSink ?: return + mainHandler.post { sink.onPatch(json) } + } + + /** + * Loads the OCaml runtime library and starts the app, delivering patch + * batches to [sink] on the main thread. Blocks until `nativeStart` + * returns. Call once per process. + */ + fun start(libraryName: String, hostCode: Int = HOST_KOTLIN, sink: PatchSink): Boolean { + if (started) return true + patchSink = sink + System.loadLibrary(libraryName) + val result = AtomicReference() + val latch = CountDownLatch(1) + ocamlHandler.post { + result.set(nativeStart(PLATFORM_ANDROID, hostCode)) + latch.countDown() + } + latch.await(30, TimeUnit.SECONDS) + started = true + return result.get() != 0 + } + + private inline fun dispatch(crossinline call: () -> Int) { + check(started) { "LuiBridge.start() has not been called" } + ocamlHandler.post { call() } + } + + /** Synchronous dispatch for calls that must return a value. */ + private inline fun dispatchBlocking(crossinline call: () -> T): T { + check(started) { "LuiBridge.start() has not been called" } + val result = AtomicReference() + val latch = CountDownLatch(1) + ocamlHandler.post { + result.set(call()) + latch.countDown() + } + latch.await(10, TimeUnit.SECONDS) + return result.get() + } + + fun appear(node: Long) = dispatch { nativeAppear(node) } + + fun press(node: Long) = dispatch { nativePress(node) } + + fun longPress(node: Long) = dispatch { nativeLongPress(node) } + + fun textChanged(node: Long, text: String) = dispatch { + nativeTextChanged(node, text) + } + + fun submit(node: Long) = dispatch { nativeSubmit(node) } + + fun dismiss(node: Long) = dispatch { nativeDismiss(node) } + + fun picked(node: Long, payload: String) = dispatch { + nativePicked(node, payload) + } + + fun doublePress(node: Long) = dispatch { nativeDoublePress(node) } + + fun toggleChanged(node: Long, checked: Boolean) = dispatch { + nativeToggleChanged(node, if (checked) 1 else 0) + } + + fun radioChanged(node: Long) = dispatch { nativeRadioChanged(node) } + + fun sliderChanged(node: Long, fraction: Double) = dispatch { + nativeSliderChanged(node, fraction) + } + + fun pressDetail(node: Long, detail: LuiPointerDetail) = dispatch { + nativePressDetail( + node, detail.x, detail.y, + detail.modifiers, detail.button, detail.targetClass, + ) + } + + fun pointerDown(node: Long, detail: LuiPointerDetail) = dispatch { + nativePointerDown( + node, detail.x, detail.y, + detail.modifiers, detail.button, detail.targetClass, + ) + } + + fun pointerUp(node: Long, detail: LuiPointerDetail) = dispatch { + nativePointerUp( + node, detail.x, detail.y, + detail.modifiers, detail.button, detail.targetClass, + ) + } + + fun pointerEnter(node: Long) = dispatch { nativePointerEnter(node) } + + fun pointerLeave(node: Long) = dispatch { nativePointerLeave(node) } + + fun contextMenuPress(node: Long, detail: LuiPointerDetail) = dispatch { + nativeContextMenuPress( + node, detail.x, detail.y, + detail.modifiers, detail.button, detail.targetClass, + ) + } + + fun extensionEvent( + node: Long, + identifier: String, + name: String, + jsonValues: String, + ) = dispatch { + nativeExtensionEvent(node, identifier, name, jsonValues) + } + + fun stop() = dispatch { nativeStop() } + + /** Root node id of the running app, or -1 when unavailable. */ + fun rootNode(): Long = dispatchBlocking { nativeRootNode() } + + // ------------------------------------------------------------------ + // JNI exports — see src/main/cpp/lui_jni_bridge.c. Always invoked on + // the `lui-ocaml` thread via the dispatch helpers above. + // ------------------------------------------------------------------ + + private external fun nativeStart(platformCode: Int, hostCode: Int): Int + + private external fun nativeAppear(node: Long): Int + + private external fun nativePress(node: Long): Int + + private external fun nativeLongPress(node: Long): Int + + private external fun nativeTextChanged(node: Long, text: String): Int + + private external fun nativeSubmit(node: Long): Int + + private external fun nativeDismiss(node: Long): Int + + private external fun nativePicked(node: Long, payload: String): Int + + private external fun nativeDoublePress(node: Long): Int + + private external fun nativeToggleChanged(node: Long, checked: Int): Int + + private external fun nativeRadioChanged(node: Long): Int + + private external fun nativeSliderChanged(node: Long, fraction: Double): Int + + private external fun nativePressDetail( + node: Long, + x: Double, + y: Double, + modifiers: Int, + button: Int, + targetClass: String, + ): Int + + private external fun nativePointerDown( + node: Long, + x: Double, + y: Double, + modifiers: Int, + button: Int, + targetClass: String, + ): Int + + private external fun nativePointerUp( + node: Long, + x: Double, + y: Double, + modifiers: Int, + button: Int, + targetClass: String, + ): Int + + private external fun nativePointerEnter(node: Long): Int + + private external fun nativePointerLeave(node: Long): Int + + private external fun nativeContextMenuPress( + node: Long, + x: Double, + y: Double, + modifiers: Int, + button: Int, + targetClass: String, + ): Int + + private external fun nativeExtensionEvent( + node: Long, + identifier: String, + name: String, + jsonValues: String, + ): Int + + private external fun nativeStop(): Int + + private external fun nativeRootNode(): Long +} + +/** + * Maps a [LuiEvent] onto the [LuiBridge] JNI calls — the default event + * sink for a [LuiBackend] wired to the OCaml runtime. + */ +fun LuiEvent.dispatchToBridge() { + val bridge = LuiBridge + when (this) { + is LuiEvent.Press -> bridge.press(node) + is LuiEvent.LongPress -> bridge.longPress(node) + is LuiEvent.TextChanged -> bridge.textChanged(node, text) + is LuiEvent.Submit -> bridge.submit(node) + is LuiEvent.ToggleChanged -> bridge.toggleChanged(node, checked) + is LuiEvent.Change -> bridge.radioChanged(node) + is LuiEvent.ValueChanged -> bridge.sliderChanged(node, value) + is LuiEvent.Dismiss -> bridge.dismiss(node) + is LuiEvent.DoublePress -> bridge.doublePress(node) + is LuiEvent.Appear -> bridge.appear(node) + is LuiEvent.Picked -> bridge.picked(node, payload) + is LuiEvent.PressDetail -> bridge.pressDetail(node, detail) + is LuiEvent.PointerDown -> bridge.pointerDown(node, detail) + is LuiEvent.PointerUp -> bridge.pointerUp(node, detail) + is LuiEvent.PointerEnter -> bridge.pointerEnter(node) + is LuiEvent.PointerLeave -> bridge.pointerLeave(node) + is LuiEvent.ContextMenuPress -> bridge.contextMenuPress(node, detail) + is LuiEvent.Extension -> bridge.extensionEvent( + node, identifier, name, + values.entries.joinToString( + prefix = "{", postfix = "}", + separator = ",", + ) { (key, value) -> "\"$key\":${luiScalarLiteral(value)}" }, + ) + // Events the mobile bridge has no dedicated export for; the OCaml + // side handles them through other paths or ignores them. + is LuiEvent.PressModifiers, + is LuiEvent.ScrollCompleted, + is LuiEvent.VisibleRange, + is LuiEvent.Load, + -> Unit + } +} + +/** Serializes one extension-event scalar (String/Number/Boolean/null) to + * its JSON literal. */ +private fun luiScalarLiteral(value: Any?): String = when (value) { + null -> "null" + is String -> kotlinx.serialization.json.JsonPrimitive(value).toString() + is Number -> value.toString() + is Boolean -> value.toString() + else -> "null" +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiEvents.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiEvents.kt new file mode 100644 index 00000000..5cfa23db --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiEvents.kt @@ -0,0 +1,58 @@ +package dev.lui + +/** Pointer-level payload shared by press-detail/pointer events; matches the + * OCaml `pointer_detail` record. On gestures that expose no hit position the + * host emits zero coordinates — never invented values. */ +data class LuiPointerDetail( + val x: Double = 0.0, + val y: Double = 0.0, + val modifiers: Int = 0, + val button: Int = 0, + val targetClass: String = "", +) + +/** Events sent from the platform backend toward OCaml. Node ids are the + * wire int64 values. */ +sealed class LuiEvent { + abstract val node: Long + + data class Appear(override val node: Long) : LuiEvent() + data class Press(override val node: Long) : LuiEvent() + data class LongPress(override val node: Long) : LuiEvent() + data class DoublePress(override val node: Long) : LuiEvent() + data class Change(override val node: Long) : LuiEvent() + data class Submit(override val node: Long) : LuiEvent() + data class Dismiss(override val node: Long) : LuiEvent() + data class TextChanged(override val node: Long, val text: String) : LuiEvent() + data class ToggleChanged(override val node: Long, val checked: Boolean) : LuiEvent() + data class ValueChanged(override val node: Long, val value: Double) : LuiEvent() + data class Picked(override val node: Long, val payload: String) : LuiEvent() + data class VisibleRange(override val node: Long, val first: Long, val last: Long) : LuiEvent() + data class ScrollCompleted( + override val node: Long, + val token: Long, + val outcome: String, + ) : LuiEvent() + + data class PressModifiers(override val node: Long, val modifiers: Int) : LuiEvent() + data class PressDetail(override val node: Long, val detail: LuiPointerDetail) : LuiEvent() + data class PointerDown(override val node: Long, val detail: LuiPointerDetail) : LuiEvent() + data class PointerUp(override val node: Long, val detail: LuiPointerDetail) : LuiEvent() + data class PointerEnter(override val node: Long) : LuiEvent() + data class PointerLeave(override val node: Long) : LuiEvent() + data class ContextMenuPress(override val node: Long, val detail: LuiPointerDetail) : LuiEvent() + data class Load(override val node: Long) : LuiEvent() + + /** `values` is a flat object of scalar values (String/Number/Boolean/null) + * validated OCaml-side against the extension's declared event schema. */ + data class Extension( + override val node: Long, + val identifier: String, + val name: String, + val values: Map, + ) : LuiEvent() +} + +fun interface LuiEventSink { + fun onEvent(event: LuiEvent) +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiExtension.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiExtension.kt new file mode 100644 index 00000000..ac2804be --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiExtension.kt @@ -0,0 +1,195 @@ +package dev.lui + +import androidx.compose.runtime.Composable + +enum class LuiExtensionValueKind { + STRING, + BOOLEAN, + INTEGER, + DOUBLE, + ; + + fun accepts(value: LuiWireValue): Boolean = when (this) { + STRING -> value is LuiWireValue.Str + BOOLEAN -> value is LuiWireValue.Bool + INTEGER -> value is LuiWireValue.IntValue + DOUBLE -> value.doubleValue?.isFinite() == true + } + + fun normalize(value: LuiWireValue): LuiWireValue = + if (this == DOUBLE && value is LuiWireValue.IntValue) { + LuiWireValue.DoubleValue(value.value.toDouble()) + } else { + value + } +} + +class LuiExtensionProperty( + val name: String, + val kind: LuiExtensionValueKind, + val required: Boolean = false, + val defaultValue: LuiWireValue? = null, +) + +class LuiExtensionEventSchema( + val name: String = "", + val fields: List = emptyList(), +) + +/** View-model passed to extension composable builders. */ +class LuiExtensionContext internal constructor( + internal val backend: LuiBackend, + val nodeId: Long, + val identifier: String, + val properties: Map, + val children: List = emptyList(), + internal val renderChild: @Composable (Long) -> Unit, +) { + fun string(name: String): String? = properties[name]?.stringValue + fun bool(name: String): Boolean? = properties[name]?.boolValue + fun int(name: String): Int? = properties[name]?.intValue + fun double(name: String): Double? = properties[name]?.doubleValue + + /** Boolean prop that defaults to false when unset. */ + fun flag(name: String): Boolean = bool(name) ?: false + + /** Property as an untyped scalar (String/Int/Double/Boolean). */ + @Suppress("UNCHECKED_CAST") + fun property(name: String): T? = properties[name]?.scalarValue as? T + + fun emitEvent(name: String, values: Map = emptyMap()) { + backend.emitExtensionEvent( + nodeId, + identifier, + name, + values.mapValues { it.value.scalarValue }, + ) + } + + fun emit(name: String, values: Map) { + backend.emitExtensionEvent(nodeId, identifier, name, values) + } + + fun emit(name: String, vararg values: Pair) = + emit(name, values.toMap()) + + /** The extension node behind a declared-child id, if it is one. */ + fun extensionChild(id: Long): LuiExtensionNode? = backend.extensionNode(id) + + @Composable + fun child(id: Long) = renderChild(id) + + /** Renders every standard child in order. */ + @Composable + fun Children() { + children.forEach { child(it) } + } +} + +class LuiExtensionRegistration internal constructor( + val identifier: String, + val fingerprint: String, + val builder: (@Composable LuiExtensionContext.() -> Unit)?, + val acceptsStandardChildren: Boolean = false, + val childIdentifiers: List = emptyList(), + val properties: List = emptyList(), + val events: List = emptyList(), + val isTweak: Boolean = false, +) { + internal fun defaultProperties(): MutableMap { + val map = mutableMapOf() + for (property in properties) { + property.defaultValue?.let { map[property.name] = property.kind.normalize(it) } + } + return map + } +} + +/** + * Host registry for extension components and tweaks, mirroring + * `LUIFlutterExtensionRegistry`. A registration binds an identifier to a + * Composable builder plus the declared prop/event schema used to validate + * `create-extension`/`set-extension-prop` ops on the wire. + */ +class LuiExtensionRegistry { + private val registrations = mutableMapOf() + private var frozen = false + + fun register(registration: LuiExtensionRegistration) { + check(!frozen) { "extension registry is frozen" } + require(isValidExtensionName(registration.identifier)) { + "invalid extension identifier" + } + require(!isStandardNodeName(registration.identifier)) { + "extension identifier shadows a standard node" + } + require(!registrations.containsKey(registration.identifier)) { + "extension identifier is already registered" + } + registrations[registration.identifier] = registration + } + + /** Convenience for component extensions. */ + fun register( + identifier: String, + fingerprint: String, + acceptsStandardChildren: Boolean = false, + childIdentifiers: List = emptyList(), + properties: List = emptyList(), + events: List = emptyList(), + builder: @Composable LuiExtensionContext.() -> Unit, + ) = register( + LuiExtensionRegistration( + identifier = identifier, + fingerprint = fingerprint, + builder = builder, + acceptsStandardChildren = acceptsStandardChildren, + childIdentifiers = childIdentifiers, + properties = properties, + events = events, + ), + ) + + /** Minimal registration: `register("id", fingerprint) { context -> ... }`. */ + fun register( + identifier: String, + fingerprint: String, + builder: @Composable (LuiExtensionContext) -> Unit, + ) = register( + LuiExtensionRegistration( + identifier = identifier, + fingerprint = fingerprint, + builder = { builder(this) }, + ), + ) + + /** A tweak wraps exactly one child with platform-specific styling. */ + fun registerTweak( + identifier: String, + fingerprint: String, + properties: List = emptyList(), + builder: (@Composable LuiExtensionContext.() -> Unit)?, + ) = register( + LuiExtensionRegistration( + identifier = identifier, + fingerprint = fingerprint, + builder = builder, + acceptsStandardChildren = true, + properties = properties, + isTweak = true, + ), + ) + + internal fun freeze() { + frozen = true + } + + fun registration(identifier: String): LuiExtensionRegistration? = registrations[identifier] + + fun isStandardNodeName(name: String): Boolean = LuiNodeKind.fromWire(name) != null + + private fun isValidExtensionName(name: String): Boolean = + name.isNotEmpty() && + name.all { it in 'a'..'z' || it in '0'..'9' || it == '-' || it == '_' } && + name.first() in 'a'..'z' +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiIcons.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiIcons.kt new file mode 100644 index 00000000..41a2da00 --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiIcons.kt @@ -0,0 +1,118 @@ +package dev.lui + +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.ArrowBack +import androidx.compose.material.icons.automirrored.filled.ArrowForward +import androidx.compose.material.icons.automirrored.filled.CallMerge +import androidx.compose.material.icons.automirrored.filled.HelpOutline +import androidx.compose.material.icons.automirrored.filled.KeyboardArrowLeft +import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight +import androidx.compose.material.icons.automirrored.filled.Send +import androidx.compose.material.icons.automirrored.filled.Undo +import androidx.compose.material.icons.filled.* +import androidx.compose.ui.graphics.vector.ImageVector + +/** + * Resolves the wire `icon` prop (a symbolic name such as "send" or + * "chevron-right") to an ImageVector. Apps chain their own resolver in + * front of [DEFAULT] via [or] — the backend resolver returns null for + * names it doesn't own (e.g. `app:`-prefixed app icons) so they fall + * through to the next resolver. + */ +fun interface LuiIconResolver { + fun icon(name: String): ImageVector? + + fun or(other: LuiIconResolver): LuiIconResolver = LuiIconResolver { name -> + icon(name) ?: other.icon(name) + } + + companion object { + val DEFAULT = LuiIconResolver { name -> defaultIcons[name] } + + private val defaultIcons: Map = mapOf( + "add" to Icons.Filled.Add, + "add-circle" to Icons.Filled.AddCircle, + "alert" to Icons.Filled.Warning, + "arrow-back" to Icons.AutoMirrored.Filled.ArrowBack, + "arrow-down" to Icons.Filled.ArrowDropDown, + "arrow-forward" to Icons.AutoMirrored.Filled.ArrowForward, + "arrow-left" to Icons.AutoMirrored.Filled.ArrowBack, + "arrow-right" to Icons.AutoMirrored.Filled.ArrowForward, + "arrow-up" to Icons.Filled.KeyboardArrowUp, + "attach-file" to Icons.Filled.Add, + "audio-lines" to Icons.Filled.Star, + "audio-waveform" to Icons.Filled.Star, + "bell" to Icons.Filled.Notifications, + "bold" to Icons.Filled.Edit, + "bookmark" to Icons.Filled.Bookmark, + "brush" to Icons.Filled.Edit, + "calendar" to Icons.Filled.DateRange, + "camera" to Icons.Filled.Add, + "check" to Icons.Filled.Check, + "check-circle" to Icons.Filled.CheckCircle, + "chevron-down" to Icons.Filled.KeyboardArrowDown, + "chevron-left" to Icons.AutoMirrored.Filled.KeyboardArrowLeft, + "chevron-right" to Icons.AutoMirrored.Filled.KeyboardArrowRight, + "chevron-up" to Icons.Filled.KeyboardArrowUp, + "clock" to Icons.Filled.Star, + "close" to Icons.Filled.Close, + "cloud" to Icons.Filled.Star, + "code" to Icons.Filled.Edit, + "copy" to Icons.Filled.Add, + "dice" to Icons.Filled.Star, + "dots" to Icons.Filled.MoreVert, + "download" to Icons.Filled.Share, + "edit" to Icons.Filled.Edit, + "external-link" to Icons.Filled.Share, + "eye" to Icons.Filled.Star, + "file" to Icons.Filled.Add, + "flag" to Icons.Filled.Star, + "folder" to Icons.Filled.Star, + "hash" to Icons.Filled.Tag, + "heading" to Icons.Filled.Edit, + "help" to Icons.AutoMirrored.Filled.HelpOutline, + "history" to Icons.Filled.Star, + "home" to Icons.Filled.Home, + "image" to Icons.Filled.Star, + "info" to Icons.Filled.Info, + "italic" to Icons.Filled.Edit, + "link" to Icons.Filled.Share, + "list" to Icons.Filled.List, + "loader" to Icons.Filled.Refresh, + "lock" to Icons.Filled.Lock, + "logout" to Icons.Filled.ExitToApp, + "menu" to Icons.Filled.Menu, + "merge" to Icons.AutoMirrored.Filled.CallMerge, + "message" to Icons.Filled.Email, + "mic" to Icons.Filled.Edit, + "minus" to Icons.Filled.Clear, + "more-horizontal" to Icons.Filled.MoreVert, + "more-vertical" to Icons.Filled.MoreVert, + "paperclip" to Icons.Filled.Add, + "pause" to Icons.Filled.Star, + "pencil" to Icons.Filled.Edit, + "play" to Icons.Filled.PlayArrow, + "plus" to Icons.Filled.Add, + "refresh" to Icons.Filled.Refresh, + "search" to Icons.Filled.Search, + "send" to Icons.AutoMirrored.Filled.Send, + "settings" to Icons.Filled.Settings, + "share" to Icons.Filled.Share, + "sparkles" to Icons.Filled.Star, + "star" to Icons.Filled.Star, + "stop" to Icons.Filled.Close, + "sync" to Icons.Filled.Refresh, + "table" to Icons.Filled.List, + "tag" to Icons.Filled.Tag, + "task" to Icons.Filled.CheckCircle, + "trash" to Icons.Filled.Delete, + "undo" to Icons.AutoMirrored.Filled.Undo, + "upload" to Icons.Filled.Share, + "user" to Icons.Filled.Person, + "video" to Icons.Filled.PlayArrow, + "warning" to Icons.Filled.Warning, + "wifi" to Icons.Filled.Star, + "x" to Icons.Filled.Close, + ) + } +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiKindRules.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiKindRules.kt new file mode 100644 index 00000000..6d22c3c7 --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiKindRules.kt @@ -0,0 +1,746 @@ +package dev.lui + +/** Kind-predicate helpers and the set-prop admissibility matrix, ported from + * the Flutter backend's `_supports` so all backends accept/reject the same + * wire. */ +internal object LuiKindRules { + + val modalSurfaceKinds = setOf(LuiNodeKind.dialog, LuiNodeKind.sheet) + + val overlaySurfaceKinds = setOf( + LuiNodeKind.panel, + LuiNodeKind.card, + LuiNodeKind.alert, + LuiNodeKind.bubble, + LuiNodeKind.resizable, + ) + + fun isModalSurface(kind: LuiNodeKind): Boolean = kind in modalSurfaceKinds + + fun isOverlaySurface(kind: LuiNodeKind): Boolean = kind in overlaySurfaceKinds + + fun isButtonKind(kind: LuiNodeKind): Boolean = + kind == LuiNodeKind.button || kind == LuiNodeKind.toggleButton + + fun isHorizontalGroupKind(kind: LuiNodeKind): Boolean = + kind == LuiNodeKind.tabs || + kind == LuiNodeKind.buttonGroup || + kind == LuiNodeKind.toggleGroup || + kind == LuiNodeKind.breadcrumb || + kind == LuiNodeKind.pagination + + fun horizontalGroupDefaultGap(kind: LuiNodeKind): Int = + if (kind == LuiNodeKind.pagination) 2 else 4 + + fun isTreeRowKind(kind: LuiNodeKind): Boolean = + kind == LuiNodeKind.row || + kind == LuiNodeKind.column || + kind == LuiNodeKind.panel || + kind == LuiNodeKind.card || + kind == LuiNodeKind.box || + kind == LuiNodeKind.listItem + + fun isTextControl(kind: LuiNodeKind): Boolean = + kind == LuiNodeKind.textField || + kind == LuiNodeKind.secureField || + kind == LuiNodeKind.input || + kind == LuiNodeKind.searchField || + kind == LuiNodeKind.textarea || + kind == LuiNodeKind.combobox + + fun isContextMenuLeafHost(kind: LuiNodeKind): Boolean = kind in setOf( + LuiNodeKind.button, + LuiNodeKind.toggleButton, + LuiNodeKind.toggle, + LuiNodeKind.radio, + LuiNodeKind.slider, + LuiNodeKind.numberStepper, + LuiNodeKind.textField, + LuiNodeKind.secureField, + LuiNodeKind.input, + LuiNodeKind.searchField, + LuiNodeKind.textarea, + LuiNodeKind.checkbox, + LuiNodeKind.switchControl, + LuiNodeKind.select, + LuiNodeKind.combobox, + LuiNodeKind.menuItem, + LuiNodeKind.text, + LuiNodeKind.tableCell, + ) + + fun isToolbarChild(kind: LuiNodeKind): Boolean = + isButtonKind(kind) || + kind == LuiNodeKind.buttonGroup || + kind == LuiNodeKind.toggleGroup || + kind == LuiNodeKind.checkbox || + kind == LuiNodeKind.switchControl || + kind == LuiNodeKind.toggle || + kind == LuiNodeKind.radioGroup || + kind == LuiNodeKind.select || + kind == LuiNodeKind.combobox || + kind == LuiNodeKind.textField || + kind == LuiNodeKind.secureField || + kind == LuiNodeKind.input || + kind == LuiNodeKind.searchField || + kind == LuiNodeKind.menuItem || + kind == LuiNodeKind.menuTrigger || + kind == LuiNodeKind.spacer || + kind == LuiNodeKind.divider || + kind == LuiNodeKind.text + + fun canContainChildren(kind: LuiNodeKind): Boolean = + kind == LuiNodeKind.root || + kind == LuiNodeKind.row || + kind == LuiNodeKind.column || + kind == LuiNodeKind.grid || + kind == LuiNodeKind.stack || + kind == LuiNodeKind.panel || + kind == LuiNodeKind.card || + kind == LuiNodeKind.box || + kind == LuiNodeKind.scroll || + kind == LuiNodeKind.list || + kind == LuiNodeKind.virtualList || + isHorizontalGroupKind(kind) || + kind == LuiNodeKind.radioGroup || + kind == LuiNodeKind.dropdownMenu || + kind == LuiNodeKind.contextMenu || + kind == LuiNodeKind.listItem || + kind == LuiNodeKind.accordion || + kind == LuiNodeKind.table || + kind == LuiNodeKind.tableRow || + kind == LuiNodeKind.tree || + kind == LuiNodeKind.resizable || + kind == LuiNodeKind.split || + kind == LuiNodeKind.drawer || + kind == LuiNodeKind.alert || + kind == LuiNodeKind.bubble || + kind == LuiNodeKind.stepper || + kind == LuiNodeKind.timeline || + kind == LuiNodeKind.inputGroup || + kind == LuiNodeKind.menuTrigger || + kind == LuiNodeKind.inputGroupActions || + kind == LuiNodeKind.toast || + kind == LuiNodeKind.toolbar || + kind == LuiNodeKind.bottomTabs || + kind == LuiNodeKind.bottomTab || + kind == LuiNodeKind.filePicker || + kind == LuiNodeKind.link || + isContextMenuLeafHost(kind) || + kind == LuiNodeKind.listSection || + kind == LuiNodeKind.listSectionHeader || + kind == LuiNodeKind.listSectionFooter || + kind == LuiNodeKind.swipeActions || + kind == LuiNodeKind.popover || + kind == LuiNodeKind.edgeInset || + kind == LuiNodeKind.overlay || + kind == LuiNodeKind.viewThatFits || + isModalSurface(kind) + + fun acceptsExtensionChildren(kind: LuiNodeKind): Boolean = + kind == LuiNodeKind.root || + kind == LuiNodeKind.row || + kind == LuiNodeKind.column || + kind == LuiNodeKind.grid || + kind == LuiNodeKind.stack || + kind == LuiNodeKind.edgeInset || + kind == LuiNodeKind.overlay || + kind == LuiNodeKind.viewThatFits || + kind == LuiNodeKind.panel || + kind == LuiNodeKind.card || + kind == LuiNodeKind.box || + kind == LuiNodeKind.scroll || + kind == LuiNodeKind.list || + kind == LuiNodeKind.virtualList || + kind == LuiNodeKind.listItem || + kind == LuiNodeKind.dialog || + kind == LuiNodeKind.sheet || + kind == LuiNodeKind.accordion || + kind == LuiNodeKind.resizable || + kind == LuiNodeKind.split || + kind == LuiNodeKind.drawer || + kind == LuiNodeKind.alert || + kind == LuiNodeKind.bubble || + kind == LuiNodeKind.toast || + kind == LuiNodeKind.toolbar || + kind == LuiNodeKind.bottomTab || + kind == LuiNodeKind.listSection || + kind == LuiNodeKind.listSectionHeader || + kind == LuiNodeKind.listSectionFooter + + private val mainAlignments = setOf("start", "center", "end", "space_between") + private val crossAlignments = setOf("stretch", "start", "center", "end") + private val controlSizes = setOf("default", "sm", "lg", "icon") + private val textSizes = setOf("heading", "display") + private val textAlignments = setOf("start", "center", "end") + private val themeModes = setOf("system", "light", "dark") + private val buttonVariants = + setOf("default", "primary", "secondary", "outline", "ghost", "destructive") + private val overlayAlignments = setOf( + "top-leading", "top", "top-trailing", + "leading", "center", "trailing", + "bottom-leading", "bottom", "bottom-trailing", + ) + private val iconNames = setOf( + "alert", "archive", "arrow-down", "arrow-right", "arrow-up", + "check", "check-circle", "chevron-down", "chevron-left", "chevron-right", + "chevron-up", "circle-dot", "clock", "copy", "download", "edit", + "ellipsis", "external-link", "eye", "file-text", "folder", "folder-open", + "git-branch", "git-merge", "git-pull-request", "info", "menu", "mic", + "moon", "music", "panel-left", "panel-right", "pause", "play", "plus", + "refresh-cw", "repeat", "save", "search", "send", "settings", "shuffle", + "skip-back", "skip-forward", "sun", "terminal", "trash", "volume", + "wrench", "x", "x-circle", + ) + + fun isIconName(value: String): Boolean = + iconNames.contains(value) || isAppIconName(value) + + fun isAppIconName(value: String): Boolean { + if (!value.startsWith("app:")) return false + val name = value.substring(4) + val segments = name.split('-') + return segments.isNotEmpty() && segments.all { segment -> + segment.isNotEmpty() && segment.all { it in 'a'..'z' || it in '0'..'9' } + } + } + + /** Ported from the Flutter backend's `_supports`: whether a `set-prop` + * op is admissible for the node's kind. */ + fun supports(kind: LuiNodeKind, property: String, value: LuiWireValue): Boolean { + if (property == "accessibility-identifier") return value is LuiWireValue.Str + if (kind == LuiNodeKind.root) { + return (property == "theme" && value is LuiWireValue.Str) || + (property == "theme-mode" && value.stringValue in themeModes) + } + if (kind == LuiNodeKind.contextMenu) return false + // The pointer-detail family is opt-in via `pointer-enabled`, honored + // on every kind that renders. + if (property == "pointer-enabled") { + return value is LuiWireValue.Bool && + kind != LuiNodeKind.root && + kind != LuiNodeKind.swipeActions + } + // Position hint honored on overlay children and the overlay itself. + if (property == "alignment") { + return kind != LuiNodeKind.root && value.stringValue in overlayAlignments + } + if (kind == LuiNodeKind.filePreview) { + return property == "path" && value is LuiWireValue.Str + } + if (kind == LuiNodeKind.accordion) { + return when (property) { + "text" -> value is LuiWireValue.Str + "selected", "toggle-enabled" -> value is LuiWireValue.Bool + "height" -> value.intValue?.let { it >= 0 } == true + else -> false + } + } + if (kind == LuiNodeKind.stepper) { + return when (property) { + "active" -> value.intValue?.let { it >= 0 } == true + "accessibility-label" -> value is LuiWireValue.Str + else -> false + } + } + if (kind == LuiNodeKind.step) { + return property == "text" && value is LuiWireValue.Str + } + if (kind == LuiNodeKind.timeline) { + return when (property) { + "gap" -> value.intValue?.let { it >= 0 } == true + "grow" -> value.numberValue?.let { it.isFinite() && it >= 0 } == true + "accessibility-label" -> value is LuiWireValue.Str + else -> false + } + } + if (kind == LuiNodeKind.timelineItem) { + return when (property) { + "title", "description", "meta", "indicator" -> value is LuiWireValue.Str + "icon" -> value.stringValue?.let { isIconName(it) } == true + "variant" -> value.stringValue in buttonVariants + "connector", "selected", "press-enabled" -> value is LuiWireValue.Bool + else -> false + } + } + if (kind == LuiNodeKind.inputGroup) { + return when (property) { + "accessibility-label" -> value is LuiWireValue.Str + "width", "height", "min-width" -> value.intValue?.let { it >= 0 } == true + "grow" -> value.numberValue?.let { it.isFinite() && it >= 0 } == true + else -> false + } + } + if (kind == LuiNodeKind.inputGroupActions) { + return property == "gap" && value.intValue?.let { it >= 0 } == true + } + if (kind == LuiNodeKind.toast) { + return when (property) { + "duration" -> value.intValue?.let { it >= 0 } == true + "accessibility-label", "style-class" -> value is LuiWireValue.Str + else -> false + } + } + if (kind == LuiNodeKind.toolbar) { + return when (property) { + "orientation" -> value.stringValue == "horizontal" || + value.stringValue == "vertical" + "placement" -> value.stringValue in setOf( + "automatic", "bottom", "navigation", "principal", + "primary-action", "secondary-action", "status", + "confirmation-action", "cancellation-action", + "destructive-action", "top-bar-leading", "top-bar-trailing", + ) + "gap" -> value.intValue?.let { it >= 0 } == true + "accessibility-label", "style-class" -> value is LuiWireValue.Str + else -> false + } + } + if (kind == LuiNodeKind.bottomTabs) { + return when (property) { + "accessibility-label", "style-class" -> value is LuiWireValue.Str + "grow" -> value.numberValue?.let { it.isFinite() && it >= 0 } == true + "width", "height", "min-width", "max-width", + "min-height", "max-height" -> value.intValue?.let { it >= 0 } == true + else -> false + } + } + if (kind == LuiNodeKind.bottomTab) { + return when (property) { + "title" -> value is LuiWireValue.Str + "icon" -> value.stringValue?.let { isIconName(it) } == true + "selected", "enabled", "press-enabled" -> value is LuiWireValue.Bool + else -> false + } + } + if (kind == LuiNodeKind.listSection) { + return when (property) { + "key" -> value is LuiWireValue.Str + "separator" -> value.stringValue == "visible" || value.stringValue == "hidden" + else -> false + } + } + if (kind == LuiNodeKind.swipeActions) return false + if (kind == LuiNodeKind.swipeAction) { + return when (property) { + "text", "background" -> value is LuiWireValue.Str + "icon" -> value.stringValue?.let { isIconName(it) } == true + "variant" -> value.stringValue in buttonVariants + "edge" -> value.stringValue == "leading" || value.stringValue == "trailing" + "enabled", "press-enabled" -> value is LuiWireValue.Bool + else -> false + } + } + if (kind == LuiNodeKind.filePicker) { + return when (property) { + "request", "completion" -> + value is LuiWireValue.Str || value is LuiWireValue.IntValue + "types", "accept" -> value is LuiWireValue.Str + "multiple", "enabled", "appear-enabled" -> value is LuiWireValue.Bool + "directory" -> value is LuiWireValue.Bool + "source" -> value.stringValue in setOf("files", "photos", "camera") + else -> false + } + } + // Theme props are admitted on every non-restrictive container kind. + if (property == "theme") { + return value is LuiWireValue.Str && canContainChildren(kind) + } + if (property == "theme-mode") { + return value.stringValue in themeModes && canContainChildren(kind) + } + return when (property) { + "main" -> + value.stringValue in mainAlignments && + (kind == LuiNodeKind.row || + kind == LuiNodeKind.column || + kind == LuiNodeKind.list || + kind == LuiNodeKind.virtualList || + isHorizontalGroupKind(kind)) + "cross" -> + value.stringValue in crossAlignments && + (kind == LuiNodeKind.row || + kind == LuiNodeKind.column || + kind == LuiNodeKind.list || + kind == LuiNodeKind.virtualList || + isHorizontalGroupKind(kind)) + "grow" -> + value.numberValue?.let { it.isFinite() && it >= 0 } == true && + kind != LuiNodeKind.avatar && + kind != LuiNodeKind.tooltip && + !isModalSurface(kind) + "columns" -> value.intValue?.let { it >= 0 } == true && kind == LuiNodeKind.grid + "text" -> + value is LuiWireValue.Str && + (kind == LuiNodeKind.text || + kind == LuiNodeKind.heading || + kind == LuiNodeKind.paragraph || + kind == LuiNodeKind.label || + isButtonKind(kind) || + isTextControl(kind) || + kind == LuiNodeKind.checkbox || + kind == LuiNodeKind.switchControl || + kind == LuiNodeKind.toggle || + kind == LuiNodeKind.radio || + kind == LuiNodeKind.numberStepper || + kind == LuiNodeKind.select || + kind == LuiNodeKind.menuItem || + kind == LuiNodeKind.menuTrigger || + kind == LuiNodeKind.listItem || + kind == LuiNodeKind.tableCell || + kind == LuiNodeKind.avatar || + kind == LuiNodeKind.tooltip || + kind == LuiNodeKind.alert || + kind == LuiNodeKind.bubble || + kind == LuiNodeKind.statusBar || + kind == LuiNodeKind.drawer || + kind == LuiNodeKind.link || + isModalSurface(kind)) + "enabled" -> + value is LuiWireValue.Bool && + (isButtonKind(kind) || + isTextControl(kind) || + kind == LuiNodeKind.checkbox || + kind == LuiNodeKind.switchControl || + kind == LuiNodeKind.toggle || + kind == LuiNodeKind.radio || + kind == LuiNodeKind.slider || + kind == LuiNodeKind.numberStepper || + kind == LuiNodeKind.select || + kind == LuiNodeKind.menuItem || + kind == LuiNodeKind.listItem || + kind == LuiNodeKind.drawer || + kind == LuiNodeKind.link) + "value" -> + value is LuiWireValue.DoubleValue && + value.doubleValue?.isFinite() == true && + (kind == LuiNodeKind.progress || + kind == LuiNodeKind.slider || + kind == LuiNodeKind.numberStepper || + kind == LuiNodeKind.split) + "min", "max" -> + value.numberValue?.isFinite() == true && kind == LuiNodeKind.numberStepper + "step" -> + value.numberValue?.let { it.isFinite() && it > 0 } == true && + kind == LuiNodeKind.numberStepper + "detents" -> value is LuiWireValue.Str && kind == LuiNodeKind.sheet + "sizing" -> + value.stringValue in setOf("form", "fitted", "page") && + kind == LuiNodeKind.sheet + "resize-duration" -> + value.intValue?.let { it >= 0 } == true && kind == LuiNodeKind.split + "resize-easing" -> + value.stringValue in setOf("linear", "standard", "emphasized", "spring") && + kind == LuiNodeKind.split + "resize-origin" -> + value is LuiWireValue.DoubleValue && + value.doubleValue?.isFinite() == true && + kind == LuiNodeKind.split + "orientation" -> + (value.stringValue == "horizontal" || value.stringValue == "vertical") && + (kind == LuiNodeKind.divider || + kind == LuiNodeKind.tabs || + kind == LuiNodeKind.scroll || + kind == LuiNodeKind.viewThatFits) + "size" -> + (value.stringValue in controlSizes || + (kind == LuiNodeKind.tableCell && value.stringValue in textSizes)) && + (isButtonKind(kind) || + kind == LuiNodeKind.spinner || + kind == LuiNodeKind.icon || + kind == LuiNodeKind.tableCell || + kind == LuiNodeKind.menuItem) + "name" -> + value.stringValue?.let { isIconName(it) } == true && kind == LuiNodeKind.icon + "variant" -> + value.stringValue in buttonVariants && + (isButtonKind(kind) || + kind == LuiNodeKind.alert || + kind == LuiNodeKind.bubble || + kind == LuiNodeKind.menuItem) + "icon" -> + value.stringValue?.let { isIconName(it) } == true && + (isButtonKind(kind) || + kind == LuiNodeKind.menuItem || + kind == LuiNodeKind.menuTrigger || + kind == LuiNodeKind.listItem || + kind == LuiNodeKind.link) + "icon-placement" -> + (value.stringValue == "leading" || value.stringValue == "trailing" || + value.stringValue == "top") && + (isButtonKind(kind) || kind == LuiNodeKind.link) + "selected" -> + value is LuiWireValue.Bool && + (isButtonKind(kind) || + kind == LuiNodeKind.menuItem || + kind == LuiNodeKind.listItem || + kind == LuiNodeKind.tableRow || + kind == LuiNodeKind.drawer || + isTreeRowKind(kind)) + "long-press-enabled" -> + value is LuiWireValue.Bool && + (isButtonKind(kind) || kind == LuiNodeKind.listItem) + "autofocus" -> + value is LuiWireValue.Bool && (isButtonKind(kind) || isTextControl(kind)) + "submit-on-enter" -> value is LuiWireValue.Bool && kind == LuiNodeKind.textarea + "change-enabled" -> + value is LuiWireValue.Bool && + (kind == LuiNodeKind.radio || isTreeRowKind(kind)) + "toggle-enabled" -> + value is LuiWireValue.Bool && + (kind == LuiNodeKind.radio || + kind == LuiNodeKind.drawer || + isTreeRowKind(kind)) + "press-enabled" -> + value is LuiWireValue.Bool && + (kind == LuiNodeKind.text || + kind == LuiNodeKind.column || + kind == LuiNodeKind.radio || + kind == LuiNodeKind.select || + kind == LuiNodeKind.combobox || + kind == LuiNodeKind.menuItem || + kind == LuiNodeKind.listItem || + kind == LuiNodeKind.tableCell || + kind == LuiNodeKind.fileImage || + isTreeRowKind(kind)) + "submit-enabled" -> + value is LuiWireValue.Bool && + (kind == LuiNodeKind.combobox || kind == LuiNodeKind.listItem) + "double-press-enabled" -> + value is LuiWireValue.Bool && kind == LuiNodeKind.listItem + "appear-enabled" -> value is LuiWireValue.Bool + "image" -> + value.intValue?.let { it >= 0 } == true && + (kind == LuiNodeKind.avatar || kind == LuiNodeKind.image) + "surface" -> + value.intValue?.let { it >= 0 } == true && kind == LuiNodeKind.mediaSurface + "source-x", "source-y", "source-width", "source-height" -> + value.numberValue?.isFinite() == true && + (kind == LuiNodeKind.avatar || kind == LuiNodeKind.image) + "path" -> value is LuiWireValue.Str && kind == LuiNodeKind.fileImage + "url" -> + value is LuiWireValue.Str && + (kind == LuiNodeKind.link || kind == LuiNodeKind.image) + "target" -> + value.stringValue in setOf("_self", "_blank") && kind == LuiNodeKind.link + "opacity" -> + value.numberValue?.let { it >= 0 && it <= 1 } == true && + canContainChildren(kind) + "display" -> + value.stringValue == "contents" && + (kind == LuiNodeKind.box || + kind == LuiNodeKind.column || + kind == LuiNodeKind.row) + "tooltip", "tooltip-keys" -> + value is LuiWireValue.Str && + (kind == LuiNodeKind.button || + kind == LuiNodeKind.icon || + kind == LuiNodeKind.menuItem) + "input-type" -> + (value.stringValue == "text" || value.stringValue == "color") && + kind == LuiNodeKind.input + "alt" -> value is LuiWireValue.Str && kind == LuiNodeKind.image + "loading" -> + value.stringValue in setOf("eager", "lazy") && kind == LuiNodeKind.image + "referrer-policy" -> + value.stringValue in setOf( + "no-referrer", "origin", + "strict-origin-when-cross-origin", "unsafe-url", + ) && kind == LuiNodeKind.image + "image-fit" -> + (value.stringValue == "fit" || value.stringValue == "fill") && + kind == LuiNodeKind.fileImage + "max-pixel-size" -> + value.intValue?.let { it > 0 } == true && kind == LuiNodeKind.fileImage + "anchor" -> + value.stringValue in setOf("above", "below", "left", "right") && + (kind == LuiNodeKind.dropdownMenu || + kind == LuiNodeKind.tooltip || + kind == LuiNodeKind.popover) + "anchor-alignment" -> + value.stringValue in setOf("start", "end", "stretch") && + (kind == LuiNodeKind.dropdownMenu || + kind == LuiNodeKind.tooltip || + kind == LuiNodeKind.popover) + "anchor-offset" -> + value.numberValue?.isFinite() == true && + (kind == LuiNodeKind.dropdownMenu || + kind == LuiNodeKind.tooltip || + kind == LuiNodeKind.popover) + "x", "y" -> + value.numberValue?.isFinite() == true && kind == LuiNodeKind.popover + "available-height" -> + value.numberValue?.let { it.isFinite() && it >= 0 } == true && + kind == LuiNodeKind.popover + "edge" -> + (value.stringValue in setOf("top", "bottom", "leading", "trailing") && + kind == LuiNodeKind.edgeInset) || + ((value.stringValue == "leading" || value.stringValue == "trailing") && + kind == LuiNodeKind.swipeAction) + "visible" -> value is LuiWireValue.Bool && kind == LuiNodeKind.edgeInset + "alignment" -> value.stringValue in overlayAlignments + "tooltip-delay" -> + value.intValue?.let { it >= 0 } == true && kind == LuiNodeKind.tooltip + "gap" -> + value.intValue?.let { it >= 0 } == true && + (kind == LuiNodeKind.row || + kind == LuiNodeKind.column || + kind == LuiNodeKind.grid || + kind == LuiNodeKind.list || + kind == LuiNodeKind.virtualList || + kind == LuiNodeKind.dropdownMenu || + kind == LuiNodeKind.tableRow || + kind == LuiNodeKind.tree || + kind == LuiNodeKind.split || + kind == LuiNodeKind.edgeInset || + isHorizontalGroupKind(kind)) + "padding" -> + value is LuiWireValue.IntValue && + kind != LuiNodeKind.avatar && + kind != LuiNodeKind.tooltip + "padding-horizontal", "padding-vertical" -> + value.intValue?.let { it >= 0 } == true && + (kind == LuiNodeKind.row || + kind == LuiNodeKind.column || + kind == LuiNodeKind.grid || + kind == LuiNodeKind.box) + "background" -> + value is LuiWireValue.Str && + kind != LuiNodeKind.avatar && + kind != LuiNodeKind.tooltip && + !isModalSurface(kind) + "foreground" -> + value is LuiWireValue.Str && + (kind == LuiNodeKind.edgeInset || + kind == LuiNodeKind.overlay || + kind == LuiNodeKind.viewThatFits || + kind == LuiNodeKind.text || + kind == LuiNodeKind.heading || + kind == LuiNodeKind.paragraph || + kind == LuiNodeKind.label || + isButtonKind(kind) || + isTextControl(kind) || + kind == LuiNodeKind.checkbox || + kind == LuiNodeKind.toggle || + kind == LuiNodeKind.radio || + kind == LuiNodeKind.slider || + kind == LuiNodeKind.numberStepper || + kind == LuiNodeKind.spinner || + kind == LuiNodeKind.icon || + kind == LuiNodeKind.select || + kind == LuiNodeKind.dropdownMenu || + kind == LuiNodeKind.menuItem || + kind == LuiNodeKind.menuTrigger || + kind == LuiNodeKind.listItem || + kind == LuiNodeKind.tableCell || + kind == LuiNodeKind.resizable || + kind == LuiNodeKind.split || + kind == LuiNodeKind.alert || + kind == LuiNodeKind.bubble || + kind == LuiNodeKind.statusBar || + kind == LuiNodeKind.link || + kind == LuiNodeKind.fileImage) + "border-color" -> + value is LuiWireValue.Str && + kind != LuiNodeKind.avatar && + kind != LuiNodeKind.tooltip && + !isModalSurface(kind) + "border-width" -> + value.intValue?.let { it >= 0 } == true && + kind != LuiNodeKind.avatar && + kind != LuiNodeKind.tooltip && + !isModalSurface(kind) + "corner-radius" -> + value.intValue?.let { it >= 0 } == true && + kind != LuiNodeKind.avatar && + kind != LuiNodeKind.tooltip && + !isModalSurface(kind) + "width", "height" -> + value.intValue?.let { it >= 0 } == true && + kind != LuiNodeKind.avatar && + kind != LuiNodeKind.tooltip + "min-width", "max-width", "min-height", "max-height" -> + value.intValue?.let { it >= 0 } == true && + kind != LuiNodeKind.avatar && + kind != LuiNodeKind.tooltip && + !isModalSurface(kind) + "style-class" -> + value is LuiWireValue.Str && + kind != LuiNodeKind.avatar && + kind != LuiNodeKind.tooltip && + !isModalSurface(kind) + "checked" -> + value is LuiWireValue.Bool && + (kind == LuiNodeKind.checkbox || + kind == LuiNodeKind.switchControl || + kind == LuiNodeKind.toggle || + kind == LuiNodeKind.radio) + "heading-level" -> + value.intValue?.let { it in 1..6 } == true && kind == LuiNodeKind.heading + "placeholder" -> + value is LuiWireValue.Str && + (isTextControl(kind) || kind == LuiNodeKind.select) + "accessibility-label" -> + value is LuiWireValue.Str && + (isButtonKind(kind) || + isTextControl(kind) || + kind == LuiNodeKind.checkbox || + kind == LuiNodeKind.switchControl || + kind == LuiNodeKind.toggle || + kind == LuiNodeKind.radioGroup || + kind == LuiNodeKind.tabs || + kind == LuiNodeKind.buttonGroup || + kind == LuiNodeKind.toggleGroup || + kind == LuiNodeKind.breadcrumb || + kind == LuiNodeKind.pagination || + kind == LuiNodeKind.radio || + kind == LuiNodeKind.slider || + kind == LuiNodeKind.numberStepper || + kind == LuiNodeKind.avatar || + kind == LuiNodeKind.image || + kind == LuiNodeKind.mediaSurface || + kind == LuiNodeKind.tree || + kind == LuiNodeKind.resizable || + kind == LuiNodeKind.split || + kind == LuiNodeKind.drawer || + kind == LuiNodeKind.alert || + kind == LuiNodeKind.bubble || + kind == LuiNodeKind.select || + kind == LuiNodeKind.menuTrigger || + kind == LuiNodeKind.link || + kind == LuiNodeKind.fileImage || + isTreeRowKind(kind)) + "text-alignment" -> + value.stringValue in textAlignments && + (isButtonKind(kind) || + kind == LuiNodeKind.text || + kind == LuiNodeKind.tableCell || + kind == LuiNodeKind.bubble || + kind == LuiNodeKind.statusBar) + "role" -> + (value.stringValue == "treeitem" && isTreeRowKind(kind)) || + (value.stringValue == "menu" && kind == LuiNodeKind.popover) + "tree-level" -> + value.intValue?.let { it > 0 } == true && isTreeRowKind(kind) + "expanded" -> value is LuiWireValue.Bool && isTreeRowKind(kind) + "key" -> + value is LuiWireValue.Str && + (kind == LuiNodeKind.listItem || kind == LuiNodeKind.listSection) + "separator" -> + (value.stringValue == "visible" || value.stringValue == "hidden") && + (kind == LuiNodeKind.listItem || kind == LuiNodeKind.listSection) + "style" -> + value.stringValue in setOf("plain", "inset", "inset-grouped") && + kind == LuiNodeKind.list + "scroll-target" -> value is LuiWireValue.Str && kind == LuiNodeKind.list + "scroll-anchor" -> + value.stringValue in setOf("top", "center", "bottom") && + kind == LuiNodeKind.list + "scroll-token" -> + value.intValue?.let { it >= 0 } == true && kind == LuiNodeKind.list + "scroll-animated", "track-visible-range" -> + value is LuiWireValue.Bool && kind == LuiNodeKind.list + else -> false + } + } +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiNodeView.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiNodeView.kt new file mode 100644 index 00000000..6ce4f08c --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiNodeView.kt @@ -0,0 +1,1807 @@ +package dev.lui + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.combinedClickable +import androidx.compose.foundation.gestures.detectHorizontalDragGestures +import androidx.compose.foundation.gestures.detectTapGestures +import androidx.compose.foundation.horizontalScroll +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.ColumnScope +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.IntrinsicSize +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.wrapContentSize +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Add +import androidx.compose.material.icons.filled.Check +import androidx.compose.material.icons.filled.KeyboardArrowDown +import androidx.compose.material.icons.filled.KeyboardArrowRight +import androidx.compose.material.icons.filled.Person +import androidx.compose.material.icons.filled.Search +import androidx.compose.material.icons.filled.Star +import androidx.compose.material.icons.filled.Remove +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Card +import androidx.compose.material3.Checkbox +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.DropdownMenu +import androidx.compose.material3.DropdownMenuItem +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.FilterChip +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.LinearProgressIndicator +import androidx.compose.material3.ListItem +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ModalBottomSheet +import androidx.compose.material3.NavigationBar +import androidx.compose.material3.NavigationBarItem +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.RadioButton +import androidx.compose.material3.Slider +import androidx.compose.material3.Surface +import androidx.compose.material3.Switch +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.TooltipBox +import androidx.compose.material3.TooltipDefaults +import androidx.compose.material3.VerticalDivider +import androidx.compose.material3.rememberModalBottomSheetState +import androidx.compose.material3.rememberTooltipState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.ImageBitmap +import androidx.compose.ui.graphics.asImageBitmap +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.DpOffset +import androidx.compose.ui.unit.dp + +/** + * Renders one node of the retained tree plus its subtree. Ported from the + * Flutter backend's `_buildNode` so event dispatch and visual defaults + * match the mobile reference behavior. + */ +@Composable +fun LuiNodeView(backend: LuiBackend, id: Long) { + val node = backend.node(id) + if (node == null) { + LuiExtensionView(backend, id) + return + } + LuiThemeScope(node) { + LuiAppear(backend, node, id) + when { + node.kind == LuiNodeKind.root -> + node.children.firstOrNull()?.let { LuiNodeView(backend, it) } + LuiKindRules.isModalSurface(node.kind) -> LuiModalSurface(backend, node, id) + else -> LuiChromeSurface(backend, node, id) + } + } +} + +/** + * Applies the shared chrome (sizing/background/border/padding/gestures) + * around the kind-specific content, and renders an attached context-menu + * child as a popup anchored to the long-press point. + */ +@Composable +private fun LuiChromeSurface(backend: LuiBackend, node: LuiNode, id: Long) { + var contextMenuAt by remember(id) { mutableStateOf(null) } + val contextMenuId = + node.children.firstOrNull { backend.node(it)?.kind == LuiNodeKind.contextMenu } + val modifier = Modifier + .luiChrome(node) + .luiGestures(backend, node, id) { offset -> contextMenuAt = offset } + + Box { + LuiNodeContent(backend, node, id, modifier) + val menuId = contextMenuId + val anchor = contextMenuAt + if (anchor != null && menuId != null) { + val menu = backend.node(menuId) + if (menu != null) { + DropdownMenu( + expanded = true, + onDismissRequest = { + contextMenuAt = null + backend.emit(LuiEvent.Dismiss(menuId)) + }, + offset = with(LocalDensity.current) { DpOffset(anchor.x.toDp(), 0.dp) }, + ) { + menu.children.forEach { childId -> LuiMenuEntry(backend, childId) } + } + } + } + } +} + +/** + * Renders an extension node through its registered Composable builder; + * tweaks use the same path (their registration wraps the single child). + */ +@Composable +private fun LuiExtensionView(backend: LuiBackend, id: Long) { + val node = backend.extensionNode(id) ?: return + val builder = backend.extensions.registration(node.identifier)?.builder ?: return + val context = LuiExtensionContext( + backend = backend, + nodeId = id, + identifier = node.identifier, + properties = node.properties, + children = node.children, + renderChild = { childId -> LuiNodeView(backend, childId) }, + ) + context.builder() +} + +private fun gapOf(node: LuiNode): Int = + node.prop("gap")?.intValue ?: if (LuiKindRules.isHorizontalGroupKind(node.kind)) { + LuiKindRules.horizontalGroupDefaultGap(node.kind) + } else { + 0 + } + +private fun emitValueChange(backend: LuiBackend, node: LuiNode, id: Long, value: Double) { + if (!node.isEnabled()) return + val emitted = when (node.kind) { + LuiNodeKind.numberStepper -> { + val min = node.propDouble("min") + val max = node.propDouble("max", Double.MAX_VALUE) + value.coerceIn(min, if (max < min) min else max) + } + else -> value.coerceIn(0.0, 1.0) + } + backend.emit(LuiEvent.ValueChanged(id, emitted)) +} + +/** Applies `grow` to a child inside a Row. */ +@Composable +private fun RowScope.GrowChildRow(backend: LuiBackend, childId: Long) { + val grow = backend.node(childId)?.prop("grow")?.numberValue ?: 0.0 + if (grow > 0) { + Box(Modifier.weight(grow.toFloat().coerceAtLeast(0.001f))) { + LuiNodeView(backend, childId) + } + } else { + LuiNodeView(backend, childId) + } +} + +/** Applies `grow` to a child inside a Column. */ +@Composable +private fun ColumnScope.GrowChildColumn(backend: LuiBackend, childId: Long) { + val grow = backend.node(childId)?.prop("grow")?.numberValue ?: 0.0 + if (grow > 0) { + Box(Modifier.weight(grow.toFloat().coerceAtLeast(0.001f))) { + LuiNodeView(backend, childId) + } + } else { + LuiNodeView(backend, childId) + } +} + +/** + * The kind-specific rendering of a node. `modifier` carries the shared + * chrome computed by [LuiChromeSurface]. + */ +@Composable +private fun LuiNodeContent( + backend: LuiBackend, + node: LuiNode, + id: Long, + modifier: Modifier, +) { + val children = node.children.filter { childId -> + val kind = backend.node(childId)?.kind + kind != LuiNodeKind.contextMenu && kind != LuiNodeKind.swipeActions + } + val enabled = node.isEnabled() + + when (node.kind) { + LuiNodeKind.root -> children.firstOrNull()?.let { LuiNodeView(backend, it) } + + LuiNodeKind.row -> Row( + modifier = modifier, + horizontalArrangement = Arrangement.spacedBy( + gapOf(node).dp, + alignment = mainHorizontalAlignment(node.propString("main")), + ), + verticalAlignment = when (node.propString("cross")) { + "start" -> Alignment.Top + "end" -> Alignment.Bottom + else -> Alignment.CenterVertically + }, + ) { + children.forEach { childId -> GrowChildRow(backend, childId) } + } + + LuiNodeKind.column, + LuiNodeKind.list, + LuiNodeKind.listSection, + LuiNodeKind.listSectionHeader, + LuiNodeKind.listSectionFooter, + LuiNodeKind.swipeActions, + LuiNodeKind.link, + LuiNodeKind.popover, + LuiNodeKind.tree, + LuiNodeKind.table, + LuiNodeKind.timeline, + -> Column( + modifier = modifier, + verticalArrangement = Arrangement.spacedBy(gapOf(node).dp), + ) { + children.forEach { childId -> GrowChildColumn(backend, childId) } + } + + LuiNodeKind.virtualList -> LazyColumn( + modifier = modifier, + verticalArrangement = Arrangement.spacedBy(gapOf(node).dp), + ) { + items(children.size) { index -> LuiNodeView(backend, children[index]) } + } + + LuiNodeKind.grid -> LuiGrid(backend, node, modifier, children) + + LuiNodeKind.stack, + LuiNodeKind.bottomTab, + LuiNodeKind.panel, + LuiNodeKind.card, + LuiNodeKind.resizable, + LuiNodeKind.filePicker, + -> LuiStackLike(backend, node, modifier, children) + + LuiNodeKind.edgeInset -> LuiEdgeInset(backend, node, modifier, children) + + LuiNodeKind.overlay -> LuiOverlay(backend, node, modifier, children) + + LuiNodeKind.viewThatFits -> Box(modifier) { + children.firstOrNull()?.let { LuiNodeView(backend, it) } + } + + LuiNodeKind.alert -> Column(modifier, verticalArrangement = Arrangement.spacedBy(8.dp)) { + if (node.text().isNotEmpty()) { + Text(node.text(), style = MaterialTheme.typography.titleSmall) + } + Box { children.forEach { LuiNodeView(backend, it) } } + } + + LuiNodeKind.bubble -> LuiBubble(backend, node, modifier, children) + + LuiNodeKind.box -> Column(modifier.fillMaxWidth()) { + children.forEach { childId -> GrowChildColumn(backend, childId) } + } + + LuiNodeKind.text, + LuiNodeKind.paragraph, + LuiNodeKind.label, + -> Text( + node.text(), + modifier = modifier, + color = luiThemeColor(node.propString("foreground"), foreground = true) + ?: Color.Unspecified, + textAlign = textAlignment(node.propString("text-alignment")), + style = LuiTypography.textStyleForSize(node.propString("size")), + ) + + LuiNodeKind.heading -> Text( + node.text(), + modifier = modifier, + color = luiThemeColor(node.propString("foreground"), foreground = true) + ?: Color.Unspecified, + style = LuiTypography.headingStyle(node.propInt("heading-level", 1)), + ) + + LuiNodeKind.button -> LuiButton(backend, node, id, modifier, children) + + LuiNodeKind.toggleButton -> LuiToggleButton(backend, node, id, modifier) + + LuiNodeKind.toggle -> FilterChip( + selected = node.propBool("checked"), + onClick = { + backend.emit(LuiEvent.ToggleChanged(id, !node.propBool("checked"))) + }, + label = { Text(node.text()) }, + modifier = modifier, + enabled = enabled, + ) + + LuiNodeKind.radioGroup -> Row(modifier) { + children.forEach { LuiNodeView(backend, it) } + } + + LuiNodeKind.radio -> Row( + modifier, + verticalAlignment = Alignment.CenterVertically, + ) { + RadioButton( + selected = node.propBool("checked"), + onClick = if (enabled) { + { + if (node.propBool("change-enabled")) { + backend.emit(LuiEvent.Change(id)) + } else if (node.propBool("toggle-enabled")) { + backend.emit(LuiEvent.ToggleChanged(id, true)) + } else { + backend.emit(LuiEvent.Press(id)) + } + } + } else { + null + }, + enabled = enabled, + ) + Text(node.text()) + } + + LuiNodeKind.slider -> Slider( + value = node.propDouble("value").toFloat().coerceIn(0f, 1f), + onValueChange = { value -> + if (enabled) backend.emit(LuiEvent.ValueChanged(id, value.toDouble())) + }, + modifier = modifier, + enabled = enabled, + ) + + LuiNodeKind.numberStepper -> Row( + modifier, + verticalAlignment = Alignment.CenterVertically, + ) { + Text(node.text()) + val step = node.propDouble("step", 1.0) + val current = node.propDouble("value") + IconButton( + onClick = { emitValueChange(backend, node, id, current - step) }, + enabled = enabled, + ) { Icon(Icons.Filled.Remove, contentDescription = "Decrease") } + IconButton( + onClick = { emitValueChange(backend, node, id, current + step) }, + enabled = enabled, + ) { Icon(Icons.Filled.Add, contentDescription = "Increase") } + } + + LuiNodeKind.textField, + LuiNodeKind.secureField, + LuiNodeKind.input, + LuiNodeKind.searchField, + LuiNodeKind.textarea, + LuiNodeKind.combobox, + -> LuiTextControl(backend, node, id, modifier) + + LuiNodeKind.checkbox -> Row( + modifier, + verticalAlignment = Alignment.CenterVertically, + ) { + Checkbox( + checked = node.propBool("checked"), + onCheckedChange = { value -> + if (enabled) backend.emit(LuiEvent.ToggleChanged(id, value)) + }, + enabled = enabled, + ) + Text(node.text()) + } + + LuiNodeKind.switchControl -> Row( + modifier, + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + if (node.text().isNotEmpty()) Text(node.text()) + Switch( + checked = node.propBool("checked"), + onCheckedChange = { value -> + if (enabled) backend.emit(LuiEvent.ToggleChanged(id, value)) + }, + enabled = enabled, + ) + } + + LuiNodeKind.progress -> LinearProgressIndicator( + progress = { node.propDouble("value").toFloat().coerceIn(0f, 1f) }, + modifier = modifier, + ) + + LuiNodeKind.divider -> if (node.propString("orientation") == "vertical") { + VerticalDivider(modifier.width(1.dp).fillMaxHeight()) + } else { + HorizontalDivider(modifier) + } + + LuiNodeKind.scroll -> { + val horizontal = node.propString("orientation") == "horizontal" + Box( + modifier = modifier.then( + if (horizontal) { + Modifier.horizontalScroll(rememberScrollState()) + } else { + Modifier.verticalScroll(rememberScrollState()) + }, + ), + ) { + children.forEach { LuiNodeView(backend, it) } + } + } + + LuiNodeKind.tabs, + LuiNodeKind.buttonGroup, + LuiNodeKind.toggleGroup, + LuiNodeKind.breadcrumb, + LuiNodeKind.pagination, + -> Row( + modifier = modifier, + horizontalArrangement = Arrangement.spacedBy( + gapOf(node).dp, + alignment = mainHorizontalAlignment(node.propString("main")), + ), + verticalAlignment = Alignment.CenterVertically, + ) { + children.forEach { childId -> GrowChildRow(backend, childId) } + } + + LuiNodeKind.bottomTabs -> LuiBottomTabs(backend, node, modifier) + + LuiNodeKind.spacer -> Spacer(modifier.size(1.dp)) + + LuiNodeKind.spinner -> CircularProgressIndicator( + modifier = modifier.size( + when (node.propString("size")) { + "sm" -> 16.dp + "lg" -> 24.dp + else -> 20.dp + }, + ), + strokeWidth = 2.dp, + color = luiThemeColor(node.propString("foreground"), foreground = true) + ?: MaterialTheme.colorScheme.primary, + ) + + LuiNodeKind.icon -> backend.icons.icon(node.propString("name") ?: "")?.let { vector -> + Icon( + vector, + contentDescription = node.propString("accessibility-label"), + modifier = modifier.size( + when (node.propString("size")) { + "sm" -> 16.dp + "lg", "icon" -> 24.dp + else -> 18.dp + }, + ), + tint = luiThemeColor(node.propString("foreground"), foreground = true) + ?: MaterialTheme.colorScheme.onSurface, + ) + } + + LuiNodeKind.select -> LuiSelect(backend, node, id, modifier) + + LuiNodeKind.dropdownMenu, + LuiNodeKind.contextMenu, + -> { + // Menus render through their anchor (stack child, menuTrigger, + // or context-menu popup); a detached menu renders inline as a + // surfaced column so its items stay reachable. + Surface( + modifier, + shape = RoundedCornerShape(8.dp), + tonalElevation = 2.dp, + shadowElevation = 8.dp, + ) { + Column { + children.forEach { childId -> LuiMenuEntry(backend, childId) } + } + } + } + + LuiNodeKind.menuItem -> LuiMenuItem(backend, node, id, modifier) + + LuiNodeKind.menuTrigger -> LuiMenuTrigger(backend, node, id, modifier) + + LuiNodeKind.listItem -> LuiListItem(backend, node, id, modifier, children) + + LuiNodeKind.avatar -> LuiAvatar(backend, node, modifier) + + LuiNodeKind.image -> LuiImage(backend, node, modifier) + + LuiNodeKind.fileImage -> LuiFileImage(backend, node, modifier) + + LuiNodeKind.mediaSurface -> LuiMediaSurface(backend, node, modifier) + + LuiNodeKind.stepper -> Row(modifier.wrapContentSize()) { + children.forEach { LuiNodeView(backend, it) } + } + + LuiNodeKind.step -> LuiStep(backend, node, id, modifier) + + LuiNodeKind.timelineItem -> LuiTimelineItem(backend, node, id, modifier) + + LuiNodeKind.inputGroup -> LuiInputGroup(backend, node, modifier, children) + + LuiNodeKind.inputGroupActions -> Row( + modifier.padding(start = 8.dp, top = 4.dp, end = 8.dp, bottom = 8.dp), + horizontalArrangement = Arrangement.spacedBy(gapOf(node).dp), + verticalAlignment = Alignment.CenterVertically, + ) { + children.forEach { childId -> GrowChildRow(backend, childId) } + } + + LuiNodeKind.accordion -> LuiAccordion(backend, node, id, modifier, children) + + LuiNodeKind.tableRow -> LuiTableRow(backend, node, id, modifier, children) + + LuiNodeKind.tableCell -> LuiTableCell(backend, node, id, modifier) + + LuiNodeKind.drawer -> LuiDrawer(backend, node, id, modifier, children) + + LuiNodeKind.split -> LuiSplit(backend, node, id, modifier, children) + + LuiNodeKind.tooltip -> Text(node.text(), modifier) + + LuiNodeKind.toast -> LuiToast(backend, node, id, modifier, children) + + LuiNodeKind.toolbar -> LuiToolbar(backend, node, modifier, children) + + LuiNodeKind.statusBar -> Text( + node.text(), + modifier = modifier, + textAlign = textAlignment(node.propString("text-alignment")), + style = MaterialTheme.typography.bodySmall, + color = luiThemeColor(node.propString("foreground"), foreground = true) + ?: MaterialTheme.colorScheme.onSurfaceVariant, + ) + + LuiNodeKind.kbd -> Box( + modifier + .clip(RoundedCornerShape(4.dp)) + .background(MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f)) + .border( + BorderStroke(0.5.dp, MaterialTheme.colorScheme.onSurface.copy(alpha = 0.2f)), + RoundedCornerShape(4.dp), + ) + .padding(horizontal = 6.dp, vertical = 2.dp), + ) { + Text( + node.text(), + style = MaterialTheme.typography.labelSmall.copy( + fontFamily = FontFamily.Monospace, + ), + ) + } + + LuiNodeKind.filePreview, + LuiNodeKind.br, + -> Unit + + LuiNodeKind.dialog, LuiNodeKind.sheet -> Unit // modal surfaces handled above + + else -> Column(modifier) { + children.forEach { LuiNodeView(backend, it) } + } + } +} + +private fun mainHorizontalAlignment(name: String?): Alignment.Horizontal = when (name) { + "center" -> Alignment.CenterHorizontally + "end" -> Alignment.End + else -> Alignment.Start +} + +@OptIn(ExperimentalLayoutApi::class) +@Composable +private fun LuiGrid( + backend: LuiBackend, + node: LuiNode, + modifier: Modifier, + children: List, +) { + val requested = node.propInt("columns") + val columns = if (requested > 0) requested else maxOf(children.size, 1) + val gap = gapOf(node) + FlowRow( + modifier = modifier, + horizontalArrangement = Arrangement.spacedBy(gap.dp), + verticalArrangement = Arrangement.spacedBy(gap.dp), + maxItemsInEachRow = columns, + ) { + children.forEach { childId -> + Box(Modifier.weight(1f)) { LuiNodeView(backend, childId) } + } + } +} + +/** + * Stack-family renderer: children overlay each other; a dropdown-menu + * child renders as an anchored popup and a tooltip child (with `anchor`) + * wraps the stack in a tooltip. + */ +@OptIn(ExperimentalMaterial3Api::class) +@Composable +private fun LuiStackLike( + backend: LuiBackend, + node: LuiNode, + modifier: Modifier, + children: List, +) { + val menuId = children.firstOrNull { backend.node(it)?.kind == LuiNodeKind.dropdownMenu } + val tooltipId = children.firstOrNull { + val child = backend.node(it) + child?.kind == LuiNodeKind.tooltip && child.prop("anchor") != null + } + val visible = children.filter { it != menuId && it != tooltipId } + + val stackContent: @Composable () -> Unit = { + Box(modifier) { + visible.forEach { childId -> + val child = backend.node(childId) + val fill = (child?.prop("grow")?.numberValue ?: 0.0) > 0 + Box( + if (fill) Modifier.fillMaxSize() else Modifier, + contentAlignment = child?.propString("alignment")?.let(::overlayAlignment) + ?: Alignment.TopStart, + ) { + LuiNodeView(backend, childId) + } + } + } + } + + val withTooltip: @Composable () -> Unit = if (tooltipId != null) { + { + val tooltip = backend.node(tooltipId)!! + TooltipBox( + positionProvider = TooltipDefaults.rememberPlainTooltipPositionProvider( + spacingBetweenTooltipAndAnchor = ( + tooltip.prop("anchor-offset")?.numberValue ?: 4.0 + ).dp, + ), + tooltip = { Text(tooltip.propString("text") ?: "") }, + state = rememberTooltipState(), + ) { + stackContent() + } + } + } else { + stackContent + } + + if (menuId == null) { + withTooltip() + } else { + val menu = backend.node(menuId) + Box { + withTooltip() + if (menu != null) { + DropdownMenu( + expanded = true, + onDismissRequest = { backend.emit(LuiEvent.Dismiss(menuId)) }, + ) { + menu.children.forEach { childId -> LuiMenuEntry(backend, childId) } + } + } + } + } +} + +/** edge-inset: first child fills; the rest pin to `edge` in a row/column group. */ +@Composable +private fun LuiEdgeInset( + backend: LuiBackend, + node: LuiNode, + modifier: Modifier, + children: List, +) { + val visible = node.propBool("visible", true) + val edge = node.propString("edge") ?: "top" + val gap = gapOf(node) + Box(modifier) { + children.firstOrNull()?.let { LuiNodeView(backend, it) } + if (visible && children.size > 1) { + val pinned = children.drop(1) + val alignment = when (edge) { + "bottom" -> Alignment.BottomCenter + "leading" -> Alignment.CenterStart + "trailing" -> Alignment.CenterEnd + else -> Alignment.TopCenter + } + Box( + Modifier.fillMaxSize().padding( + top = if (edge == "top") gap.dp else 0.dp, + bottom = if (edge == "bottom") gap.dp else 0.dp, + start = if (edge == "leading") gap.dp else 0.dp, + end = if (edge == "trailing") gap.dp else 0.dp, + ), + ) { + if (edge == "leading" || edge == "trailing") { + Row(Modifier.align(alignment)) { + pinned.forEach { LuiNodeView(backend, it) } + } + } else { + Column(Modifier.align(alignment)) { + pinned.forEach { LuiNodeView(backend, it) } + } + } + } + } + } +} + +/** overlay: children after the first float over it, aligned per-child. */ +@Composable +private fun LuiOverlay( + backend: LuiBackend, + node: LuiNode, + modifier: Modifier, + children: List, +) { + val fallback = overlayAlignment(node.propString("alignment")) + Box(modifier) { + children.forEachIndexed { index, childId -> + if (index == 0) { + LuiNodeView(backend, childId) + } else { + val child = backend.node(childId) + Box( + Modifier.fillMaxSize(), + contentAlignment = child?.propString("alignment") + ?.let(::overlayAlignment) ?: fallback, + ) { + LuiNodeView(backend, childId) + } + } + } + } +} + +@Composable +private fun LuiBubble( + backend: LuiBackend, + node: LuiNode, + modifier: Modifier, + children: List, +) { + Column(modifier.width(IntrinsicSize.Max)) { + Box { children.forEach { LuiNodeView(backend, it) } } + if (node.text().isNotEmpty()) { + val alignment = when (node.propString("text-alignment")) { + "start" -> Alignment.Start + "center" -> Alignment.CenterHorizontally + else -> Alignment.End + } + Surface( + modifier = Modifier.align(alignment).padding(top = 4.dp), + shape = RoundedCornerShape(8.dp), + color = MaterialTheme.colorScheme.secondaryContainer, + ) { + Text( + node.text(), + modifier = Modifier.padding(horizontal = 8.dp, vertical = 2.dp), + style = MaterialTheme.typography.labelSmall, + ) + } + } + } +} + +/** + * button / tab-trigger: variant and size mapping ported from the Flutter + * backend; tab triggers render as compact surface chips inside `tabs`. + */ +@Composable +private fun LuiButton( + backend: LuiBackend, + node: LuiNode, + id: Long, + modifier: Modifier, + children: List, +) { + val enabled = node.isEnabled() + val variant = node.propString("variant") ?: "default" + val isTabTrigger = node.parent?.let { backend.node(it)?.kind } == LuiNodeKind.tabs + val selected = node.propBool("selected") + val foreground = luiThemeColor(node.propString("foreground"), foreground = true) + + val icon = node.propString("icon")?.let { backend.icons.icon(it) } + val iconSize = when (node.propString("size")) { + "sm" -> 16.dp + "lg", "icon" -> 24.dp + else -> 18.dp + } + + val label: @Composable () -> Unit = { + if (children.isNotEmpty()) { + Row( + horizontalArrangement = Arrangement.spacedBy(8.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + children.forEach { LuiNodeView(backend, it) } + } + } else { + when { + node.text().isEmpty() && icon != null -> Icon( + icon, + contentDescription = node.propString("accessibility-label"), + modifier = Modifier.size(iconSize), + ) + icon == null -> Text( + node.text(), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + else -> Row( + horizontalArrangement = Arrangement.spacedBy(8.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + if (node.propString("icon-placement") == "trailing") { + Text(node.text(), maxLines = 1, overflow = TextOverflow.Ellipsis) + Icon(icon, contentDescription = null, modifier = Modifier.size(iconSize)) + } else { + Icon(icon, contentDescription = null, modifier = Modifier.size(iconSize)) + Text(node.text(), maxLines = 1, overflow = TextOverflow.Ellipsis) + } + } + } + } + } + + val onClick = { backend.emit(LuiEvent.Press(id)) } + + if (isTabTrigger) { + TextButton( + onClick = onClick, + modifier = modifier.height(32.dp), + enabled = enabled, + shape = RoundedCornerShape(6.dp), + colors = androidx.compose.material3.ButtonDefaults.textButtonColors( + containerColor = if (selected) { + MaterialTheme.colorScheme.surface + } else { + Color.Transparent + }, + contentColor = foreground ?: MaterialTheme.colorScheme.onSurface, + ), + ) { label() } + return + } + + when (variant) { + "primary" -> androidx.compose.material3.Button( + onClick = onClick, + modifier = modifier, + enabled = enabled, + ) { label() } + "secondary" -> androidx.compose.material3.FilledTonalButton( + onClick = onClick, + modifier = modifier, + enabled = enabled, + ) { label() } + "outline" -> androidx.compose.material3.OutlinedButton( + onClick = onClick, + modifier = modifier, + enabled = enabled, + ) { label() } + "destructive" -> androidx.compose.material3.Button( + onClick = onClick, + modifier = modifier, + enabled = enabled, + colors = androidx.compose.material3.ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.error, + contentColor = MaterialTheme.colorScheme.onError, + ), + ) { label() } + else -> TextButton( + onClick = onClick, + modifier = modifier, + enabled = enabled, + ) { label() } + } +} + +/** Toggle buttons keep a local selection so taps feel instant; the model + * `selected` prop re-syncs on the next patch. */ +@Composable +private fun LuiToggleButton(backend: LuiBackend, node: LuiNode, id: Long, modifier: Modifier) { + val enabled = node.isEnabled() + var selected by remember(id) { mutableStateOf(node.propBool("selected")) } + val modelSelected = node.propBool("selected") + LaunchedEffect(modelSelected) { selected = modelSelected } + FilterChip( + selected = selected, + onClick = { + if (enabled) { + selected = !selected + backend.emit(LuiEvent.ToggleChanged(id, selected)) + } + }, + label = { Text(node.text()) }, + modifier = modifier, + enabled = enabled, + ) +} + +/** Text-entry kinds: text-field, secure-field, input, search-field, textarea, combobox. */ +@Composable +private fun LuiTextControl( + backend: LuiBackend, + node: LuiNode, + id: Long, + modifier: Modifier, +) { + val multiline = node.kind == LuiNodeKind.textarea + val secure = node.kind == LuiNodeKind.secureField + val search = node.kind == LuiNodeKind.searchField + val combobox = node.kind == LuiNodeKind.combobox + val enabled = node.isEnabled() + val grouped = node.parent?.let { backend.node(it)?.kind } == LuiNodeKind.inputGroup + + // Local text keeps typing responsive; the model's `text` prop re-syncs + // when a patch changes it. + var localText by remember(id) { mutableStateOf(node.text()) } + val modelText = node.text() + LaunchedEffect(modelText) { if (modelText != localText) localText = modelText } + + OutlinedTextField( + value = localText, + onValueChange = { value -> + localText = value + backend.emit(LuiEvent.TextChanged(id, value)) + }, + modifier = modifier.then( + if (grouped) Modifier.fillMaxWidth() else Modifier.width(240.dp), + ), + enabled = enabled, + placeholder = node.propString("placeholder")?.let { p -> { Text(p) } }, + singleLine = !multiline, + minLines = if (multiline) 3 else 1, + visualTransformation = if (secure) { + androidx.compose.ui.text.input.PasswordVisualTransformation() + } else { + androidx.compose.ui.text.input.VisualTransformation.None + }, + trailingIcon = if (combobox || search) { + { + Icon( + if (combobox) Icons.Filled.KeyboardArrowDown else backend.icons.icon("search") ?: Icons.Filled.Search, + contentDescription = null, + modifier = if (combobox && enabled) { + Modifier.pointerInput(id) { + detectTapGestures { backend.emit(LuiEvent.Press(id)) } + } + } else { + Modifier + }, + ) + } + } else { + null + }, + textStyle = MaterialTheme.typography.bodyMedium.copy( + color = luiThemeColor(node.propString("foreground"), foreground = true) + ?: MaterialTheme.colorScheme.onSurface, + ), + ) +} + +@Composable +private fun LuiSelect(backend: LuiBackend, node: LuiNode, id: Long, modifier: Modifier) { + val enabled = node.isEnabled() + val title = node.propString("accessibility-label") ?: node.propString("placeholder") ?: "" + val value = node.text().ifEmpty { node.propString("placeholder") ?: "" } + ListItem( + headlineContent = { Text(if (title.isNotEmpty()) title else value) }, + supportingContent = if (title.isNotEmpty() && value != title && value.isNotEmpty()) { + { Text(value) } + } else { + null + }, + trailingContent = { + Icon( + Icons.Filled.KeyboardArrowDown, + contentDescription = null, + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + }, + modifier = modifier.clickable(enabled = enabled) { + backend.emit(LuiEvent.Press(id)) + }, + ) +} + +/** A menu entry (used both inside dropdown menus and context menus). */ +@Composable +internal fun LuiMenuEntry(backend: LuiBackend, childId: Long) { + val child = backend.node(childId) ?: return + when (child.kind) { + LuiNodeKind.divider -> HorizontalDivider() + LuiNodeKind.menuItem -> LuiMenuItem(backend, child, childId, Modifier) + LuiNodeKind.menuTrigger -> LuiMenuTrigger(backend, child, childId, Modifier) + else -> LuiNodeView(backend, childId) + } +} + +@Composable +private fun LuiMenuItem(backend: LuiBackend, node: LuiNode, id: Long, modifier: Modifier) { + val submenuId = + node.children.firstOrNull { backend.node(it)?.kind == LuiNodeKind.dropdownMenu } + val enabled = node.isEnabled() + val icon = node.propString("icon")?.let { backend.icons.icon(it) } + val selected = node.propBool("selected") + val destructive = node.propString("variant") == "destructive" + + if (submenuId != null) { + var submenuOpen by remember(id) { mutableStateOf(false) } + Box { + DropdownMenuItem( + text = { Text(node.text()) }, + onClick = { submenuOpen = true }, + enabled = enabled, + leadingIcon = icon?.let { { Icon(it, null, Modifier.size(16.dp)) } }, + trailingIcon = { + Icon(Icons.Filled.KeyboardArrowRight, null, Modifier.size(16.dp)) + }, + ) + val submenu = backend.node(submenuId) + if (submenu != null) { + DropdownMenu( + expanded = submenuOpen, + onDismissRequest = { submenuOpen = false }, + ) { + submenu.children.forEach { LuiMenuEntry(backend, it) } + } + } + } + return + } + + DropdownMenuItem( + text = { + Text( + node.text(), + color = if (destructive) MaterialTheme.colorScheme.error else Color.Unspecified, + ) + }, + onClick = { if (enabled) backend.emit(LuiEvent.Press(id)) }, + enabled = enabled, + modifier = modifier, + leadingIcon = icon?.let { { Icon(it, null, Modifier.size(16.dp)) } }, + trailingIcon = if (selected) { + { Icon(Icons.Filled.Check, null, Modifier.size(16.dp)) } + } else { + null + }, + ) +} + +@Composable +private fun LuiMenuTrigger(backend: LuiBackend, node: LuiNode, id: Long, modifier: Modifier) { + val menuId = node.children.firstOrNull { backend.node(it)?.kind == LuiNodeKind.dropdownMenu } + val enabled = node.isEnabled() + val icon = node.propString("icon")?.let { backend.icons.icon(it) } + val iconSize = if (node.text().isEmpty()) 24.dp else 16.dp + var open by remember(id) { mutableStateOf(false) } + + Box { + TextButton( + onClick = { open = !open }, + enabled = enabled, + modifier = modifier, + ) { + if (icon != null && node.text().isEmpty()) { + Icon( + icon, + contentDescription = node.propString("accessibility-label"), + modifier = Modifier.size(iconSize), + ) + } else if (icon != null) { + Row( + horizontalArrangement = Arrangement.spacedBy(4.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Icon(icon, null, Modifier.size(iconSize)) + if (node.text().isNotEmpty()) Text(node.text()) + } + } else { + Text(node.text()) + } + } + val menu = menuId?.let { backend.node(it) } + if (menu != null && menuId != null) { + DropdownMenu( + expanded = open, + onDismissRequest = { + open = false + backend.emit(LuiEvent.Dismiss(menuId)) + }, + ) { + menu.children.forEach { LuiMenuEntry(backend, it) } + } + } + } +} + +@OptIn(ExperimentalFoundationApi::class) +@Composable +private fun LuiListItem( + backend: LuiBackend, + node: LuiNode, + id: Long, + modifier: Modifier, + children: List, +) { + val enabled = node.isEnabled() + val icon = node.propString("icon")?.let { backend.icons.icon(it) } + ListItem( + headlineContent = { + if (children.isEmpty()) { + Text(node.text()) + } else { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp), + ) { + if (node.text().isNotEmpty()) Text(node.text()) + children.forEach { LuiNodeView(backend, it) } + } + } + }, + leadingContent = icon?.let { { Icon(it, null, Modifier.size(16.dp)) } }, + modifier = modifier.combinedClickable( + enabled = enabled, + onClick = { + if (node.propString("role") == "treeitem") { + if (node.propBool("press-enabled")) { + backend.emit(LuiEvent.Press(id)) + } else if (node.propBool("change-enabled")) { + backend.emit(LuiEvent.Change(id)) + } + if (node.propBool("toggle-enabled")) { + backend.emit(LuiEvent.ToggleChanged(id, !node.propBool("expanded"))) + } + } else if (node.propBool("press-enabled")) { + backend.emit(LuiEvent.Press(id)) + } + }, + onLongClick = if (node.propBool("long-press-enabled")) { + { backend.emit(LuiEvent.LongPress(id)) } + } else { + null + }, + onDoubleClick = if (node.propBool("double-press-enabled")) { + { backend.emit(LuiEvent.DoublePress(id)) } + } else { + null + }, + ), + ) +} + +@Composable +private fun LuiAvatar(backend: LuiBackend, node: LuiNode, modifier: Modifier) { + val image = backend.images[node.propInt("image")] + Box( + modifier.size(40.dp).clip(CircleShape) + .background(MaterialTheme.colorScheme.secondaryContainer), + contentAlignment = Alignment.Center, + ) { + if (image != null) { + Image( + bitmap = image, + contentDescription = node.propString("accessibility-label") ?: node.text(), + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop, + ) + } else if (node.text().isNotEmpty()) { + Text(node.text(), style = MaterialTheme.typography.labelLarge) + } else { + Icon( + backend.icons.icon("person") ?: Icons.Filled.Person, + contentDescription = node.propString("accessibility-label"), + tint = MaterialTheme.colorScheme.onSecondaryContainer, + ) + } + } +} + +@Composable +private fun LuiImage(backend: LuiBackend, node: LuiNode, modifier: Modifier) { + val bitmap = backend.images[node.propInt("image")] + val alt = node.propString("alt") ?: node.propString("accessibility-label") + if (bitmap != null) { + Image( + bitmap = bitmap, + contentDescription = alt, + modifier = modifier, + contentScale = ContentScale.Crop, + ) + } else { + // URL loading is intentionally not built in: register pixels via + // LuiBackend.registerImage, or resolve paths through + // filePathResolver + file-image. Keeps the module network-free. + Box(modifier.fillMaxSize()) + } +} + +@Composable +private fun LuiFileImage(backend: LuiBackend, node: LuiNode, modifier: Modifier) { + val path = backend.filePathResolver?.invoke(node.propString("path") ?: "") + ?: node.propString("path") ?: "" + val maxPixel = node.propInt("max-pixel-size", 1024) + var bitmap by remember(path) { mutableStateOf(null) } + LaunchedEffect(path) { + if (path.isNotEmpty()) { + bitmap = runCatching { decodeSampled(path, maxPixel) }.getOrNull() + } + } + val radius = node.propInt("corner-radius") + val clip = if (radius > 0) Modifier.clip(RoundedCornerShape(radius.dp)) else Modifier + val image = bitmap + if (image != null) { + Image( + bitmap = image, + contentDescription = node.propString("accessibility-label"), + modifier = modifier.then(clip), + contentScale = if (node.propString("image-fit") == "fill") { + ContentScale.Crop + } else { + ContentScale.Fit + }, + ) + } else { + Box(modifier.then(clip), contentAlignment = Alignment.Center) { + Icon( + backend.icons.icon("image") ?: Icons.Filled.Star, + contentDescription = null, + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } +} + +private fun decodeSampled(path: String, maxPixel: Int): ImageBitmap? { + val bounds = android.graphics.BitmapFactory.Options().apply { inJustDecodeBounds = true } + android.graphics.BitmapFactory.decodeFile(path, bounds) + if (bounds.outWidth <= 0 || bounds.outHeight <= 0) return null + var sample = 1 + val longest = maxOf(bounds.outWidth, bounds.outHeight) + while (longest / (sample * 2) > maxPixel) sample *= 2 + val options = android.graphics.BitmapFactory.Options().apply { inSampleSize = sample } + return android.graphics.BitmapFactory.decodeFile(path, options)?.asImageBitmap() +} + +@Composable +private fun LuiMediaSurface(backend: LuiBackend, node: LuiNode, modifier: Modifier) { + val frame = backend.mediaSurfaces[node.propInt("surface")] + if (frame != null) { + Image( + bitmap = frame, + contentDescription = node.propString("accessibility-label"), + modifier = modifier, + contentScale = ContentScale.Crop, + ) + } else { + Box(modifier.fillMaxSize().background(MaterialTheme.colorScheme.surfaceContainerHigh)) + } +} + +@Composable +private fun LuiStep(backend: LuiBackend, node: LuiNode, id: Long, modifier: Modifier) { + val parent = node.parent?.let { backend.node(it) } + val index = parent?.children?.indexOf(id) ?: 0 + val count = parent?.children?.size ?: 1 + val active = parent?.propInt("active") ?: 0 + val state = when { + index < active -> "completed" + index == active -> "active" + else -> "pending" + } + val activeColor = MaterialTheme.colorScheme.primary + Row(modifier.wrapContentSize(), verticalAlignment = Alignment.CenterVertically) { + Box( + Modifier.size(24.dp).clip(CircleShape) + .background(if (state == "pending") Color.Transparent else activeColor) + .border( + BorderStroke( + 1.dp, + if (state == "pending") { + MaterialTheme.colorScheme.outline + } else { + activeColor + }, + ), + CircleShape, + ), + contentAlignment = Alignment.Center, + ) { + if (state == "completed") { + Icon( + Icons.Filled.Check, + contentDescription = null, + modifier = Modifier.size(14.dp), + tint = MaterialTheme.colorScheme.onPrimary, + ) + } else { + Text( + "${index + 1}", + style = MaterialTheme.typography.labelSmall.copy( + fontWeight = FontWeight.SemiBold, + color = if (state == "active") { + MaterialTheme.colorScheme.onPrimary + } else { + MaterialTheme.colorScheme.onSurfaceVariant + }, + ), + ) + } + } + Spacer(Modifier.width(6.dp)) + Text( + node.text(), + style = MaterialTheme.typography.bodyMedium.copy( + fontWeight = if (state == "active") FontWeight.SemiBold else FontWeight.Normal, + color = if (state == "pending") { + MaterialTheme.colorScheme.onSurfaceVariant + } else { + Color.Unspecified + }, + ), + ) + if (index + 1 < count) { + Spacer(Modifier.width(8.dp)) + Box(Modifier.width(24.dp).height(1.dp).background(MaterialTheme.colorScheme.outlineVariant)) + Spacer(Modifier.width(8.dp)) + } + } +} + +@Composable +private fun LuiTimelineItem(backend: LuiBackend, node: LuiNode, id: Long, modifier: Modifier) { + val variantColor = when (node.propString("variant")) { + "primary" -> MaterialTheme.colorScheme.primary + "destructive" -> MaterialTheme.colorScheme.error + else -> MaterialTheme.colorScheme.outline + } + val connector = node.propBool("connector", true) + val pressable = node.propBool("press-enabled") + val enabled = node.isEnabled() + + Surface( + modifier = modifier, + shape = RoundedCornerShape(8.dp), + color = if (node.propBool("selected")) { + MaterialTheme.colorScheme.secondaryContainer + } else { + Color.Transparent + }, + ) { + Row( + Modifier.padding(8.dp).then( + if (pressable && enabled) { + Modifier.pointerInput(id) { + detectTapGestures { backend.emit(LuiEvent.Press(id)) } + } + } else { + Modifier + }, + ), + verticalAlignment = Alignment.Top, + ) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Box(Modifier.size(24.dp), contentAlignment = Alignment.Center) { + val iconName = node.propString("icon") ?: "" + val indicator = node.propString("indicator") ?: "" + when { + iconName.isNotEmpty() -> Icon( + backend.icons.icon(iconName) ?: Icons.Filled.Star, + contentDescription = null, + modifier = Modifier.size(16.dp), + tint = variantColor, + ) + indicator.isNotEmpty() -> Text( + indicator, + style = MaterialTheme.typography.labelSmall.copy( + color = variantColor, + fontWeight = FontWeight.SemiBold, + ), + ) + else -> Box(Modifier.size(10.dp).clip(CircleShape).background(variantColor)) + } + } + if (connector) { + Box( + Modifier.width(1.dp).height(28.dp) + .background(MaterialTheme.colorScheme.outlineVariant), + ) + } + } + Spacer(Modifier.width(10.dp)) + Column(Modifier.weight(1f)) { + val title = node.propString("title") ?: "" + if (title.isNotEmpty()) { + Text( + title, + style = MaterialTheme.typography.bodyMedium.copy(fontWeight = FontWeight.SemiBold), + ) + } + val description = node.propString("description") ?: "" + if (description.isNotEmpty()) { + Text( + description, + style = MaterialTheme.typography.bodyMedium.copy( + color = MaterialTheme.colorScheme.onSurfaceVariant, + ), + ) + } + val meta = node.propString("meta") ?: "" + if (meta.isNotEmpty()) { + Text( + meta, + style = MaterialTheme.typography.bodySmall.copy( + color = MaterialTheme.colorScheme.onSurfaceVariant, + ), + ) + } + } + if (pressable) { + Icon( + Icons.Filled.KeyboardArrowRight, + contentDescription = null, + modifier = Modifier.size(18.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + } +} + +@Composable +private fun LuiInputGroup( + backend: LuiBackend, + node: LuiNode, + modifier: Modifier, + children: List, +) { + Surface( + modifier = modifier, + shape = RoundedCornerShape(8.dp), + border = BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant), + color = MaterialTheme.colorScheme.surface, + ) { + Column(Modifier.fillMaxWidth()) { + children.forEach { LuiNodeView(backend, it) } + } + } +} + +@Composable +private fun LuiBottomTabs(backend: LuiBackend, node: LuiNode, modifier: Modifier) { + val destinationIds = node.children + val selectedIndex = destinationIds.indexOfFirst { + backend.node(it)?.propBool("selected") == true + }.let { if (it < 0) 0 else it } + Column(modifier.fillMaxSize()) { + Box(Modifier.weight(1f)) { + destinationIds.getOrNull(selectedIndex)?.let { LuiNodeView(backend, it) } + } + NavigationBar { + destinationIds.forEachIndexed { index, destId -> + val dest = backend.node(destId) ?: return@forEachIndexed + NavigationBarItem( + selected = index == selectedIndex, + onClick = { + if (dest.isEnabled() && dest.propBool("press-enabled")) { + backend.emit(LuiEvent.Press(destId)) + } + }, + icon = { + backend.icons.icon(dest.propString("icon") ?: "")?.let { Icon(it, contentDescription = null) } + }, + label = { Text(dest.propString("title") ?: "") }, + enabled = dest.isEnabled(), + ) + } + } + } +} + +@Composable +private fun LuiAccordion( + backend: LuiBackend, + node: LuiNode, + id: Long, + modifier: Modifier, + children: List, +) { + val expanded = node.propBool("selected") || node.propBool("expanded") + Column(modifier) { + Row( + Modifier.fillMaxWidth() + .clickable(enabled = node.propBool("toggle-enabled")) { + backend.emit(LuiEvent.ToggleChanged(id, !expanded)) + } + .padding(vertical = 8.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Text(node.text(), Modifier.weight(1f), style = MaterialTheme.typography.titleSmall) + Icon( + if (expanded) Icons.Filled.KeyboardArrowDown else Icons.Filled.KeyboardArrowRight, + contentDescription = null, + ) + } + if (expanded) { + Column { + children.forEach { LuiNodeView(backend, it) } + } + } + } +} + +@Composable +private fun LuiTableRow( + backend: LuiBackend, + node: LuiNode, + id: Long, + modifier: Modifier, + children: List, +) { + val parent = node.parent?.let { backend.node(it) } + val isLast = parent == null || parent.children.lastOrNull() == id + val gap = gapOf(node) + Column(modifier) { + Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) { + children.forEach { childId -> + val grow = backend.node(childId)?.prop("grow")?.numberValue ?: 0.0 + val cellModifier = Modifier.padding(horizontal = (gap / 2).dp).let { + if (grow > 0) it.weight(grow.toFloat().coerceAtLeast(0.001f)) else it + } + Box(cellModifier) { LuiNodeView(backend, childId) } + } + } + if (!isLast) { + HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant) + } + } +} + +@Composable +private fun LuiTableCell(backend: LuiBackend, node: LuiNode, id: Long, modifier: Modifier) { + val enabled = node.isEnabled() + Text( + node.text(), + modifier = modifier.fillMaxWidth().then( + if (node.propBool("press-enabled") && enabled) { + Modifier + .pointerInput(id) { + detectTapGestures { backend.emit(LuiEvent.Press(id)) } + } + .padding(vertical = 12.dp) + } else { + Modifier + }, + ), + textAlign = textAlignment(node.propString("text-alignment")), + style = LuiTypography.textStyleForSize(node.propString("size")).copy( + color = luiThemeColor(node.propString("foreground"), foreground = true) + ?: Color.Unspecified, + ), + ) +} + +/** + * drawer: modal side panel over the main content; `selected` controls + * presentation, scrim tap emits ToggleChanged(false). + */ +@Composable +private fun LuiDrawer( + backend: LuiBackend, + node: LuiNode, + id: Long, + modifier: Modifier, + children: List, +) { + val presented = node.propBool("selected") + val width = node.propInt("width", 320) + val enabled = node.isEnabled() + Box(modifier.fillMaxSize()) { + children.firstOrNull()?.let { LuiNodeView(backend, it) } + if (presented) { + Box( + Modifier.fillMaxSize() + .background(Color.Black.copy(alpha = 0.32f)) + .pointerInput(id) { + detectTapGestures { + if (enabled && node.propBool("toggle-enabled")) { + backend.emit(LuiEvent.ToggleChanged(id, false)) + } + } + }, + ) + Surface( + modifier = Modifier.fillMaxHeight() + .width(width.dp.coerceAtMost(360.dp)) + .align(Alignment.CenterStart), + color = MaterialTheme.colorScheme.surface, + shadowElevation = 8.dp, + ) { + Column { + children.drop(1).forEach { LuiNodeView(backend, it) } + } + } + } + } +} + +/** + * split: two panes separated by a draggable divider; `value` is the first + * pane's fraction. Dragging emits ValueChanged continuously (the model may + * echo the prop back). + */ +@Composable +private fun LuiSplit( + backend: LuiBackend, + node: LuiNode, + id: Long, + modifier: Modifier, + children: List, +) { + val fraction = node.propDouble("value").coerceIn(0.05, 0.95) + val enabled = node.isEnabled() + BoxWithConstraints(modifier.fillMaxSize()) { + val total = constraints.maxWidth.toFloat() + Row(Modifier.fillMaxSize()) { + Box(Modifier.weight(fraction.toFloat().coerceAtLeast(0.01f))) { + children.getOrNull(0)?.let { LuiNodeView(backend, it) } + } + Box( + Modifier.width(9.dp).fillMaxHeight().pointerInput(id, total) { + detectHorizontalDragGestures { _, dragAmount -> + if (enabled && total > 0) { + val next = fraction + dragAmount / total + backend.emit(LuiEvent.ValueChanged(id, next.toDouble())) + } + } + }, + contentAlignment = Alignment.Center, + ) { + Box( + Modifier.width(1.dp).fillMaxHeight() + .background(MaterialTheme.colorScheme.outlineVariant), + ) + } + Box(Modifier.weight((1f - fraction).toFloat().coerceAtLeast(0.01f))) { + children.getOrNull(1)?.let { LuiNodeView(backend, it) } + } + } + } +} + +/** toast: card with a timed auto-dismiss; duration 0 stays until dropped. */ +@Composable +private fun LuiToast( + backend: LuiBackend, + node: LuiNode, + id: Long, + modifier: Modifier, + children: List, +) { + val duration = node.propInt("duration") + if (duration > 0) { + LaunchedEffect(id, duration) { + kotlinx.coroutines.delay(duration.toLong()) + backend.emit(LuiEvent.Dismiss(id)) + } + } + Card(modifier) { + Row( + Modifier.padding(16.dp), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + children.forEach { LuiNodeView(backend, it) } + } + } +} + +/** + * toolbar: horizontal scroll row (or vertical column); `scroll-leading` + * pins the last child at the trailing edge. + */ +@Composable +private fun LuiToolbar( + backend: LuiBackend, + node: LuiNode, + modifier: Modifier, + children: List, +) { + val gap = gapOf(node) + if (node.propString("orientation") == "vertical") { + Column(modifier, verticalArrangement = Arrangement.spacedBy(gap.dp)) { + children.forEach { LuiNodeView(backend, it) } + } + return + } + val pinTrailing = (node.propString("style-class") ?: "") + .split(" ").contains("scroll-leading") && children.size >= 2 + if (!pinTrailing) { + Row( + modifier.horizontalScroll(rememberScrollState()), + horizontalArrangement = Arrangement.spacedBy(gap.dp), + ) { + children.forEach { LuiNodeView(backend, it) } + } + } else { + Row(modifier, horizontalArrangement = Arrangement.spacedBy(gap.dp)) { + Row( + Modifier.weight(1f).horizontalScroll(rememberScrollState()), + horizontalArrangement = Arrangement.spacedBy(gap.dp), + ) { + children.dropLast(1).forEach { LuiNodeView(backend, it) } + } + LuiNodeView(backend, children.last()) + } + } +} + +/** + * Modal surfaces (dialog, sheet): shown while the node exists; dismissal + * emits Dismiss so the model drops the node. + */ +@OptIn(ExperimentalMaterial3Api::class) +@Composable +private fun LuiModalSurface(backend: LuiBackend, node: LuiNode, id: Long) { + val onDismiss = { backend.emit(LuiEvent.Dismiss(id)) } + when (node.kind) { + LuiNodeKind.dialog -> AlertDialog( + onDismissRequest = onDismiss, + confirmButton = {}, + text = { + Column { + node.children.forEach { LuiNodeView(backend, it) } + } + }, + ) + LuiNodeKind.sheet -> ModalBottomSheet( + onDismissRequest = onDismiss, + sheetState = rememberModalBottomSheetState(), + ) { + Column { + node.children.forEach { LuiNodeView(backend, it) } + } + } + else -> Unit + } +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiRender.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiRender.kt new file mode 100644 index 00000000..2516a145 --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiRender.kt @@ -0,0 +1,290 @@ +package dev.lui + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.combinedClickable +import androidx.compose.foundation.gestures.detectTapGestures +import androidx.compose.foundation.horizontalScroll +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.ColumnScope +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.sizeIn +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import androidx.compose.ui.draw.clip +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.RectangleShape +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.platform.LocalUriHandler +import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.semantics +import androidx.compose.ui.semantics.testTag +import androidx.compose.ui.text.font.FontStyle +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import kotlin.math.roundToInt + +internal fun LuiNode.prop(name: String): LuiWireValue? = properties[name] + +internal fun LuiNode.propString(name: String): String? = properties[name]?.stringValue + +internal fun LuiNode.propBool(name: String, default: Boolean = false): Boolean = + properties[name]?.boolValue ?: default + +internal fun LuiNode.propInt(name: String, default: Int = 0): Int = + properties[name]?.intValue ?: default + +internal fun LuiNode.propDouble(name: String, default: Double = 0.0): Double = + properties[name]?.doubleValue ?: default + +internal fun LuiNode.text(): String = propString("text") ?: "" + +internal fun LuiNode.isEnabled(): Boolean = propBool("enabled", true) + +internal fun overlayAlignment(name: String?): Alignment = when (name) { + "top-leading" -> Alignment.TopStart + "top" -> Alignment.TopCenter + "top-trailing" -> Alignment.TopEnd + "leading" -> Alignment.CenterStart + "trailing" -> Alignment.CenterEnd + "bottom-leading" -> Alignment.BottomStart + "bottom" -> Alignment.BottomCenter + "bottom-trailing" -> Alignment.BottomEnd + else -> Alignment.Center +} + +internal fun textAlignment(name: String?): TextAlign = when (name) { + "center" -> TextAlign.Center + "end" -> TextAlign.End + else -> TextAlign.Start +} + +/** Default inner padding by kind, mirroring the Flutter backend. */ +private fun defaultPadding(kind: LuiNodeKind): Int = when (kind) { + LuiNodeKind.card -> 24 + LuiNodeKind.alert -> 16 + LuiNodeKind.bubble -> 12 + LuiNodeKind.tabs -> 4 + else -> 0 +} + +/** + * Shared visual chrome for a node: sizing, padding, background, border, + * corner radius, opacity. Ordering mirrors Flutter's Container: the + * decoration paints under the padding. + */ +@Composable +internal fun Modifier.luiChrome(node: LuiNode): Modifier { + val width = node.prop("width")?.intValue + val height = node.prop("height")?.intValue + val minWidth = node.prop("min-width")?.intValue ?: 0 + val maxWidth = node.prop("max-width")?.intValue ?: Int.MAX_VALUE + val minHeight = node.prop("min-height")?.intValue ?: 0 + val maxHeight = node.prop("max-height")?.intValue ?: Int.MAX_VALUE + var modifier: Modifier = this + if (width != null) modifier = modifier.width(width.dp) + if (height != null) modifier = modifier.height(height.dp) + if (minWidth > 0 || maxWidth != Int.MAX_VALUE || minHeight > 0 || maxHeight != Int.MAX_VALUE) { + modifier = modifier.sizeIn( + minWidth = minWidth.dp, + minHeight = minHeight.dp, + maxWidth = if (maxWidth == Int.MAX_VALUE) Dp.Infinity else maxWidth.dp, + maxHeight = if (maxHeight == Int.MAX_VALUE) Dp.Infinity else maxHeight.dp, + ) + } + val isSurface = LuiKindRules.isOverlaySurface(node.kind) + val padding = node.prop("padding")?.intValue ?: defaultPadding(node.kind) + val paddingH = node.prop("padding-horizontal")?.intValue ?: padding + val paddingV = node.prop("padding-vertical")?.intValue ?: padding + val radius = node.prop("corner-radius")?.intValue + ?: if (isSurface) 12 else if (node.kind == LuiNodeKind.tabs) 8 else 0 + val borderWidth = node.prop("border-width")?.intValue ?: if (isSurface) 1 else 0 + val background = luiThemeColor(node.propString("background")) + val borderColor = luiThemeColor(node.propString("border-color")) + val shape: Shape = if (radius > 0) { + androidx.compose.foundation.shape.RoundedCornerShape(radius.dp) + } else { + RectangleShape + } + val effectiveBackground = background ?: when { + node.kind == LuiNodeKind.box && node.propBool("selected") -> + MaterialTheme.colorScheme.secondaryContainer + node.kind == LuiNodeKind.tabs -> MaterialTheme.colorScheme.secondaryContainer + node.kind == LuiNodeKind.bubble && node.propString("variant") == "primary" -> + MaterialTheme.colorScheme.primary + isSurface -> MaterialTheme.colorScheme.surface + else -> null + } + if (effectiveBackground != null) { + modifier = modifier.background(effectiveBackground, shape) + } + if (borderWidth > 0) { + modifier = modifier.border( + BorderStroke(borderWidth.dp, borderColor ?: MaterialTheme.colorScheme.outlineVariant), + shape, + ) + } + if (radius > 0) modifier = modifier.clip(shape) + if (paddingH > 0 || paddingV > 0) { + modifier = modifier.padding(horizontal = paddingH.dp, vertical = paddingV.dp) + } + node.prop("opacity")?.numberValue?.let { opacity -> + if (opacity < 1) modifier = modifier.alpha(opacity.toFloat()) + } + node.propString("accessibility-identifier")?.let { identifier -> + modifier = modifier.semantics { testTag = identifier }.semantics { + contentDescription = identifier + } + } + node.propString("accessibility-label")?.let { label -> + modifier = modifier.semantics { contentDescription = label } + } + return modifier +} + +/** + * Interaction chrome: press/long-press/double-press on kinds that render + * gestures (column, text, tableCell, fileImage, tree rows, etc.), pointer + * detail when `pointer-enabled`, and an attached context-menu child shown + * on long-press. + */ +@OptIn(ExperimentalFoundationApi::class) +@Composable +internal fun Modifier.luiGestures( + backend: LuiBackend, + node: LuiNode, + id: Long, + onContextMenu: (Offset) -> Unit = {}, +): Modifier { + var modifier: Modifier = this + val enabled = node.isEnabled() + + val contextMenuId = node.children.firstOrNull { backend.node(it)?.kind == LuiNodeKind.contextMenu } + if (contextMenuId != null && enabled) { + modifier = modifier.pointerInput(id, contextMenuId) { + detectTapGestures( + onLongPress = { offset -> + onContextMenu(offset) + backend.emit( + LuiEvent.ContextMenuPress( + id, + LuiPointerDetail(x = offset.x.toDouble(), y = offset.y.toDouble()), + ), + ) + }, + ) + } + } + + val pressable = enabled && + (node.propBool("press-enabled") || + (node.propBool("change-enabled") && LuiKindRules.isTreeRowKind(node.kind)) || + (node.propBool("toggle-enabled") && LuiKindRules.isTreeRowKind(node.kind))) + val longPressable = enabled && node.propBool("long-press-enabled") + val doublePressable = enabled && node.propBool("double-press-enabled") + if (pressable || longPressable || doublePressable) { + modifier = modifier.combinedClickable( + onClick = { + if (node.propBool("press-enabled")) { + backend.emit(LuiEvent.Press(id)) + } else if (node.propBool("change-enabled")) { + backend.emit(LuiEvent.Change(id)) + } + if (node.propBool("toggle-enabled") && LuiKindRules.isTreeRowKind(node.kind)) { + backend.emit(LuiEvent.ToggleChanged(id, !node.propBool("expanded"))) + } + }, + onLongClick = if (longPressable) { + { backend.emit(LuiEvent.LongPress(id)) } + } else { + null + }, + onDoubleClick = if (doublePressable) { + { backend.emit(LuiEvent.DoublePress(id)) } + } else { + null + }, + ) + } + if (enabled && node.propBool("pointer-enabled")) { + modifier = modifier.pointerInput(id) { + detectTapGestures( + onPress = { offset -> + val detail = LuiPointerDetail( + x = offset.x.toDouble(), + y = offset.y.toDouble(), + ) + backend.emit(LuiEvent.PointerDown(id, detail)) + tryAwaitRelease() + backend.emit(LuiEvent.PointerUp(id, detail)) + }, + ) + } + } + return modifier +} + +/** Emits `Appear` once when an `appear-enabled` node first composes. */ +@Composable +internal fun LuiAppear(backend: LuiBackend, node: LuiNode, id: Long) { + if (node.propBool("appear-enabled")) { + LaunchedEffect(id) { backend.emit(LuiEvent.Appear(id)) } + } +} + +/** + * Applies a node's `theme`/`theme-mode` props: merges decoded tokens over + * the inherited semantic colors and optionally overrides the subtree + * appearance — a port of `LUIThemeScopeModifier`. + */ +@Composable +internal fun LuiThemeScope(node: LuiNode, content: @Composable () -> Unit) { + val inherited = LocalLuiSemanticColors.current + val ambientDark = LocalLuiThemeDark.current + val schemeOverride = LuiThemeTokenDecoder.colorScheme(node.propString("theme-mode")) + val dark = schemeOverride ?: (ambientDark ?: isSystemInDarkTheme()) + val own = LuiThemeTokenDecoder.colors(node.propString("theme"), dark) + if (own.isEmpty() && schemeOverride == null) { + content() + } else { + CompositionLocalProvider( + LocalLuiSemanticColors provides inherited + own, + LocalLuiThemeDark provides dark, + ) { + content() + } + } +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiSplit.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiSplit.kt new file mode 100644 index 00000000..7054bd4f --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiSplit.kt @@ -0,0 +1,359 @@ +package dev.lui + +import androidx.compose.foundation.gestures.detectDragGestures +import androidx.compose.foundation.horizontalScroll +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.rememberScrollState +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Close +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.material3.VerticalDivider +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.compositionLocalOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableDoubleStateOf +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.layout.onSizeChanged +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp + +/** + * Bonsplit-style tabbed split panes for the Kotlin backend (port of + * `lui_flutter_split.dart`). The OCaml app owns the tree; this file owns + * gesture-time visuals (divider drag, tab selection) and reports semantic + * events back through the extension-event channel. + * + * The fingerprint literals are the canonical `lui-extension-v1` strings — + * test_lui.ml's `split_host_sources` drift check verifies them against + * src/lui_split.ml, so keep them byte-identical. + */ +object LuiSplit { + private const val VIEW_FINGERPRINT = + "lui-extension-v1|10:split-view|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:17:divider-thickness:float:optional:none,24:accessibility-identifier:string:optional:none,9:animation:bool:optional:none|events:" + private const val BRANCH_FINGERPRINT = + "lui-extension-v1|12:split-branch|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:11:orientation:string:required:none,5:ratio:float:required:none|events:13:ratio-changed[5:ratio:float:required]" + private const val PANE_FINGERPRINT = + "lui-extension-v1|10:split-pane|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:9:split-tab|properties:24:accessibility-identifier:string:optional:none,7:focused:bool:optional:none,7:pane-id:string:required:none,8:selected:string:optional:none|events:10:split-drop[3:tab:string:required,4:edge:string:required,9:from-pane:string:required],10:tab-closed[3:tab:string:required],11:pane-closed[],12:pane-focused[],12:tab-selected[3:tab:string:required],15:split-requested[11:orientation:string:required],8:navigate[9:direction:string:required],9:tab-moved[3:tab:string:required,5:index:int:required,9:from-pane:string:required]" + private const val TAB_FINGERPRINT = + "lui-extension-v1|9:split-tab|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:1|children:|properties:24:accessibility-identifier:string:optional:none,4:icon:string:optional:none,5:dirty:bool:optional:none,5:title:string:required:none,6:tab-id:string:required:none,8:closable:bool:optional:none|events:" + + private val accessibilityIdentifier = + LuiExtensionProperty("accessibility-identifier", LuiExtensionValueKind.STRING) + + /** Registers all four split components. */ + fun register(registry: LuiExtensionRegistry) { + registry.register( + identifier = "split-view", + fingerprint = VIEW_FINGERPRINT, + childIdentifiers = listOf("split-branch", "split-pane"), + properties = listOf( + LuiExtensionProperty("divider-thickness", LuiExtensionValueKind.DOUBLE), + LuiExtensionProperty("animation", LuiExtensionValueKind.BOOLEAN), + accessibilityIdentifier, + ), + builder = { LuiSplitView(this) }, + ) + registry.register( + identifier = "split-branch", + fingerprint = BRANCH_FINGERPRINT, + childIdentifiers = listOf("split-branch", "split-pane"), + properties = listOf( + LuiExtensionProperty("orientation", LuiExtensionValueKind.STRING, required = true), + LuiExtensionProperty("ratio", LuiExtensionValueKind.DOUBLE, required = true), + ), + events = listOf( + LuiExtensionEventSchema( + "ratio-changed", + listOf( + LuiExtensionProperty("ratio", LuiExtensionValueKind.DOUBLE, required = true), + ), + ), + ), + builder = { LuiSplitBranch(this) }, + ) + registry.register( + identifier = "split-pane", + fingerprint = PANE_FINGERPRINT, + childIdentifiers = listOf("split-tab"), + properties = listOf( + LuiExtensionProperty("pane-id", LuiExtensionValueKind.STRING, required = true), + LuiExtensionProperty("selected", LuiExtensionValueKind.STRING), + LuiExtensionProperty("focused", LuiExtensionValueKind.BOOLEAN), + accessibilityIdentifier, + ), + events = listOf( + stringEvent("tab-selected", "tab"), + stringEvent("tab-closed", "tab"), + LuiExtensionEventSchema( + "tab-moved", + listOf( + LuiExtensionProperty("tab", LuiExtensionValueKind.STRING, required = true), + LuiExtensionProperty("index", LuiExtensionValueKind.INTEGER, required = true), + LuiExtensionProperty("from-pane", LuiExtensionValueKind.STRING, required = true), + ), + ), + LuiExtensionEventSchema("pane-focused"), + stringEvent("navigate", "direction"), + stringEvent("split-requested", "orientation"), + LuiExtensionEventSchema( + "split-drop", + listOf( + LuiExtensionProperty("tab", LuiExtensionValueKind.STRING, required = true), + LuiExtensionProperty("from-pane", LuiExtensionValueKind.STRING, required = true), + LuiExtensionProperty("edge", LuiExtensionValueKind.STRING, required = true), + ), + ), + LuiExtensionEventSchema("pane-closed"), + ), + builder = { LuiSplitPane(this) }, + ) + registry.register( + identifier = "split-tab", + fingerprint = TAB_FINGERPRINT, + acceptsStandardChildren = true, + properties = listOf( + LuiExtensionProperty("tab-id", LuiExtensionValueKind.STRING, required = true), + LuiExtensionProperty("title", LuiExtensionValueKind.STRING, required = true), + LuiExtensionProperty("icon", LuiExtensionValueKind.STRING), + LuiExtensionProperty("dirty", LuiExtensionValueKind.BOOLEAN), + LuiExtensionProperty("closable", LuiExtensionValueKind.BOOLEAN), + accessibilityIdentifier, + ), + builder = { + Column(Modifier.fillMaxSize()) { + children.forEach { child(it) } + } + }, + ) + } + + private fun stringEvent(name: String, field: String) = + LuiExtensionEventSchema( + name, + listOf(LuiExtensionProperty(field, LuiExtensionValueKind.STRING, required = true)), + ) +} + +/** Visual settings broadcast by split-view through the Compose tree. */ +private data class LuiSplitSettings( + val dividerThickness: Double = 9.0, + val animationEnabled: Boolean = true, +) + +private val LocalSplitSettings = compositionLocalOf { LuiSplitSettings() } + +@Composable +private fun LuiSplitView(ext: LuiExtensionContext) { + val settings = LuiSplitSettings( + dividerThickness = (ext.double("divider-thickness") ?: 9.0).coerceAtLeast(1.0), + animationEnabled = ext.bool("animation") ?: true, + ) + CompositionLocalProvider(LocalSplitSettings provides settings) { + Column(Modifier.fillMaxSize()) { + ext.children.forEach { ext.child(it) } + } + } +} + +@Composable +private fun LuiSplitBranch(ext: LuiExtensionContext) { + val settings = LocalSplitSettings.current + val horizontal = ext.string("orientation") != "vertical" + val sourceRatio = (ext.double("ratio") ?: 0.5).coerceIn(0.0, 1.0) + var ratio by remember { mutableDoubleStateOf(sourceRatio) } + var dragging by remember { mutableStateOf(false) } + if (!dragging && kotlin.math.abs(ratio - sourceRatio) > 1e-6) { + ratio = sourceRatio + } + var axisPx by remember { mutableIntStateOf(0) } + + val thickness = settings.dividerThickness.dp + val divider: @Composable () -> Unit = { + val handle = Modifier + .then(if (horizontal) Modifier.width(thickness).fillMaxHeight() else Modifier.height(thickness).fillMaxWidth()) + .pointerInput(horizontal) { + detectDragGestures( + onDragStart = { dragging = true }, + onDragEnd = { dragging = false }, + onDragCancel = { dragging = false }, + onDrag = { change, amount -> + change.consume() + if (axisPx > 0) { + val delta = (if (horizontal) amount.x else amount.y) / axisPx + ratio = (ratio + delta).toDouble().coerceIn(0.05, 0.95) + ext.emitEvent( + "ratio-changed", + mapOf("ratio" to LuiWireValue.DoubleValue(ratio)), + ) + } + }, + ) + } + if (horizontal) { + VerticalDivider(handle) + } else { + HorizontalDivider(handle) + } + } + + if (horizontal) { + Row(Modifier.fillMaxSize().onSizeChanged { axisPx = it.width }) { + ext.children.getOrNull(0)?.let { first -> + Box(Modifier.weight(ratio.toFloat().coerceAtLeast(0.001f)).fillMaxHeight()) { + ext.child(first) + } + } + divider() + ext.children.getOrNull(1)?.let { second -> + Box(Modifier.weight((1f - ratio.toFloat()).coerceAtLeast(0.001f)).fillMaxHeight()) { + ext.child(second) + } + } + } + } else { + Column(Modifier.fillMaxSize().onSizeChanged { axisPx = it.height }) { + ext.children.getOrNull(0)?.let { first -> + Box(Modifier.weight(ratio.toFloat().coerceAtLeast(0.001f)).fillMaxWidth()) { + ext.child(first) + } + } + divider() + ext.children.getOrNull(1)?.let { second -> + Box(Modifier.weight((1f - ratio.toFloat()).coerceAtLeast(0.001f)).fillMaxWidth()) { + ext.child(second) + } + } + } + } +} + +@Composable +private fun LuiSplitPane(ext: LuiExtensionContext) { + val tabs = ext.children.mapNotNull { id -> + ext.extensionChild(id)?.let { id to it } + } + val selected = ext.string("selected") ?: tabs.firstOrNull()?.let { + it.second.properties["tab-id"]?.stringValue + } + val selectedPair = tabs.firstOrNull { + it.second.properties["tab-id"]?.stringValue == selected + } ?: tabs.firstOrNull() + + Column(Modifier.fillMaxSize()) { + Surface(tonalElevation = 1.dp) { + Row( + Modifier + .fillMaxWidth() + .horizontalScroll(rememberScrollState()), + ) { + tabs.forEach { (id, tab) -> + val tabId = tab.properties["tab-id"]?.stringValue ?: return@forEach + val isSelected = id == selectedPair?.first + SplitTabChip( + node = tab, + icons = ext.backend.icons, + selected = isSelected, + onSelect = { + ext.emitEvent("pane-focused") + ext.emitEvent("tab-selected", mapOf("tab" to LuiWireValue.Str(tabId))) + }, + onClose = { + ext.emitEvent("tab-closed", mapOf("tab" to LuiWireValue.Str(tabId))) + }, + ) + } + } + } + HorizontalDivider() + Box(Modifier.weight(1f).fillMaxWidth()) { + selectedPair?.let { (id, _) -> + // Mount only the selected tab; the OCaml side re-issues + // patches when it is evicted, matching the web backend. + ext.child(id) + } + } + } +} + +@Composable +private fun SplitTabChip( + node: LuiExtensionNode, + icons: LuiIconResolver, + selected: Boolean, + onSelect: () -> Unit, + onClose: () -> Unit, +) { + val title = node.properties["title"]?.stringValue ?: "" + val icon = node.properties["icon"]?.stringValue?.let { icons.icon(it) } + val dirty = node.properties["dirty"]?.boolValue == true + val closable = node.properties["closable"]?.boolValue == true + + Surface( + color = if (selected) { + MaterialTheme.colorScheme.surface + } else { + MaterialTheme.colorScheme.surfaceContainerLow + }, + onClick = onSelect, + ) { + Row( + Modifier.padding(horizontal = 12.dp, vertical = 8.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + if (icon != null) { + Icon( + icon, + contentDescription = null, + modifier = Modifier.size(16.dp).padding(end = 2.dp), + tint = if (selected) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.onSurfaceVariant + }, + ) + } + Text( + if (dirty) "$title •" else title, + style = MaterialTheme.typography.labelLarge, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + color = if (selected) { + MaterialTheme.colorScheme.onSurface + } else { + MaterialTheme.colorScheme.onSurfaceVariant + }, + ) + if (closable) { + IconButton(onClick = onClose, modifier = Modifier.size(20.dp)) { + Icon( + icons.icon("x") ?: Icons.Filled.Close, + contentDescription = "Close", + modifier = Modifier.size(12.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + } + } +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiStore.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiStore.kt new file mode 100644 index 00000000..4c4fa238 --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiStore.kt @@ -0,0 +1,403 @@ +package dev.lui + +/** A retained standard node. Property keys are wire property names. */ +class LuiNode( + val kind: LuiNodeKind, + var parent: Long? = null, + val children: MutableList = mutableListOf(), + val properties: MutableMap = mutableMapOf(), +) { + fun copy(): LuiNode = LuiNode(kind, parent, children.toMutableList(), properties.toMutableMap()) +} + +/** A retained extension node (component or platform tweak). */ +class LuiExtensionNode( + val identifier: String, + val fingerprint: String, + var parent: Long? = null, + val children: MutableList = mutableListOf(), + val properties: MutableMap = mutableMapOf(), +) { + fun copy(): LuiExtensionNode = + LuiExtensionNode(identifier, fingerprint, parent, children.toMutableList(), properties.toMutableMap()) +} + +/** + * Retained node store. Mirrors the Flutter backend's apply semantics: + * ops are validated against deep copies and the whole batch is rejected + * (no state change) when any op or post-condition fails. Generation must + * advance by exactly one per batch. + */ +class LuiRetainedTree(private val registry: LuiExtensionRegistry) { + var generation: Int = 0 + private set + + var nodes: Map = emptyMap() + private set + var extensionNodes: Map = emptyMap() + private set + + /** Nodes removed by the last applied batch (only `drop-node` deletes). */ + var lastDropped: Set = emptySet() + private set + + val rootIds: List + get() = nodes.filterValues { it.parent == null }.keys.toList() + + extensionNodes.filterValues { it.parent == null }.keys.toList() + + fun node(id: Long): LuiNode? = nodes[id] + fun extensionNode(id: Long): LuiExtensionNode? = extensionNodes[id] + fun contains(id: Long): Boolean = nodes.containsKey(id) || extensionNodes.containsKey(id) + + private fun parentOf( + nodes: Map, + ext: Map, + id: Long, + ): Long? = nodes[id]?.parent ?: ext[id]?.parent + + private fun childrenOf( + nodes: Map, + ext: Map, + id: Long, + ): MutableList? = nodes[id]?.children ?: ext[id]?.children + + private fun setParent( + nodes: Map, + ext: Map, + id: Long, + parent: Long?, + ) { + nodes[id]?.let { it.parent = parent } + ext[id]?.let { it.parent = parent } + } + + private fun requireNode(nodes: Map, id: Long): LuiNode = + nodes[id] ?: throw LuiBackendException("unknown node $id") + + private fun requireExtension( + ext: Map, + id: Long, + ): LuiExtensionNode = + ext[id] ?: throw LuiBackendException("unknown extension node $id") + + fun apply(batch: LuiPatchBatch) { + val expected = generation + 1 + if (batch.generation != expected) { + throw LuiBackendException( + "expected patch generation $expected, received ${batch.generation}", + ) + } + val nextNodes = nodes.mapValues { it.value.copy() }.toMutableMap() + val nextExt = extensionNodes.mapValues { it.value.copy() }.toMutableMap() + val dropped = mutableSetOf() + for (op in batch.ops) { + applyOp(nextNodes, nextExt, op, dropped) + } + validateStates(nextNodes) + nodes = nextNodes + extensionNodes = nextExt + lastDropped = dropped + generation = batch.generation + } + + private fun applyOp( + nodes: MutableMap, + ext: MutableMap, + op: LuiPatchOp, + dropped: MutableSet, + ) { + when (op) { + is LuiPatchOp.CreateNode -> { + if (nodes.containsKey(op.id) || ext.containsKey(op.id)) { + throw LuiBackendException("node already exists") + } + nodes[op.id] = LuiNode(op.kind) + } + is LuiPatchOp.CreateExtension -> { + if (nodes.containsKey(op.id) || ext.containsKey(op.id)) { + throw LuiBackendException("node already exists") + } + val registration = registry.registration(op.identifier) + ?: throw LuiBackendException("unknown extension") + if (registration.fingerprint != op.fingerprint) { + throw LuiBackendException("extension fingerprint mismatch") + } + ext[op.id] = LuiExtensionNode( + identifier = op.identifier, + fingerprint = op.fingerprint, + properties = registration.defaultProperties(), + ) + } + is LuiPatchOp.DropNode -> { + if (parentOf(nodes, ext, op.id) != null || + childrenOf(nodes, ext, op.id)?.isNotEmpty() == true + ) { + throw LuiBackendException("cannot drop an attached node") + } + if (nodes.remove(op.id) == null && ext.remove(op.id) == null) { + throw LuiBackendException("unknown node ${op.id}") + } + dropped.add(op.id) + } + is LuiPatchOp.SetProp -> { + val node = requireNode(nodes, op.id) + if (!LuiKindRules.supports(node.kind, op.property, op.value)) { + throw LuiBackendException( + "unsupported property value: ${node.kind}.${op.property}", + ) + } + node.properties[op.property] = op.value + } + is LuiPatchOp.RemoveProp -> { + val node = requireNode(nodes, op.id) + if (!node.properties.containsKey(op.property)) { + throw LuiBackendException( + "unsupported property: ${node.kind}.${op.property}", + ) + } + node.properties.remove(op.property) + } + is LuiPatchOp.SetExtensionProp -> { + val node = requireExtension(ext, op.id) + val registration = registry.registration(node.identifier)!! + val property = registration.properties.firstOrNull { it.name == op.property } + if (property == null || !property.kind.accepts(op.value)) { + throw LuiBackendException("unsupported extension property value") + } + node.properties[op.property] = property.kind.normalize(op.value) + } + is LuiPatchOp.RemoveExtensionProp -> { + val node = requireExtension(ext, op.id) + val registration = registry.registration(node.identifier)!! + val property = registration.properties.firstOrNull { it.name == op.property } + ?: throw LuiBackendException("unknown extension property") + val default = property.defaultValue + if (default == null) { + node.properties.remove(op.property) + } else { + node.properties[op.property] = property.kind.normalize(default) + } + } + is LuiPatchOp.InsertChild -> { + if ((!nodes.containsKey(op.parent) && !ext.containsKey(op.parent)) || + (!nodes.containsKey(op.child) && !ext.containsKey(op.child)) + ) { + throw LuiBackendException("unknown parent or child node") + } + if (parentOf(nodes, ext, op.child) != null) { + throw LuiBackendException("child is already attached") + } + validateChildRelationship(nodes, ext, op.parent, op.child) + val children = childrenOf(nodes, ext, op.parent)!! + if (op.index < 0 || op.index > children.size) { + throw LuiBackendException("child index is out of bounds") + } + if (isDescendant(nodes, ext, target = op.parent, root = op.child)) { + throw LuiBackendException("child insertion would create a cycle") + } + children.add(op.index, op.child) + setParent(nodes, ext, op.child, op.parent) + } + is LuiPatchOp.RemoveChild -> { + val children = childrenOf(nodes, ext, op.parent) + if (children == null || !children.remove(op.child)) { + throw LuiBackendException("child is not attached to parent") + } + setParent(nodes, ext, op.child, null) + } + is LuiPatchOp.MoveChild -> { + val children = childrenOf(nodes, ext, op.parent) + if (children == null || !children.remove(op.child)) { + throw LuiBackendException("child is not attached to parent") + } + if (op.index < 0 || op.index > children.size) { + throw LuiBackendException("child index is out of bounds") + } + children.add(op.index, op.child) + } + } + } + + private fun isDescendant( + nodes: Map, + ext: Map, + target: Long, + root: Long, + ): Boolean { + var cursor = parentOf(nodes, ext, target) + while (cursor != null) { + if (cursor == root) return true + cursor = parentOf(nodes, ext, cursor) + } + return false + } + + private fun validateChildRelationship( + nodes: Map, + ext: Map, + parentID: Long, + childID: Long, + ) { + if (nodes[childID]?.kind == LuiNodeKind.root) { + throw LuiBackendException("runtime root cannot be nested") + } + val transparentChild = ext[childID] + if (transparentChild != null && + registry.registration(transparentChild.identifier)?.isTweak == true + ) { + if (transparentChild.children.size != 1) { + throw LuiBackendException("platform tweak requires exactly one child") + } + validateChildRelationship(nodes, ext, parentID, transparentChild.children.single()) + return + } + val parent = nodes[parentID] + val child = nodes[childID] + if (parent != null && child == null) { + if (!LuiKindRules.acceptsExtensionChildren(parent.kind)) { + throw LuiBackendException("standard node cannot contain extension") + } + return + } + val extensionParent = ext[parentID] + val extensionChild = ext[childID] + if (extensionParent != null) { + val registration = registry.registration(extensionParent.identifier)!! + if (registration.isTweak) { + if (extensionParent.children.isNotEmpty()) { + throw LuiBackendException("platform tweak requires exactly one child") + } + return + } + if (child != null) { + if (!registration.acceptsStandardChildren) { + throw LuiBackendException("extension does not accept standard children") + } + return + } + if (extensionChild == null || + !registration.childIdentifiers.contains(extensionChild.identifier) + ) { + throw LuiBackendException("extension child relationship is not registered") + } + return + } + if (parent == null || child == null) { + throw LuiBackendException("unknown parent or child node") + } + if (!LuiKindRules.canContainChildren(parent.kind)) { + throw LuiBackendException("parent cannot contain child") + } + if ((parent.kind == LuiNodeKind.dropdownMenu || parent.kind == LuiNodeKind.contextMenu) && + child.kind != LuiNodeKind.menuItem && + child.kind != LuiNodeKind.menuTrigger && + child.kind != LuiNodeKind.divider + ) { + throw LuiBackendException("menu accepts only menu-item or separator children") + } + if (parent.kind == LuiNodeKind.menuTrigger && child.kind != LuiNodeKind.dropdownMenu) { + throw LuiBackendException("menu-trigger accepts only a dropdown-menu child") + } + if (parent.kind == LuiNodeKind.menuItem && + child.kind != LuiNodeKind.contextMenu && + child.kind != LuiNodeKind.dropdownMenu + ) { + throw LuiBackendException("menu-item accepts only nested menu metadata") + } + if (parent.kind != LuiNodeKind.menuItem && + LuiKindRules.isContextMenuLeafHost(parent.kind) && + child.kind != LuiNodeKind.contextMenu + ) { + throw LuiBackendException("interactive leaf accepts only context-menu metadata") + } + if (parent.kind == LuiNodeKind.table && child.kind != LuiNodeKind.tableRow) { + throw LuiBackendException("table can contain only table-row") + } + if (parent.kind == LuiNodeKind.tableRow && child.kind != LuiNodeKind.tableCell) { + throw LuiBackendException("table-row can contain only table-cell") + } + if (parent.kind == LuiNodeKind.tree && !LuiKindRules.isTreeRowKind(child.kind)) { + throw LuiBackendException("tree accepts only row containers") + } + if (parent.kind == LuiNodeKind.stepper && child.kind != LuiNodeKind.step) { + throw LuiBackendException("stepper accepts only step children") + } + if (parent.kind == LuiNodeKind.timeline && child.kind != LuiNodeKind.timelineItem) { + throw LuiBackendException("timeline accepts only timeline-item children") + } + if (parent.kind == LuiNodeKind.bottomTabs && child.kind != LuiNodeKind.bottomTab) { + throw LuiBackendException("bottom-tabs accepts only bottom-tab children") + } + if (parent.kind == LuiNodeKind.bottomTab && child.kind == LuiNodeKind.bottomTab) { + throw LuiBackendException("bottom-tab cannot directly contain bottom-tab") + } + if (parent.kind == LuiNodeKind.inputGroup && + child.kind != LuiNodeKind.textarea && + child.kind != LuiNodeKind.inputGroupActions + ) { + throw LuiBackendException( + "input-group accepts only textarea and input-group-actions children", + ) + } + if (parent.kind == LuiNodeKind.toolbar && !LuiKindRules.isToolbarChild(child.kind)) { + throw LuiBackendException("toolbar accepts only interactive controls and dividers") + } + if (parent.kind == LuiNodeKind.listSection && + child.kind != LuiNodeKind.listItem && + child.kind != LuiNodeKind.listSectionHeader && + child.kind != LuiNodeKind.listSectionFooter + ) { + throw LuiBackendException( + "list-section accepts only list rows and section header/footer", + ) + } + if ((child.kind == LuiNodeKind.listSectionHeader || + child.kind == LuiNodeKind.listSectionFooter) && + parent.kind != LuiNodeKind.listSection + ) { + throw LuiBackendException("list-section header/footer requires a list-section parent") + } + if (child.kind == LuiNodeKind.listSection && parent.kind != LuiNodeKind.list) { + throw LuiBackendException("list-section requires a direct list parent") + } + if (child.kind == LuiNodeKind.swipeActions && parent.kind != LuiNodeKind.listItem) { + throw LuiBackendException("swipe-actions requires a list-item parent") + } + if (parent.kind == LuiNodeKind.swipeActions && child.kind != LuiNodeKind.swipeAction) { + throw LuiBackendException("swipe-actions accepts only swipe-action children") + } + if (child.kind == LuiNodeKind.swipeAction && parent.kind != LuiNodeKind.swipeActions) { + throw LuiBackendException("swipe-action requires a swipe-actions parent") + } + } + + private fun validateStates(nodes: Map) { + for (state in nodes.values) { + if (state.kind == LuiNodeKind.root) { + if (state.parent != null) { + throw LuiBackendException("runtime root cannot have a parent") + } + if (state.children.size != 1) { + throw LuiBackendException("runtime root requires exactly one child") + } + } + validateSizeAxis(state, "width", "min-width", "max-width") + validateSizeAxis(state, "height", "min-height", "max-height") + } + } + + private fun validateSizeAxis(state: LuiNode, size: String, min: String, max: String) { + val sizeValue = state.properties[size]?.intValue + val minValue = state.properties[min]?.intValue + val maxValue = state.properties[max]?.intValue + if (sizeValue != null && minValue != null && sizeValue < minValue) { + throw LuiBackendException("$size below $min") + } + if (sizeValue != null && maxValue != null && sizeValue > maxValue) { + throw LuiBackendException("$size above $max") + } + if (minValue != null && maxValue != null && minValue > maxValue) { + throw LuiBackendException("$min above $max") + } + } +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiTheme.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiTheme.kt new file mode 100644 index 00000000..00e734fb --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiTheme.kt @@ -0,0 +1,204 @@ +package dev.lui + +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.ColorScheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.lightColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.compositionLocalOf +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.TextStyle +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.jsonPrimitive + +/** + * LUI default theme — the "默认好看" surface. Views are authored with + * semantic tokens ("surface-container-high", "muted-foreground", "glass", + * "accent", ...); this file maps them onto a Material 3 colorScheme with + * carefully chosen defaults in both light and dark modes, mirroring + * `LUIThemePolicy.swift` (Apple) and the Flutter backend's `_color` table + * so all three hosts resolve the same token to an equivalent color. + */ + +/** Semantic-color overrides inherited down the tree (`theme` prop). */ +val LocalLuiSemanticColors = compositionLocalOf> { emptyMap() } + +/** Effective dark-mode flag inside the LUI tree (`theme-mode` prop, or a + * host-provided override). Null means "not provided" — fall back to the + * system setting. */ +val LocalLuiThemeDark = compositionLocalOf { null } + +/** Hex resolver shared by color-name props and theme tokens. Accepts + * `#rgb`, `#rgba`, `#rrggbb` and `#rrggbbaa` (CSS alpha-suffix). + * Returns null for non-hex names. */ +fun luiHexColor(name: String): Color? { + var value = if (name.startsWith("#")) name.substring(1) else name + if (value.length == 3 || value.length == 4) { + value = value.map { "$it$it" }.joinToString("") + } + if (value.length == 6) value = "ff$value" + if (value.length != 8) return null + val rgba = value.toULongOrNull(16) ?: return null + // CSS hex is #rrggbbaa; Color() takes ARGB. + val argb = ((rgba and 0xffUL) shl 24) or (rgba shr 8) + return Color(argb.toLong()) +} + +/** Resolves a semantic color name against the inherited token table then + * the Material 3 scheme, mirroring the Flutter `_color` mapping so both + * mobile hosts agree. [foreground] picks the "on-*" variant for pair + * tokens like `accent`/`secondary`/`warning`/`success`/`error`. */ +@Composable +fun luiThemeColor(name: String?, foreground: Boolean = false): Color? { + if (name == null) return null + val lower = name.lowercase() + LocalLuiSemanticColors.current[lower]?.let { return it } + val scheme = MaterialTheme.colorScheme + return when (lower) { + "transparent" -> Color.Transparent + "background" -> scheme.surface + "foreground" -> scheme.onSurface + "surface" -> scheme.surface + "surface-container-lowest" -> scheme.surfaceContainerLowest + "surface-container-low" -> scheme.surfaceContainerLow + "surface-container" -> scheme.surfaceContainer + "surface-container-high" -> scheme.surfaceContainerHigh + "surface-container-highest" -> scheme.surfaceContainerHighest + "surface-variant" -> scheme.surfaceContainerHighest + "autocomplete-row-background" -> scheme.surfaceContainerHigh + "glass" -> scheme.surface.copy(alpha = 0.75f) + "glass-fallback" -> scheme.surface.copy(alpha = 0.9f) + // Apple Material.bar approximation: mostly-opaque theme surface. + "bar" -> scheme.surface.copy(alpha = 0.85f) + "primary" -> scheme.primary + "primary-foreground" -> scheme.onPrimary + "accent" -> if (foreground) scheme.primary else scheme.secondaryContainer + "accent-foreground" -> + if (foreground) scheme.onPrimary else scheme.onSecondaryContainer + "secondary" -> + if (foreground) scheme.onSurfaceVariant else scheme.secondaryContainer + "secondary-foreground" -> scheme.onSecondaryContainer + "muted" -> scheme.surfaceContainerHigh + "muted-foreground" -> scheme.onSurfaceVariant + "destructive" -> scheme.error + "destructive-foreground" -> scheme.onError + "success" -> scheme.tertiaryContainer + "success-foreground" -> scheme.onTertiaryContainer + "warning" -> scheme.secondaryContainer + "warning-foreground" -> scheme.onSecondaryContainer + "error" -> scheme.errorContainer + "error-foreground" -> scheme.onErrorContainer + "border" -> scheme.outlineVariant + "black" -> Color.Black + "white" -> Color.White + "red" -> Color(0xFFB3261E) + "blue" -> Color(0xFF0061A4) + "green" -> Color(0xFF2E7D32) + else -> luiHexColor(lower) ?: Color.Transparent + } +} + +/** LUI's Material 3 defaults. The stock schemes already carry the M3 + * baseline palette (primary #6750A4 — the same accent the web backend + * uses for `data-lui-platform="android"`), so the defaults are genuinely + * Material-3 quality with no per-app tuning. Hosts can pass their own + * schemes to [LuiTheme]. */ +object LuiThemeDefaults { + fun lightScheme(): ColorScheme = lightColorScheme() + fun darkScheme(): ColorScheme = darkColorScheme() +} + +/** + * Applies the LUI theme: a Material 3 `MaterialTheme` plus the semantic + * token CompositionLocals LUI renderers resolve through. [dark] selects + * the scheme (`null` follows the system); [semanticColors] are merged + * over inherited tokens; [light]/[darkScheme] let a host override the + * base palette. + */ +@Composable +fun LuiTheme( + dark: Boolean? = null, + semanticColors: Map = emptyMap(), + light: ColorScheme = LuiThemeDefaults.lightScheme(), + darkScheme: ColorScheme = LuiThemeDefaults.darkScheme(), + content: @Composable () -> Unit, +) { + // An explicit [dark] wins, then an app-provided local, then the system. + val effectiveDark = dark ?: LocalLuiThemeDark.current ?: isSystemInDarkTheme() + MaterialTheme(colorScheme = if (effectiveDark) darkScheme else light) { + val inherited = LocalLuiSemanticColors.current + CompositionLocalProvider( + LocalLuiThemeDark provides effectiveDark, + LocalLuiSemanticColors provides inherited + semanticColors, + ) { + content() + } + } +} + +object LuiThemeTokenDecoder { + private val json = Json { ignoreUnknownKeys = true } + + /** Parses the `theme` wire prop into semantic-color entries consulted + * before platform defaults. A token value is either a color string + * used in both modes or a `{"light": ..., "dark": ...}` object picked + * by [dark]. Entries that do not decode to a color are ignored so + * non-color tokens can join the table later without breaking hosts. */ + fun colors(jsonSource: String?, dark: Boolean): Map { + if (jsonSource.isNullOrEmpty()) return emptyMap() + val obj = try { + json.parseToJsonElement(jsonSource) as? JsonObject + } catch (_: Exception) { + null + } ?: return emptyMap() + val colors = mutableMapOf() + for ((key, element) in obj) { + val raw = when { + element is kotlinx.serialization.json.JsonPrimitive && element.isString -> + element.content + element is JsonObject -> + element[if (dark) "dark" else "light"]?.jsonPrimitive?.content + else -> null + } ?: continue + val color = luiHexColor(raw) ?: continue + colors[key.lowercase()] = color + } + return colors + } + + fun colorScheme(value: String?): Boolean? = when (value) { + "dark" -> true + "light" -> false + else -> null + } +} + +object LuiTypography { + @Composable + fun headingStyle(level: Int): TextStyle { + val theme = MaterialTheme.typography + return when (level) { + 1 -> theme.headlineLarge + 2 -> theme.headlineMedium + 3 -> theme.titleLarge + 4 -> theme.titleMedium + 5 -> theme.titleSmall + else -> theme.labelLarge + } + } + + @Composable + fun textStyleForSize(size: String?): TextStyle { + val theme = MaterialTheme.typography + return when (size) { + "sm" -> theme.bodySmall + "lg" -> theme.titleMedium + "heading" -> theme.headlineSmall + "display" -> theme.displaySmall + else -> theme.bodyMedium + } + } +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiWire.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiWire.kt new file mode 100644 index 00000000..4a914988 --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiWire.kt @@ -0,0 +1,180 @@ +package dev.lui + +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonElement +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.JsonPrimitive +import kotlinx.serialization.json.boolean +import kotlinx.serialization.json.booleanOrNull +import kotlinx.serialization.json.doubleOrNull +import kotlinx.serialization.json.int +import kotlinx.serialization.json.intOrNull +import kotlinx.serialization.json.jsonArray +import kotlinx.serialization.json.jsonObject +import kotlinx.serialization.json.jsonPrimitive +import kotlinx.serialization.json.longOrNull + +class LuiBackendException(message: String) : Exception(message) + +/** Wire-level property value, mirroring OCaml `wire_value`. */ +sealed class LuiWireValue { + data class Str(val value: String) : LuiWireValue() + data class Bool(val value: Boolean) : LuiWireValue() + data class IntValue(val value: Int) : LuiWireValue() + data class DoubleValue(val value: Double) : LuiWireValue() + + val stringValue: String? get() = (this as? Str)?.value + val boolValue: Boolean? get() = (this as? Bool)?.value + val intValue: Int? get() = (this as? IntValue)?.value + val doubleValue: Double? + get() = when (this) { + is DoubleValue -> value + is IntValue -> value.toDouble() + else -> null + } + val numberValue: Double? + get() = when (this) { + is DoubleValue -> value + is IntValue -> value.toDouble() + else -> null + } + + /** JSON literal form, for extension-event payloads. */ + fun toJsonLiteral(): String = when (this) { + is Str -> JsonPrimitive(value).toString() + is Bool -> value.toString() + is IntValue -> value.toString() + is DoubleValue -> value.toString() + } + + /** Platform-neutral scalar form (String/Int/Double/Boolean). */ + val scalarValue: Any + get() = when (this) { + is Str -> value + is Bool -> value + is IntValue -> value + is DoubleValue -> value + } + + companion object { + fun of(element: JsonElement): LuiWireValue { + val primitive = element.jsonPrimitive + primitive.booleanOrNull?.let { return Bool(it) } + primitive.longOrNull?.let { return IntValue(it.toInt()) } + primitive.doubleOrNull?.let { return DoubleValue(it) } + if (primitive.isString) return Str(primitive.content) + throw LuiBackendException("unsupported wire value") + } + + fun toJson(value: LuiWireValue): Any = when (value) { + is Str -> value.value + is Bool -> value.value + is IntValue -> value.value + is DoubleValue -> value.value + } + } +} + +sealed class LuiPatchOp { + data class CreateNode(val id: Long, val kind: LuiNodeKind) : LuiPatchOp() + data class CreateExtension(val id: Long, val identifier: String, val fingerprint: String) : LuiPatchOp() + data class DropNode(val id: Long) : LuiPatchOp() + data class SetProp(val id: Long, val property: String, val value: LuiWireValue) : LuiPatchOp() + data class RemoveProp(val id: Long, val property: String) : LuiPatchOp() + data class SetExtensionProp(val id: Long, val property: String, val value: LuiWireValue) : LuiPatchOp() + data class RemoveExtensionProp(val id: Long, val property: String) : LuiPatchOp() + data class InsertChild(val parent: Long, val child: Long, val index: Int) : LuiPatchOp() + data class RemoveChild(val parent: Long, val child: Long) : LuiPatchOp() + data class MoveChild(val parent: Long, val child: Long, val index: Int) : LuiPatchOp() + + companion object { + private fun requiredInt(obj: JsonObject, key: String): Int = + obj[key]?.jsonPrimitive?.intOrNull + ?: throw LuiBackendException("missing or invalid '$key'") + + private fun requiredLong(obj: JsonObject, key: String): Long = + obj[key]?.jsonPrimitive?.longOrNull + ?: throw LuiBackendException("missing or invalid '$key'") + + private fun requiredString(obj: JsonObject, key: String): String = + obj[key]?.jsonPrimitive?.takeIf { it.isString }?.content + ?: throw LuiBackendException("missing or invalid '$key'") + + fun of(element: JsonElement): LuiPatchOp { + val obj = element as? JsonObject + ?: throw LuiBackendException("operation must be an object") + return when (val op = obj["op"]?.jsonPrimitive?.content) { + "create-node" -> CreateNode( + id = requiredLong(obj, "id"), + kind = LuiNodeKind.fromWire(requiredString(obj, "kind")) + ?: throw LuiBackendException("unknown node kind"), + ) + "create-extension" -> CreateExtension( + id = requiredLong(obj, "id"), + identifier = requiredString(obj, "identifier"), + fingerprint = requiredString(obj, "fingerprint"), + ) + "drop-node" -> DropNode(id = requiredLong(obj, "id")) + "set-prop" -> SetProp( + id = requiredLong(obj, "id"), + property = requiredString(obj, "property"), + value = LuiWireValue.of( + obj["value"] ?: throw LuiBackendException("missing 'value'"), + ), + ) + "remove-prop" -> RemoveProp( + id = requiredLong(obj, "id"), + property = requiredString(obj, "property"), + ) + "set-extension-prop" -> SetExtensionProp( + id = requiredLong(obj, "id"), + property = requiredString(obj, "property"), + value = LuiWireValue.of( + obj["value"] ?: throw LuiBackendException("missing 'value'"), + ), + ) + "remove-extension-prop" -> RemoveExtensionProp( + id = requiredLong(obj, "id"), + property = requiredString(obj, "property"), + ) + "insert-child" -> InsertChild( + parent = requiredLong(obj, "parent"), + child = requiredLong(obj, "child"), + index = requiredInt(obj, "index"), + ) + "remove-child" -> RemoveChild( + parent = requiredLong(obj, "parent"), + child = requiredLong(obj, "child"), + ) + "move-child" -> MoveChild( + parent = requiredLong(obj, "parent"), + child = requiredLong(obj, "child"), + index = requiredInt(obj, "index"), + ) + else -> throw LuiBackendException("unknown patch operation: $op") + } + } + } +} + +class LuiPatchBatch(val generation: Int, val ops: List) { + companion object { + private val json = Json { ignoreUnknownKeys = true } + + fun parse(source: String): LuiPatchBatch { + val decoded = try { + json.parseToJsonElement(source) + } catch (error: Exception) { + throw LuiBackendException(error.message ?: "invalid patch batch") + } + val obj = decoded as? JsonObject + ?: throw LuiBackendException("patch batch must be an object") + val generation = obj["generation"]?.jsonPrimitive?.intOrNull + ?: throw LuiBackendException("missing 'generation'") + val ops = (obj["ops"] as? kotlinx.serialization.json.JsonArray) + ?.map(LuiPatchOp::of) + ?: throw LuiBackendException("missing 'ops'") + return LuiPatchBatch(generation, ops) + } + } +} diff --git a/platform/android/lui/src/main/kotlin/dev/lui/LuiWireSchema.kt b/platform/android/lui/src/main/kotlin/dev/lui/LuiWireSchema.kt new file mode 100644 index 00000000..c1200bc5 --- /dev/null +++ b/platform/android/lui/src/main/kotlin/dev/lui/LuiWireSchema.kt @@ -0,0 +1,258 @@ +// Generated from schema/components.json. Do not edit by hand. +package dev.lui + +enum class LuiNodeKind(val wireName: String, val isContainer: Boolean) { + root("root", true), + row("row", true), + column("column", true), + grid("grid", true), + stack("stack", true), + edgeInset("edge-inset", true), + overlay("overlay", true), + viewThatFits("view-that-fits", true), + panel("panel", true), + card("card", true), + alert("alert", true), + bubble("bubble", true), + box("box", true), + text("text", true), + heading("heading", true), + paragraph("paragraph", true), + label("label", true), + button("button", true), + toggleButton("toggle-button", false), + toggle("toggle", false), + radioGroup("radio-group", true), + radio("radio", false), + slider("slider", false), + numberStepper("number-stepper", false), + textField("text-field", false), + secureField("secure-field", false), + input("input", false), + searchField("search-field", false), + textarea("textarea", false), + checkbox("checkbox", false), + switchControl("switch", false), + progress("progress", false), + divider("divider", false), + scroll("scroll", true), + list("list", true), + virtualList("virtual-list", true), + tabs("tabs", true), + bottomTabs("bottom-tabs", true), + bottomTab("bottom-tab", true), + buttonGroup("button-group", true), + toggleGroup("toggle-group", true), + spacer("spacer", false), + spinner("spinner", false), + icon("icon", false), + select("select", false), + combobox("combobox", false), + dropdownMenu("dropdown-menu", true), + contextMenu("context-menu", true), + menuItem("menu-item", true), + menuTrigger("menu-trigger", true), + listItem("list-item", true), + avatar("avatar", false), + image("image", false), + mediaSurface("media-surface", false), + stepper("stepper", true), + step("step", false), + timeline("timeline", true), + timelineItem("timeline-item", false), + inputGroup("input-group", true), + inputGroupActions("input-group-actions", true), + breadcrumb("breadcrumb", true), + pagination("pagination", true), + accordion("accordion", true), + table("table", true), + tableRow("table-row", true), + tableCell("table-cell", false), + tree("tree", true), + resizable("resizable", true), + split("split", true), + dialog("dialog", true), + drawer("drawer", true), + sheet("sheet", true), + tooltip("tooltip", false), + toast("toast", true), + toolbar("toolbar", true), + statusBar("status-bar", false), + listSection("list-section", true), + listSectionHeader("list-section-header", true), + listSectionFooter("list-section-footer", true), + swipeActions("swipe-actions", true), + swipeAction("swipe-action", false), + filePicker("file-picker", true), + kbd("kbd", false), + link("link", true), + fileImage("file-image", false), + filePreview("file-preview", false), + br("br", false), + popover("popover", true), + ; + + companion object { + private val byWire: Map = entries.associateBy { it.wireName } + + fun fromWire(wire: String): LuiNodeKind? = byWire[wire] + } +} + +enum class LuiProperty(val wireName: String) { + text("text"), + enabled("enabled"), + gap("gap"), + main("main"), + cross("cross"), + grow("grow"), + columns("columns"), + padding("padding"), + paddingHorizontal("padding-horizontal"), + paddingVertical("padding-vertical"), + background("background"), + foreground("foreground"), + borderColor("border-color"), + borderWidth("border-width"), + cornerRadius("corner-radius"), + width("width"), + height("height"), + minWidth("min-width"), + maxWidth("max-width"), + minHeight("min-height"), + maxHeight("max-height"), + containerRelativeFrame("container-relative-frame"), + containerRelativeFrameInset("container-relative-frame-inset"), + placeholder("placeholder"), + accessibilityLabel("accessibility-label"), + accessibilityIdentifier("accessibility-identifier"), + styleClass("style-class"), + headingLevel("heading-level"), + checked("checked"), + progressValue("value"), + orientation("orientation"), + placement("placement"), + size("size"), + propName("name"), + variant("variant"), + icon("icon"), + iconPlacement("icon-placement"), + selected("selected"), + autofocus("autofocus"), + submitOnEnter("submit-on-enter"), + longPressEnabled("long-press-enabled"), + changeEnabled("change-enabled"), + toggleEnabled("toggle-enabled"), + pressEnabled("press-enabled"), + submitEnabled("submit-enabled"), + doublePressEnabled("double-press-enabled"), + appearEnabled("appear-enabled"), + image("image"), + surface("surface"), + active("active"), + title("title"), + description("description"), + meta("meta"), + indicator("indicator"), + connector("connector"), + sourceX("source-x"), + sourceY("source-y"), + sourceWidth("source-width"), + sourceHeight("source-height"), + anchor("anchor"), + anchorAlignment("anchor-alignment"), + anchorOffset("anchor-offset"), + tooltipDelay("tooltip-delay"), + duration("duration"), + textAlignment("text-alignment"), + role("role"), + treeLevel("tree-level"), + expanded("expanded"), + resizeDuration("resize-duration"), + resizeEasing("resize-easing"), + resizeOrigin("resize-origin"), + theme("theme"), + themeMode("theme-mode"), + key("key"), + separator("separator"), + style("style"), + scrollTarget("scroll-target"), + scrollAnchor("scroll-anchor"), + scrollToken("scroll-token"), + scrollAnimated("scroll-animated"), + trackVisibleRange("track-visible-range"), + edge("edge"), + request("request"), + types("types"), + multiple("multiple"), + source("source"), + completion("completion"), + minValue("min"), + maxValue("max"), + stepValue("step"), + detents("detents"), + sizing("sizing"), + path("path"), + url("url"), + maxPixelSize("max-pixel-size"), + imageFit("image-fit"), + visible("visible"), + alignment("alignment"), + pointerEnabled("pointer-enabled"), + dataAttrs("data-attrs"), + asTag("as"), + alt("alt"), + loading("loading"), + referrerPolicy("referrer-policy"), + target("target"), + opacity("opacity"), + display("display"), + tooltip("tooltip"), + tooltipKeys("tooltip-keys"), + inputType("input-type"), + pickerAccept("accept"), + pickerDirectory("directory"), + popupX("x"), + popupY("y"), + availableHeight("available-height"), + ; + + companion object { + private val byWire: Map = entries.associateBy { it.wireName } + + fun fromWire(wire: String): LuiProperty? = byWire[wire] + } +} + +/** + * Mirrors schema/components.json kindProperties: kinds listed here admit + * ONLY the given kind-specific props (plus the shared/common set), instead of + * the default "common set" behaviour for unlisted kinds. Absence means the + * kind follows the common-property rules in the backend. + */ +object LuiSchemaMatrix { + val restrictive: Map> = mapOf( + LuiNodeKind.accordion to setOf(LuiProperty.text, LuiProperty.selected, LuiProperty.toggleEnabled, LuiProperty.height, LuiProperty.pointerEnabled), + LuiNodeKind.stepper to setOf(LuiProperty.active, LuiProperty.accessibilityLabel, LuiProperty.pointerEnabled), + LuiNodeKind.step to setOf(LuiProperty.text, LuiProperty.pointerEnabled), + LuiNodeKind.timeline to setOf(LuiProperty.gap, LuiProperty.grow, LuiProperty.accessibilityLabel, LuiProperty.pointerEnabled), + LuiNodeKind.timelineItem to setOf(LuiProperty.title, LuiProperty.description, LuiProperty.meta, LuiProperty.indicator, LuiProperty.icon, LuiProperty.variant, LuiProperty.connector, LuiProperty.selected, LuiProperty.pressEnabled, LuiProperty.pointerEnabled), + LuiNodeKind.inputGroup to setOf(LuiProperty.accessibilityLabel, LuiProperty.width, LuiProperty.height, LuiProperty.minWidth, LuiProperty.grow, LuiProperty.pointerEnabled), + LuiNodeKind.inputGroupActions to setOf(LuiProperty.gap, LuiProperty.pointerEnabled), + LuiNodeKind.toast to setOf(LuiProperty.duration, LuiProperty.accessibilityLabel, LuiProperty.styleClass, LuiProperty.dataAttrs, LuiProperty.pointerEnabled), + LuiNodeKind.toolbar to setOf(LuiProperty.orientation, LuiProperty.accessibilityLabel, LuiProperty.gap, LuiProperty.styleClass, LuiProperty.dataAttrs, LuiProperty.placement, LuiProperty.pointerEnabled), + LuiNodeKind.bottomTabs to setOf(LuiProperty.accessibilityLabel, LuiProperty.styleClass, LuiProperty.dataAttrs, LuiProperty.grow, LuiProperty.width, LuiProperty.height, LuiProperty.minWidth, LuiProperty.maxWidth, LuiProperty.minHeight, LuiProperty.maxHeight, LuiProperty.pointerEnabled), + LuiNodeKind.bottomTab to setOf(LuiProperty.title, LuiProperty.icon, LuiProperty.selected, LuiProperty.enabled, LuiProperty.pressEnabled, LuiProperty.pointerEnabled), + LuiNodeKind.menuTrigger to setOf(LuiProperty.text, LuiProperty.icon, LuiProperty.accessibilityLabel, LuiProperty.enabled, LuiProperty.foreground, LuiProperty.styleClass, LuiProperty.dataAttrs, LuiProperty.pointerEnabled), + LuiNodeKind.listSection to setOf(LuiProperty.key, LuiProperty.separator, LuiProperty.pointerEnabled), + LuiNodeKind.swipeActions to setOf(), + LuiNodeKind.swipeAction to setOf(LuiProperty.text, LuiProperty.icon, LuiProperty.variant, LuiProperty.edge, LuiProperty.enabled, LuiProperty.background, LuiProperty.pressEnabled, LuiProperty.pointerEnabled), + LuiNodeKind.filePicker to setOf(LuiProperty.request, LuiProperty.types, LuiProperty.multiple, LuiProperty.source, LuiProperty.completion, LuiProperty.pickerAccept, LuiProperty.pickerDirectory, LuiProperty.enabled, LuiProperty.appearEnabled, LuiProperty.pointerEnabled), + LuiNodeKind.filePreview to setOf(LuiProperty.path, LuiProperty.pointerEnabled), + LuiNodeKind.kbd to setOf(LuiProperty.text, LuiProperty.styleClass, LuiProperty.dataAttrs, LuiProperty.pointerEnabled), + ) + + val extra: Map> = mapOf( + LuiNodeKind.dialog to setOf(LuiProperty.description), + ) +} diff --git a/platform/android/lui/src/test/kotlin/dev/lui/LuiScreenshotTest.kt b/platform/android/lui/src/test/kotlin/dev/lui/LuiScreenshotTest.kt new file mode 100644 index 00000000..453881ff --- /dev/null +++ b/platform/android/lui/src/test/kotlin/dev/lui/LuiScreenshotTest.kt @@ -0,0 +1,240 @@ +package dev.lui + +import app.cash.paparazzi.DeviceConfig +import app.cash.paparazzi.Paparazzi +import org.junit.Rule +import org.junit.Test + +/** + * Screenshot coverage for the Kotlin backend's default theme (light AND + * dark) at phone size. Trees are fed through the real wire path — + * applyBatch on hand-written patch JSON — so the shots exercise the same + * parse/store/render pipeline the gallery uses. + */ +class LuiScreenshotTest { + + @get:Rule + val paparazzi = Paparazzi( + deviceConfig = DeviceConfig.PIXEL_5.copy(softButtons = false), + ) + + private fun backendFor(vararg batches: String): LuiBackend { + val backend = LuiBackend() + batches.forEachIndexed { index, json -> + check(backend.applyBatch(json)) { "batch $index rejected: ${backend.lastError}" } + } + return backend + } + + private fun snapshot(name: String, backend: LuiBackend, dark: Boolean) { + paparazzi.snapshot(name = name) { + LuiTheme(dark = dark) { + androidx.compose.material3.Surface( + color = androidx.compose.material3.MaterialTheme.colorScheme.background, + ) { + backend.Content() + } + } + } + } + + private fun galleryScreen(dark: Boolean) { + // A representative settings-style screen: toolbar, card with + // controls, list items, and a bottom tab bar. + val backend = backendFor( + """ + {"generation":1,"ops":[ + {"op":"create-node","id":1,"kind":"root"}, + {"op":"create-node","id":2,"kind":"column"}, + {"op":"insert-child","parent":1,"child":2,"index":0}, + {"op":"set-prop","id":2,"property":"gap","value":16}, + {"op":"set-prop","id":2,"property":"padding","value":16}, + + {"op":"create-node","id":3,"kind":"heading"}, + {"op":"insert-child","parent":2,"child":3,"index":0}, + {"op":"set-prop","id":3,"property":"text","value":"Components"}, + {"op":"set-prop","id":3,"property":"heading-level","value":3}, + + {"op":"create-node","id":4,"kind":"card"}, + {"op":"insert-child","parent":2,"child":4,"index":1}, + {"op":"create-node","id":5,"kind":"column"}, + {"op":"insert-child","parent":4,"child":5,"index":0}, + {"op":"set-prop","id":5,"property":"gap","value":12}, + + {"op":"create-node","id":6,"kind":"text"}, + {"op":"insert-child","parent":5,"child":6,"index":0}, + {"op":"set-prop","id":6,"property":"text", + "value":"Polished Material 3 defaults — no per-app CSS."}, + + {"op":"create-node","id":7,"kind":"row"}, + {"op":"insert-child","parent":5,"child":7,"index":1}, + {"op":"set-prop","id":7,"property":"gap","value":8}, + + {"op":"create-node","id":8,"kind":"button"}, + {"op":"insert-child","parent":7,"child":8,"index":0}, + {"op":"set-prop","id":8,"property":"text","value":"Primary"}, + {"op":"set-prop","id":8,"property":"variant","value":"primary"}, + + {"op":"create-node","id":9,"kind":"button"}, + {"op":"insert-child","parent":7,"child":9,"index":1}, + {"op":"set-prop","id":9,"property":"text","value":"Secondary"}, + {"op":"set-prop","id":9,"property":"variant","value":"secondary"}, + + {"op":"create-node","id":10,"kind":"button"}, + {"op":"insert-child","parent":7,"child":10,"index":2}, + {"op":"set-prop","id":10,"property":"text","value":"Outline"}, + {"op":"set-prop","id":10,"property":"variant","value":"outline"}, + + {"op":"create-node","id":11,"kind":"text-field"}, + {"op":"insert-child","parent":5,"child":11,"index":2}, + {"op":"set-prop","id":11,"property":"placeholder", + "value":"Search components"}, + + {"op":"create-node","id":12,"kind":"row"}, + {"op":"insert-child","parent":5,"child":12,"index":3}, + {"op":"set-prop","id":12,"property":"gap","value":16}, + {"op":"set-prop","id":12,"property":"main","value":"start"}, + + {"op":"create-node","id":13,"kind":"switch"}, + {"op":"insert-child","parent":12,"child":13,"index":0}, + {"op":"set-prop","id":13,"property":"text","value":"Enabled"}, + {"op":"set-prop","id":13,"property":"checked","value":true}, + + {"op":"create-node","id":14,"kind":"checkbox"}, + {"op":"insert-child","parent":12,"child":14,"index":1}, + {"op":"set-prop","id":14,"property":"text","value":"Remember"}, + + {"op":"create-node","id":15,"kind":"slider"}, + {"op":"insert-child","parent":5,"child":15,"index":4}, + {"op":"set-prop","id":15,"property":"value","value":0.65}, + + {"op":"create-node","id":16,"kind":"progress"}, + {"op":"insert-child","parent":5,"child":16,"index":5}, + {"op":"set-prop","id":16,"property":"value","value":0.4}, + + {"op":"create-node","id":19,"kind":"list"}, + {"op":"insert-child","parent":2,"child":19,"index":2}, + {"op":"create-node","id":20,"kind":"list-section"}, + {"op":"insert-child","parent":19,"child":20,"index":0}, + {"op":"create-node","id":21,"kind":"list-item"}, + {"op":"insert-child","parent":20,"child":21,"index":0}, + {"op":"set-prop","id":21,"property":"text","value":"Inbox"}, + {"op":"set-prop","id":21,"property":"icon","value":"folder"}, + {"op":"set-prop","id":21,"property":"press-enabled","value":true}, + {"op":"create-node","id":22,"kind":"list-item"}, + {"op":"insert-child","parent":20,"child":22,"index":1}, + {"op":"set-prop","id":22,"property":"text","value":"Settings"}, + {"op":"set-prop","id":22,"property":"icon","value":"settings"}, + {"op":"set-prop","id":22,"property":"press-enabled","value":true}, + {"op":"create-node","id":24,"kind":"list-item"}, + {"op":"insert-child","parent":20,"child":24,"index":2}, + {"op":"set-prop","id":24,"property":"text","value":"About"}, + {"op":"set-prop","id":24,"property":"icon","value":"info"}, + {"op":"set-prop","id":24,"property":"press-enabled","value":true} + ]} + """.trimIndent(), + ) + snapshot(if (dark) "gallery-dark" else "gallery-light", backend, dark) + } + + @Test + fun galleryLight() = galleryScreen(dark = false) + + @Test + fun galleryDark() = galleryScreen(dark = true) + + private fun controlsScreen(dark: Boolean) { + val backend = backendFor( + """ + {"generation":1,"ops":[ + {"op":"create-node","id":1,"kind":"root"}, + {"op":"create-node","id":2,"kind":"column"}, + {"op":"insert-child","parent":1,"child":2,"index":0}, + {"op":"set-prop","id":2,"property":"gap","value":12}, + {"op":"set-prop","id":2,"property":"padding","value":16}, + + {"op":"create-node","id":3,"kind":"tabs"}, + {"op":"insert-child","parent":2,"child":3,"index":0}, + {"op":"create-node","id":4,"kind":"button"}, + {"op":"insert-child","parent":3,"child":4,"index":0}, + {"op":"set-prop","id":4,"property":"text","value":"Feed"}, + {"op":"set-prop","id":4,"property":"selected","value":true}, + {"op":"create-node","id":5,"kind":"button"}, + {"op":"insert-child","parent":3,"child":5,"index":1}, + {"op":"set-prop","id":5,"property":"text","value":"Saved"}, + {"op":"create-node","id":6,"kind":"button"}, + {"op":"insert-child","parent":3,"child":6,"index":2}, + {"op":"set-prop","id":6,"property":"text","value":"Settings"}, + + {"op":"create-node","id":7,"kind":"row"}, + {"op":"insert-child","parent":2,"child":7,"index":1}, + {"op":"set-prop","id":7,"property":"gap","value":12}, + + {"op":"create-node","id":8,"kind":"avatar"}, + {"op":"insert-child","parent":7,"child":8,"index":0}, + {"op":"set-prop","id":8,"property":"text","value":"JD"}, + + {"op":"create-node","id":9,"kind":"column"}, + {"op":"insert-child","parent":7,"child":9,"index":1}, + {"op":"set-prop","id":9,"property":"gap","value":2}, + {"op":"create-node","id":10,"kind":"text"}, + {"op":"insert-child","parent":9,"child":10,"index":0}, + {"op":"set-prop","id":10,"property":"text","value":"Jane Doe"}, + {"op":"create-node","id":11,"kind":"text"}, + {"op":"insert-child","parent":9,"child":11,"index":1}, + {"op":"set-prop","id":11,"property":"text", + "value":"jane@example.com"}, + {"op":"set-prop","id":11,"property":"foreground", + "value":"muted-foreground"}, + + {"op":"create-node","id":13,"kind":"radio-group"}, + {"op":"insert-child","parent":2,"child":13,"index":2}, + {"op":"create-node","id":14,"kind":"radio"}, + {"op":"insert-child","parent":13,"child":14,"index":0}, + {"op":"set-prop","id":14,"property":"text","value":"Daily"}, + {"op":"set-prop","id":14,"property":"checked","value":true}, + {"op":"create-node","id":15,"kind":"radio"}, + {"op":"insert-child","parent":13,"child":15,"index":1}, + {"op":"set-prop","id":15,"property":"text","value":"Weekly"}, + + {"op":"create-node","id":16,"kind":"alert"}, + {"op":"insert-child","parent":2,"child":16,"index":3}, + {"op":"set-prop","id":16,"property":"text","value":"Heads up"}, + {"op":"create-node","id":17,"kind":"text"}, + {"op":"insert-child","parent":16,"child":17,"index":0}, + {"op":"set-prop","id":17,"property":"text", + "value":"Sync finished with 3 warnings."}, + + {"op":"create-node","id":18,"kind":"accordion"}, + {"op":"insert-child","parent":2,"child":18,"index":4}, + {"op":"set-prop","id":18,"property":"text","value":"Advanced"}, + {"op":"set-prop","id":18,"property":"selected","value":true}, + {"op":"create-node","id":19,"kind":"text"}, + {"op":"insert-child","parent":18,"child":19,"index":0}, + {"op":"set-prop","id":19,"property":"text", + "value":"Hidden details stay reachable."}, + + {"op":"create-node","id":25,"kind":"stepper"}, + {"op":"insert-child","parent":2,"child":25,"index":5}, + {"op":"set-prop","id":25,"property":"active","value":1}, + {"op":"create-node","id":26,"kind":"step"}, + {"op":"insert-child","parent":25,"child":26,"index":0}, + {"op":"set-prop","id":26,"property":"text","value":"Account"}, + {"op":"create-node","id":27,"kind":"step"}, + {"op":"insert-child","parent":25,"child":27,"index":1}, + {"op":"set-prop","id":27,"property":"text","value":"Profile"}, + {"op":"create-node","id":28,"kind":"step"}, + {"op":"insert-child","parent":25,"child":28,"index":2}, + {"op":"set-prop","id":28,"property":"text","value":"Done"} + ]} + """.trimIndent(), + ) + snapshot(if (dark) "controls-dark" else "controls-light", backend, dark) + } + + @Test + fun controlsLight() = controlsScreen(dark = false) + + @Test + fun controlsDark() = controlsScreen(dark = true) +} diff --git a/platform/android/lui/src/test/kotlin/dev/lui/LuiStoreTest.kt b/platform/android/lui/src/test/kotlin/dev/lui/LuiStoreTest.kt new file mode 100644 index 00000000..25110237 --- /dev/null +++ b/platform/android/lui/src/test/kotlin/dev/lui/LuiStoreTest.kt @@ -0,0 +1,238 @@ +package dev.lui + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertThrows +import org.junit.Assert.assertTrue +import org.junit.Test + +class LuiStoreTest { + + private fun tree() = LuiRetainedTree(LuiExtensionRegistry()) + + private fun batch(generation: Int, vararg ops: LuiPatchOp) = + LuiPatchBatch(generation, ops.toList()) + + @Test + fun `applies create insert set-prop and drop in order`() { + val tree = tree() + tree.apply( + batch( + 1, + LuiPatchOp.CreateNode(1L, LuiNodeKind.root), + LuiPatchOp.CreateNode(2L, LuiNodeKind.column), + LuiPatchOp.InsertChild(1L, 2L, 0), + LuiPatchOp.SetProp(2, "gap", LuiWireValue.IntValue(8)), + ), + ) + assertEquals(1, tree.generation) + assertEquals(listOf(1L), tree.rootIds) + assertEquals(listOf(2L), tree.nodes[1L]!!.children) + assertEquals(1L, tree.nodes[2L]!!.parent) + assertEquals(LuiWireValue.IntValue(8), tree.nodes[2L]!!.properties["gap"]) + + tree.apply( + batch( + 2, + LuiPatchOp.CreateNode(3L, LuiNodeKind.text), + LuiPatchOp.InsertChild(1L, 3L, 1), + LuiPatchOp.RemoveChild(1L, 2L), + LuiPatchOp.DropNode(2L), + ), + ) + assertNull(tree.nodes[2L]) + assertEquals(listOf(3L), tree.nodes[1L]!!.children) + assertEquals(setOf(2L), tree.lastDropped) + } + + @Test + fun `rejects generation gaps`() { + val tree = tree() + tree.apply( + batch( + 1, + LuiPatchOp.CreateNode(1L, LuiNodeKind.root), + LuiPatchOp.CreateNode(2L, LuiNodeKind.column), + LuiPatchOp.InsertChild(1L, 2L, 0), + ), + ) + val error = assertThrows(LuiBackendException::class.java) { + tree.apply(batch(3, LuiPatchOp.CreateNode(5L, LuiNodeKind.column))) + } + assertTrue(error.message!!.contains("generation 2")) + assertNull(tree.nodes[5L]) + } + + @Test + fun `rolls the whole batch back on failure`() { + val tree = tree() + tree.apply( + batch( + 1, + LuiPatchOp.CreateNode(1L, LuiNodeKind.root), + LuiPatchOp.CreateNode(2L, LuiNodeKind.column), + LuiPatchOp.InsertChild(1L, 2L, 0), + ), + ) + assertThrows(LuiBackendException::class.java) { + tree.apply( + batch( + 2, + LuiPatchOp.CreateNode(3L, LuiNodeKind.text), + // Attach an unknown parent -> whole batch must roll back. + LuiPatchOp.InsertChild(99L, 3L, 0), + ), + ) + } + assertEquals(1, tree.generation) + assertNull(tree.nodes[3L]) + } + + @Test + fun `set-prop validates against the kind matrix`() { + val tree = tree() + tree.apply( + batch( + 1, + LuiPatchOp.CreateNode(1L, LuiNodeKind.root), + LuiPatchOp.CreateNode(2L, LuiNodeKind.text), + LuiPatchOp.InsertChild(1L, 2L, 0), + ), + ) + tree.apply( + batch(2, LuiPatchOp.SetProp(2, "text", LuiWireValue.Str("hi"))), + ) + assertEquals(LuiWireValue.Str("hi"), tree.nodes[2L]!!.properties["text"]) + } + + @Test + fun `move-child reorders within a parent`() { + val tree = tree() + tree.apply( + batch( + 1, + LuiPatchOp.CreateNode(1L, LuiNodeKind.root), + LuiPatchOp.CreateNode(2L, LuiNodeKind.column), + LuiPatchOp.CreateNode(3L, LuiNodeKind.text), + LuiPatchOp.CreateNode(4L, LuiNodeKind.text), + LuiPatchOp.InsertChild(1L, 2L, 0), + LuiPatchOp.InsertChild(2L, 3L, 0), + LuiPatchOp.InsertChild(2L, 4L, 1), + ), + ) + tree.apply(batch(2, LuiPatchOp.MoveChild(2L, 4L, 0))) + assertEquals(listOf(4L, 3L), tree.nodes[2L]!!.children) + } + + @Test + fun `drop-node requires a detached node`() { + val tree = tree() + tree.apply( + batch( + 1, + LuiPatchOp.CreateNode(1L, LuiNodeKind.root), + LuiPatchOp.CreateNode(2L, LuiNodeKind.column), + LuiPatchOp.InsertChild(1L, 2L, 0), + ), + ) + assertThrows(LuiBackendException::class.java) { + tree.apply(batch(2, LuiPatchOp.DropNode(2L))) + } + assertEquals(1, tree.generation) + } + + @Test + fun `insert-child rejects cycles`() { + val tree = tree() + tree.apply( + batch( + 1, + LuiPatchOp.CreateNode(1L, LuiNodeKind.root), + LuiPatchOp.CreateNode(2L, LuiNodeKind.column), + LuiPatchOp.CreateNode(3L, LuiNodeKind.column), + LuiPatchOp.InsertChild(1L, 2L, 0), + LuiPatchOp.InsertChild(2L, 3L, 0), + ), + ) + // Attaching the root under a descendant would create a cycle. + assertThrows(LuiBackendException::class.java) { + tree.apply(batch(2, LuiPatchOp.InsertChild(3L, 1L, 0))) + } + assertNull(tree.nodes[1L]!!.parent) + } + + @Test + fun `extension nodes validate fingerprint and defaults`() { + val registry = LuiExtensionRegistry() + registry.register( + identifier = "chart", + fingerprint = "fp-1", + properties = listOf( + LuiExtensionProperty( + "title", + LuiExtensionValueKind.STRING, + defaultValue = LuiWireValue.Str("untitled"), + ), + ), + builder = {}, + ) + val tree = LuiRetainedTree(registry) + assertThrows(LuiBackendException::class.java) { + tree.apply( + batch(1, LuiPatchOp.CreateExtension(1, "chart", "wrong-fp")), + ) + } + tree.apply( + batch( + 1, + LuiPatchOp.CreateExtension(1, "chart", "fp-1"), + ), + ) + assertEquals("chart", tree.extensionNodes[1]!!.identifier) + assertEquals( + LuiWireValue.Str("untitled"), + tree.extensionNodes[1]!!.properties["title"], + ) + + tree.apply( + batch(2, LuiPatchOp.SetExtensionProp(1, "title", LuiWireValue.Str("q1"))), + ) + // apply() swaps in fresh node copies, so re-read after each batch. + assertEquals( + LuiWireValue.Str("q1"), + tree.extensionNodes[1]!!.properties["title"], + ) + // Removing restores the declared default. + tree.apply(batch(3, LuiPatchOp.RemoveExtensionProp(1, "title"))) + assertEquals( + LuiWireValue.Str("untitled"), + tree.extensionNodes[1]!!.properties["title"], + ) + } + + @Test + fun `backend reports failure without touching state`() { + val backend = LuiBackend() + assertTrue( + backend.applyBatch( + """{"generation":1,"ops":[ + {"op":"create-node","id":1,"kind":"root"}, + {"op":"create-node","id":9,"kind":"column"}, + {"op":"insert-child","parent":1,"child":9,"index":0} + ]}""", + ), + ) + assertFalse( + backend.applyBatch( + """{"generation":5,"ops":[]}""", + ), + ) + // A rejected batch leaves the committed generation untouched. + assertTrue( + backend.applyBatch( + """{"generation":2,"ops":[{"op":"create-node","id":2,"kind":"text"}]}""", + ), + ) + } +} diff --git a/platform/android/lui/src/test/kotlin/dev/lui/LuiWireTest.kt b/platform/android/lui/src/test/kotlin/dev/lui/LuiWireTest.kt new file mode 100644 index 00000000..6ad9748f --- /dev/null +++ b/platform/android/lui/src/test/kotlin/dev/lui/LuiWireTest.kt @@ -0,0 +1,122 @@ +package dev.lui + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertThrows +import org.junit.Assert.assertTrue +import org.junit.Test + +class LuiWireTest { + + @Test + fun `parses a patch batch with every op kind`() { + val batch = LuiPatchBatch.parse( + """ + { + "generation": 1, + "ops": [ + {"op": "create-node", "id": 1, "kind": "root"}, + {"op": "create-node", "id": 2, "kind": "column"}, + {"op": "insert-child", "parent": 1, "child": 2, "index": 0}, + {"op": "set-prop", "id": 2, "property": "gap", "value": 8}, + {"op": "remove-prop", "id": 2, "property": "gap"}, + {"op": "move-child", "parent": 1, "child": 2, "index": 0}, + {"op": "remove-child", "parent": 1, "child": 2}, + {"op": "create-extension", "id": 9, "identifier": "split-view", + "fingerprint": "fp"}, + {"op": "set-extension-prop", "id": 9, "property": "title", + "value": "hi"}, + {"op": "remove-extension-prop", "id": 9, "property": "title"}, + {"op": "drop-node", "id": 2} + ] + } + """.trimIndent(), + ) + assertEquals(1, batch.generation) + assertEquals(11, batch.ops.size) + assertEquals( + LuiPatchOp.CreateNode(1L, LuiNodeKind.root), + batch.ops[0], + ) + assertEquals( + LuiPatchOp.InsertChild(parent = 1, child = 2, index = 0), + batch.ops[2], + ) + assertEquals( + LuiPatchOp.SetProp(2, "gap", LuiWireValue.IntValue(8)), + batch.ops[3], + ) + assertEquals( + LuiPatchOp.CreateExtension(9, "split-view", "fp"), + batch.ops[7], + ) + assertEquals( + LuiPatchOp.SetExtensionProp(9, "title", LuiWireValue.Str("hi")), + batch.ops[8], + ) + assertEquals(LuiPatchOp.DropNode(2L), batch.ops[10]) + } + + @Test + fun `decodes all wire value kinds`() { + val batch = LuiPatchBatch.parse( + """ + {"generation": 1, "ops": [ + {"op": "set-prop", "id": 1, "property": "text", "value": "hello"}, + {"op": "set-prop", "id": 1, "property": "enabled", "value": true}, + {"op": "set-prop", "id": 1, "property": "width", "value": 42}, + {"op": "set-prop", "id": 1, "property": "value", "value": 0.5} + ]} + """.trimIndent(), + ) + val values = batch.ops.map { (it as LuiPatchOp.SetProp).value } + assertEquals(LuiWireValue.Str("hello"), values[0]) + assertEquals(LuiWireValue.Bool(true), values[1]) + assertEquals(LuiWireValue.IntValue(42), values[2]) + assertEquals(LuiWireValue.DoubleValue(0.5), values[3]) + assertEquals(42.0, values[2].numberValue) + assertEquals(0.5, values[3].doubleValue) + } + + @Test + fun `rejects malformed batches`() { + assertThrows(LuiBackendException::class.java) { + LuiPatchBatch.parse("not json") + } + assertThrows(LuiBackendException::class.java) { + LuiPatchBatch.parse("""{"ops": []}""") + } + assertThrows(LuiBackendException::class.java) { + LuiPatchBatch.parse("""{"generation": 1}""") + } + assertThrows(LuiBackendException::class.java) { + LuiPatchBatch.parse( + """{"generation": 1, "ops": [{"op": "bogus"}]}""", + ) + } + assertThrows(LuiBackendException::class.java) { + LuiPatchBatch.parse( + """{"generation": 1, "ops": + [{"op": "create-node", "id": 1, "kind": "no-such-kind"}]}""", + ) + } + } + + @Test + fun `node kind wire mapping covers the full schema`() { + assertEquals(LuiNodeKind.bottomTabs, LuiNodeKind.fromWire("bottom-tabs")) + assertEquals(LuiNodeKind.numberStepper, LuiNodeKind.fromWire("number-stepper")) + assertEquals(null, LuiNodeKind.fromWire("not-a-kind")) + assertTrue(LuiNodeKind.entries.size >= 80) + assertTrue(LuiNodeKind.tabs.isContainer) + assertTrue(!LuiNodeKind.slider.isContainer) + } + + @Test + fun `wire value serializes to JSON literal`() { + assertEquals("\"hi\"", LuiWireValue.Str("hi").toJsonLiteral()) + assertEquals("true", LuiWireValue.Bool(true).toJsonLiteral()) + assertEquals("3", LuiWireValue.IntValue(3).toJsonLiteral()) + assertEquals("1.5", LuiWireValue.DoubleValue(1.5).toJsonLiteral()) + assertEquals("\"a\\\"b\"", LuiWireValue.Str("a\"b").toJsonLiteral()) + } +} diff --git a/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_controlsDark_controls-dark.png b/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_controlsDark_controls-dark.png new file mode 100644 index 00000000..b1a5ff1e Binary files /dev/null and b/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_controlsDark_controls-dark.png differ diff --git a/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_controlsLight_controls-light.png b/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_controlsLight_controls-light.png new file mode 100644 index 00000000..8d860432 Binary files /dev/null and b/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_controlsLight_controls-light.png differ diff --git a/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_galleryDark_gallery-dark.png b/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_galleryDark_gallery-dark.png new file mode 100644 index 00000000..ac96667e Binary files /dev/null and b/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_galleryDark_gallery-dark.png differ diff --git a/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_galleryLight_gallery-light.png b/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_galleryLight_gallery-light.png new file mode 100644 index 00000000..fc61e01e Binary files /dev/null and b/platform/android/lui/src/test/snapshots/images/dev.lui_LuiScreenshotTest_galleryLight_gallery-light.png differ diff --git a/platform/android/settings.gradle.kts b/platform/android/settings.gradle.kts new file mode 100644 index 00000000..68eac8c2 --- /dev/null +++ b/platform/android/settings.gradle.kts @@ -0,0 +1,18 @@ +rootProject.name = "lui-android" + +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } +} + +include(":lui") diff --git a/platform/apple/Sources/LUIAppleBackend/LUISplit.swift b/platform/apple/Sources/LUIAppleBackend/LUISplit.swift index a5ed2820..91df5e48 100644 --- a/platform/apple/Sources/LUIAppleBackend/LUISplit.swift +++ b/platform/apple/Sources/LUIAppleBackend/LUISplit.swift @@ -10,13 +10,13 @@ import UniformTypeIdentifiers @MainActor public enum LUISplit { static let viewFingerprint = - "lui-extension-v1|10:split-view|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:17:divider-thickness:float:optional:none,24:accessibility-identifier:string:optional:none,9:animation:bool:optional:none|events:" + "lui-extension-v1|10:split-view|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:17:divider-thickness:float:optional:none,24:accessibility-identifier:string:optional:none,9:animation:bool:optional:none|events:" static let branchFingerprint = - "lui-extension-v1|12:split-branch|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:11:orientation:string:required:none,5:ratio:float:required:none|events:13:ratio-changed[5:ratio:float:required]" + "lui-extension-v1|12:split-branch|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:11:orientation:string:required:none,5:ratio:float:required:none|events:13:ratio-changed[5:ratio:float:required]" static let paneFingerprint = - "lui-extension-v1|10:split-pane|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:9:split-tab|properties:24:accessibility-identifier:string:optional:none,7:focused:bool:optional:none,7:pane-id:string:required:none,8:selected:string:optional:none|events:10:split-drop[3:tab:string:required,4:edge:string:required,9:from-pane:string:required],10:tab-closed[3:tab:string:required],11:pane-closed[],12:pane-focused[],12:tab-selected[3:tab:string:required],15:split-requested[11:orientation:string:required],8:navigate[9:direction:string:required],9:tab-moved[3:tab:string:required,5:index:int:required,9:from-pane:string:required]" + "lui-extension-v1|10:split-pane|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:9:split-tab|properties:24:accessibility-identifier:string:optional:none,7:focused:bool:optional:none,7:pane-id:string:required:none,8:selected:string:optional:none|events:10:split-drop[3:tab:string:required,4:edge:string:required,9:from-pane:string:required],10:tab-closed[3:tab:string:required],11:pane-closed[],12:pane-focused[],12:tab-selected[3:tab:string:required],15:split-requested[11:orientation:string:required],8:navigate[9:direction:string:required],9:tab-moved[3:tab:string:required,5:index:int:required,9:from-pane:string:required]" static let tabFingerprint = - "lui-extension-v1|9:split-tab|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:1|children:|properties:24:accessibility-identifier:string:optional:none,4:icon:string:optional:none,5:dirty:bool:optional:none,5:title:string:required:none,6:tab-id:string:required:none,8:closable:bool:optional:none|events:" + "lui-extension-v1|9:split-tab|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:1|children:|properties:24:accessibility-identifier:string:optional:none,4:icon:string:optional:none,5:dirty:bool:optional:none,5:title:string:required:none,6:tab-id:string:required:none,8:closable:bool:optional:none|events:" private static let accessibilityIdentifier = LUIExtensionProperty( name: "accessibility-identifier", kind: .string) diff --git a/platform/web/src/lui-split.js b/platform/web/src/lui-split.js index 4c2debca..706c44e4 100644 --- a/platform/web/src/lui-split.js +++ b/platform/web/src/lui-split.js @@ -25,13 +25,13 @@ const LUISplit = (() => { // checker extracts single-line literals, so keep each on one line). const fingerprints = { 'split-view': - 'lui-extension-v1|10:split-view|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:17:divider-thickness:float:optional:none,24:accessibility-identifier:string:optional:none,9:animation:bool:optional:none|events:', + 'lui-extension-v1|10:split-view|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:17:divider-thickness:float:optional:none,24:accessibility-identifier:string:optional:none,9:animation:bool:optional:none|events:', 'split-branch': - 'lui-extension-v1|12:split-branch|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:11:orientation:string:required:none,5:ratio:float:required:none|events:13:ratio-changed[5:ratio:float:required]', + 'lui-extension-v1|12:split-branch|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:11:orientation:string:required:none,5:ratio:float:required:none|events:13:ratio-changed[5:ratio:float:required]', 'split-pane': - 'lui-extension-v1|10:split-pane|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:9:split-tab|properties:24:accessibility-identifier:string:optional:none,7:focused:bool:optional:none,7:pane-id:string:required:none,8:selected:string:optional:none|events:10:split-drop[3:tab:string:required,4:edge:string:required,9:from-pane:string:required],10:tab-closed[3:tab:string:required],11:pane-closed[],12:pane-focused[],12:tab-selected[3:tab:string:required],15:split-requested[11:orientation:string:required],8:navigate[9:direction:string:required],9:tab-moved[3:tab:string:required,5:index:int:required,9:from-pane:string:required]', + 'lui-extension-v1|10:split-pane|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:9:split-tab|properties:24:accessibility-identifier:string:optional:none,7:focused:bool:optional:none,7:pane-id:string:required:none,8:selected:string:optional:none|events:10:split-drop[3:tab:string:required,4:edge:string:required,9:from-pane:string:required],10:tab-closed[3:tab:string:required],11:pane-closed[],12:pane-focused[],12:tab-selected[3:tab:string:required],15:split-requested[11:orientation:string:required],8:navigate[9:direction:string:required],9:tab-moved[3:tab:string:required,5:index:int:required,9:from-pane:string:required]', 'split-tab': - 'lui-extension-v1|9:split-tab|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:1|children:|properties:24:accessibility-identifier:string:optional:none,4:icon:string:optional:none,5:dirty:bool:optional:none,5:title:string:required:none,6:tab-id:string:required:none,8:closable:bool:optional:none|events:', + 'lui-extension-v1|9:split-tab|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:1|children:|properties:24:accessibility-identifier:string:optional:none,4:icon:string:optional:none,5:dirty:bool:optional:none,5:title:string:required:none,6:tab-id:string:required:none,8:closable:bool:optional:none|events:', }; const MIME = 'application/x-lui-split-tab'; diff --git a/src/lui_element_combine.ml b/src/lui_element_combine.ml index 5897526a..525f9e89 100644 --- a/src/lui_element_combine.ml +++ b/src/lui_element_combine.ml @@ -141,10 +141,17 @@ let composer_send_button context ?send_icon send_disabled on_send : t = let apple_icon = Option.value send_icon ~default:(`arrow_up : icon) in if Lui_ui.platform context = Lui_protocol.AndroidOS then - button - ~icon:android_icon ~variant:`primary ~label:"Send" - ~accessibility_identifier:"button.send" ?disabled_signal:send_disabled - ~on_press:on_send ~text:"Send" [] + if Lui_ui.host context = Lui_protocol.KotlinHost + then + button + ~icon:android_icon ~variant:`primary ~size:`icon ~width:48 ~height:48 + ~label:"Send" ~accessibility_identifier:"button.send" + ?disabled_signal:send_disabled ~on_press:on_send [] + else + button + ~icon:android_icon ~variant:`primary ~label:"Send" + ~accessibility_identifier:"button.send" ?disabled_signal:send_disabled + ~on_press:on_send ~text:"Send" [] else button ~icon:apple_icon ~variant:`ghost ~width:36 ~height:36 @@ -178,6 +185,7 @@ let composer : t = fun context parent -> + let kotlin = Lui_ui.host context = Lui_protocol.KotlinHost in let attachment_strip = match attachments with | None -> [] @@ -215,9 +223,9 @@ let composer ?key ?accessibility_identifier ~style_class:"composer-surface" ~min_height:58 ~gap:0 - ~padding_horizontal:16 - ~padding_vertical:8 - ~background:"glass" + ~padding_horizontal:(if kotlin then 12 else 16) + ~padding_vertical:(if kotlin then 12 else 8) + ~background:(if kotlin then "surface-container-high" else "glass") ~corner_radius:24 ([ box ~height:6 ~accessibility_identifier:"spacer.composer.top" [] ] @ attachment_strip @@ -288,12 +296,19 @@ let composer_collapsed : t = fun context parent -> - (button - ?key ?accessibility_identifier ~variant:`ghost ~grow:1.0 ~height:58 - ~padding_horizontal:30 ~background:"glass" - ~foreground:"muted-foreground" ~corner_radius:999 ?icon ~text:label - ~on_press []) - context parent + if Lui_ui.host context = Lui_protocol.KotlinHost + then + (button + ?key ?accessibility_identifier ~variant:`secondary ?icon ~grow:1.0 + ~height:58 ~padding_horizontal:20 ~label ~text:label ~on_press []) + context parent + else + (button + ?key ?accessibility_identifier ~variant:`ghost ~grow:1.0 ~height:58 + ~padding_horizontal:30 ~background:"glass" + ~foreground:"muted-foreground" ~corner_radius:999 ?icon ~text:label + ~on_press []) + context parent ;; (* ------------------------------------------------------------------ *) diff --git a/src/lui_extension.ml b/src/lui_extension.ml index a087f10b..7ed9f565 100644 --- a/src/lui_extension.ml +++ b/src/lui_extension.ml @@ -158,6 +158,7 @@ let host_name host = | GenericHost -> "generic" | WebHost -> "web" | SwiftUIHost -> "swiftui" + | KotlinHost -> "kotlin" | GPUIHost -> "gpui" let token value = string_of_int (String.length value) ^ ":" ^ value diff --git a/src/lui_protocol.ml b/src/lui_protocol.ml index 8379e6aa..2109939e 100644 --- a/src/lui_protocol.ml +++ b/src/lui_protocol.ml @@ -106,6 +106,7 @@ type host_kind = | GenericHost | WebHost | SwiftUIHost + | KotlinHost | GPUIHost type platform_profile = { diff --git a/src/lui_protocol.mli b/src/lui_protocol.mli index c40775fe..8ee8ee09 100644 --- a/src/lui_protocol.mli +++ b/src/lui_protocol.mli @@ -104,6 +104,7 @@ type host_kind = | GenericHost | WebHost | SwiftUIHost + | KotlinHost | GPUIHost type platform_profile = { diff --git a/src/lui_split.ml b/src/lui_split.ml index 74a05104..d30e853d 100644 --- a/src/lui_split.ml +++ b/src/lui_split.ml @@ -21,6 +21,7 @@ let profiles = [ { profile_os = MacOS; profile_host = SwiftUIHost }; { profile_os = IOS; profile_host = SwiftUIHost }; + { profile_os = AndroidOS; profile_host = KotlinHost }; { profile_os = MacOS; profile_host = GPUIHost }; { profile_os = LinuxOS; profile_host = GPUIHost }; { profile_os = WindowsOS; profile_host = GPUIHost }; diff --git a/test/test_lui.ml b/test/test_lui.ml index 1c0065fa..1cfb859f 100644 --- a/test/test_lui.ml +++ b/test/test_lui.ml @@ -1417,7 +1417,7 @@ let test_fingerprint_format () = "lui-extension-v1|16:apple-map-marker|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,windows/gpui|standard-children:0|children:|properties:5:title:string:required:none,8:latitude:float:required:none,9:longitude:float:required:none|events:" (Lui_extension.fingerprint (gallery_schema "apple-map-marker")); Alcotest.(check string) "tweak fingerprint" - "lui-tweak-v1|14:gallery-accent|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|properties:" + "lui-tweak-v1|14:gallery-accent|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|properties:" (Lui_extension.tweak_fingerprint (gallery_schema "gallery-accent")) let test_host_literals_in_sync () = @@ -2523,16 +2523,16 @@ let split_fingerprint identifier = let test_split_fingerprints () = Alcotest.(check string) "split-view fingerprint" - "lui-extension-v1|10:split-view|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:17:divider-thickness:float:optional:none,24:accessibility-identifier:string:optional:none,9:animation:bool:optional:none|events:" + "lui-extension-v1|10:split-view|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:17:divider-thickness:float:optional:none,24:accessibility-identifier:string:optional:none,9:animation:bool:optional:none|events:" (split_fingerprint "split-view"); Alcotest.(check string) "split-branch fingerprint" - "lui-extension-v1|12:split-branch|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:11:orientation:string:required:none,5:ratio:float:required:none|events:13:ratio-changed[5:ratio:float:required]" + "lui-extension-v1|12:split-branch|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:12:split-branch,10:split-pane|properties:11:orientation:string:required:none,5:ratio:float:required:none|events:13:ratio-changed[5:ratio:float:required]" (split_fingerprint "split-branch"); Alcotest.(check string) "split-pane fingerprint" - "lui-extension-v1|10:split-pane|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:9:split-tab|properties:24:accessibility-identifier:string:optional:none,7:focused:bool:optional:none,7:pane-id:string:required:none,8:selected:string:optional:none|events:10:split-drop[3:tab:string:required,4:edge:string:required,9:from-pane:string:required],10:tab-closed[3:tab:string:required],11:pane-closed[],12:pane-focused[],12:tab-selected[3:tab:string:required],15:split-requested[11:orientation:string:required],8:navigate[9:direction:string:required],9:tab-moved[3:tab:string:required,5:index:int:required,9:from-pane:string:required]" + "lui-extension-v1|10:split-pane|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:0|children:9:split-tab|properties:24:accessibility-identifier:string:optional:none,7:focused:bool:optional:none,7:pane-id:string:required:none,8:selected:string:optional:none|events:10:split-drop[3:tab:string:required,4:edge:string:required,9:from-pane:string:required],10:tab-closed[3:tab:string:required],11:pane-closed[],12:pane-focused[],12:tab-selected[3:tab:string:required],15:split-requested[11:orientation:string:required],8:navigate[9:direction:string:required],9:tab-moved[3:tab:string:required,5:index:int:required,9:from-pane:string:required]" (split_fingerprint "split-pane"); Alcotest.(check string) "split-tab fingerprint" - "lui-extension-v1|9:split-tab|profiles:ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:1|children:|properties:24:accessibility-identifier:string:optional:none,4:icon:string:optional:none,5:dirty:bool:optional:none,5:title:string:required:none,6:tab-id:string:required:none,8:closable:bool:optional:none|events:" + "lui-extension-v1|9:split-tab|profiles:android/kotlin,ios/swiftui,linux/gpui,macos/gpui,macos/swiftui,web/web,windows/gpui|standard-children:1|children:|properties:24:accessibility-identifier:string:optional:none,4:icon:string:optional:none,5:dirty:bool:optional:none,5:title:string:required:none,6:tab-id:string:required:none,8:closable:bool:optional:none|events:" (split_fingerprint "split-tab") (* Every host source that carries lui-extension-v1 literals is checked so @@ -2542,6 +2542,7 @@ let test_split_fingerprints () = let split_host_sources () = let root = source_root () in [ "platform/apple/Sources/LUIAppleBackend/LUISplit.swift"; + "platform/android/lui/src/main/kotlin/dev/lui/LuiSplit.kt"; "platform/web/src/lui-split.js" ] |> List.filter_map (fun rel -> let path = Filename.concat root rel in diff --git a/tooling/generate_component_schema.mjs b/tooling/generate_component_schema.mjs index cbb819ec..24dcd09e 100644 --- a/tooling/generate_component_schema.mjs +++ b/tooling/generate_component_schema.mjs @@ -124,6 +124,7 @@ type host_kind = | GenericHost | WebHost | SwiftUIHost + | KotlinHost | GPUIHost type platform_profile = { @@ -346,6 +347,71 @@ ${extraEntries} `; } +function renderKotlin(schema) { + // Kotlin enum entry names reuse the `swift` schema field: the camelCase + // names are legal Kotlin identifiers, so no separate `kotlin` name set + // is needed. The only exception is `name`, which collides with + // Enum.name; it is emitted as `propName`. + const kotlinEnumName = (swift) => + swift === 'name' ? 'propName' : swift; + const kindSwift = new Map(schema.nodeKinds.map(({ wire, swift }) => [wire, kotlinEnumName(swift)])); + const propSwift = new Map(schema.properties.map(({ wire, swift }) => [wire, kotlinEnumName(swift)])); + const nodeKinds = schema.nodeKinds + .map(({ swift, wire, container }) => ` ${kotlinEnumName(swift)}("${wire}", ${container ? 'true' : 'false'}),`) + .join('\n'); + const properties = schema.properties + .map(({ swift, wire }) => ` ${kotlinEnumName(swift)}("${wire}"),`) + .join('\n'); + const matrixEntries = Object.entries(schema.kindProperties ?? {}) + .map(([kindWire, propWires]) => + ` LuiNodeKind.${kindSwift.get(kindWire)} to setOf(${propWires.map((w) => `LuiProperty.${propSwift.get(w)}`).join(', ')}),`) + .join('\n'); + const extraEntries = Object.entries(schema.kindExtraProperties ?? {}) + .map(([kindWire, propWires]) => + ` LuiNodeKind.${kindSwift.get(kindWire)} to setOf(${propWires.map((w) => `LuiProperty.${propSwift.get(w)}`).join(', ')}),`) + .join('\n'); + return `${generatedHeader('//')}package dev.lui + +enum class LuiNodeKind(val wireName: String, val isContainer: Boolean) { +${nodeKinds} + ; + + companion object { + private val byWire: Map = entries.associateBy { it.wireName } + + fun fromWire(wire: String): LuiNodeKind? = byWire[wire] + } +} + +enum class LuiProperty(val wireName: String) { +${properties} + ; + + companion object { + private val byWire: Map = entries.associateBy { it.wireName } + + fun fromWire(wire: String): LuiProperty? = byWire[wire] + } +} + +/** + * Mirrors schema/components.json kindProperties: kinds listed here admit + * ONLY the given kind-specific props (plus the shared/common set), instead of + * the default "common set" behaviour for unlisted kinds. Absence means the + * kind follows the common-property rules in the backend. + */ +object LuiSchemaMatrix { + val restrictive: Map> = mapOf( +${matrixEntries} + ) + + val extra: Map> = mapOf( +${extraEntries} + ) +} +`; +} + function renderRust(schema) { const kindLg = new Map(schema.nodeKinds.map(({ wire, lg }) => [wire, lg])); const propLg = new Map(schema.properties.map(({ wire, lg }) => [wire, lg])); @@ -468,6 +534,7 @@ function artifacts(schema) { ['src/lui_wire_schema.mli', renderOCamlWireSignature()], ['platform/apple/Sources/LUIAppleBackend/LUIWireSchema.swift', renderSwift(schema)], ['platform/gpui/crates/lui-core/src/wire_schema.rs', renderRust(schema)], + ['platform/android/lui/src/main/kotlin/dev/lui/LuiWireSchema.kt', renderKotlin(schema)], ]); } diff --git a/tooling/generate_extension_api.mjs b/tooling/generate_extension_api.mjs index 4a33bfd2..16ff5c91 100644 --- a/tooling/generate_extension_api.mjs +++ b/tooling/generate_extension_api.mjs @@ -65,7 +65,7 @@ const osNames = { const hostNames = { generic: 'GenericHost', web: 'WebHost', swiftui: 'SwiftUIHost', - gpui: 'GPUIHost', + kotlin: 'KotlinHost', gpui: 'GPUIHost', }; const munge = (name) => name.replace(/-/g, '_');