Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 4, 2024
1 parent d0b9959 commit 41c62a0
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 47 deletions.
59 changes: 29 additions & 30 deletions examples/android/gui_window/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ file(TO_CMAKE_PATH "${ANDROID_NDK}" ANDROID_NDK_PATH)

set(APP_GLUE_DIR ${ANDROID_NDK_PATH}/sources/android/native_app_glue)
include_directories(${APP_GLUE_DIR})
add_library(app-glue
STATIC
${APP_GLUE_DIR}/android_native_app_glue.c)

add_library(
app-glue STATIC
${APP_GLUE_DIR}/android_native_app_glue.c
)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand All @@ -26,30 +26,29 @@ project("KDGuiWindowTest")
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_FIND_DEBUG_MODE TRUE)



# Creates and names a library, sets it as either STATIC or SHARED, and provides
# the relative paths to its source code. You can define multiple libraries, and
# CMake builds them for you. Gradle automatically packages shared libraries with
# your APK.

add_library(
# Sets the name of the library.
kdguiwindowtest
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
# SerenityNativeAndroid.cpp SerenityNativeAndroid.h
gui_window.cpp)
# Sets the name of the library.
kdguiwindowtest
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
# SerenityNativeAndroid.cpp SerenityNativeAndroid.h
gui_window.cpp
)

find_package(KDUtils CONFIG)

if(NOT KDUtils_FOUND)
FetchContent_Declare(
KDUtils
GIT_REPOSITORY https://github.com/KDAB/KDUtils.git
GIT_TAG main
USES_TERMINAL_DOWNLOAD YES USES_TERMINAL_UPDATE YES
KDUtils
GIT_REPOSITORY https://github.com/KDAB/KDUtils.git
GIT_TAG main
USES_TERMINAL_DOWNLOAD YES USES_TERMINAL_UPDATE YES
)

option(KDUTILS_BUILD_TESTS "Build the tests" OFF)
Expand All @@ -62,18 +61,18 @@ find_package(KDGui CONFIG)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -DVK_USE_PLATFORM_ANDROID_KHR")

set(CMAKE_SHARED_LINKER_FLAGS
"${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate")

target_link_libraries(
# Specifies the target library.
kdguiwindowtest
vulkan
nativewindow
app-glue
log
android
KDFoundation
KDGui
KDUtils
spdlog)
# Specifies the target library.
kdguiwindowtest
vulkan
nativewindow
app-glue
log
android
KDFoundation
KDGui
KDUtils
spdlog
)
2 changes: 1 addition & 1 deletion examples/android/gui_window/app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/build
/.cxx
/.cxx
2 changes: 1 addition & 1 deletion examples/android/gui_window/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ dependencies {
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
}
}
2 changes: 1 addition & 1 deletion examples/android/gui_window/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
</activity>
</application>

</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
</adaptive-icon>
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
</adaptive-icon>
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
Contact KDAB at <info@kdab.com> for commercial licensing options.
-->
<string name="app_name">KDGui Window</string>
</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
</full-backup-content>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
</data-extraction-rules>
2 changes: 1 addition & 1 deletion examples/android/gui_window/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.6.1" apply false
}
}
2 changes: 1 addition & 1 deletion examples/android/gui_window/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
2 changes: 0 additions & 2 deletions examples/android/gui_window/gui_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ int main()
auto logger = spdlog::android_logger_mt("gui_window", "gui_window");
spdlog::set_default_logger(logger);


KDGui::GuiApplication app;

ExampleWindow w;
Expand All @@ -88,4 +87,3 @@ int main()

return 0;
}

0 comments on commit 41c62a0

Please sign in to comment.