Skip to content

Commit

Permalink
I have worked on:
Browse files Browse the repository at this point in the history
- Updated cmake changes
  • Loading branch information
AliAzaz committed Sep 21, 2023
1 parent 82d8ef4 commit 99435d1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/dispatch_git_artifact_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
- name: Upload API Key to gradle properties 🔥
run: sed -i "s|PIXABAY_KEY|${{secrets.PIXABAY_KEY}}|g" ./gradle.properties

- name: Set useCMake property to false
run: echo "useCMake=false" >> gradle.properties


#Generate an apk
build-apk:
needs: app-utils-creation
Expand All @@ -37,6 +33,9 @@ jobs:
with:
java-version: 11

- name: Set EXCLUDE_LIB_CPP environment variable
run: echo "EXCLUDE_LIB_CPP=true" >> $GITHUB_ENV

- name: Build debuging APK 🔥
run: bash ./gradlew assembleDebug
if: success()
Expand Down
22 changes: 14 additions & 8 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@ project(PixabayGalleryApp)
# 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.
native-lib

# Sets the library as a shared library.
SHARED

# Provides a relative path to your source file(s).
src/main/cpp/lib.cpp)
# Check if the EXCLUDE_LIB_CPP environment variable is set to true
if (DEFINED ENV{EXCLUDE_LIB_CPP} AND "$ENV{EXCLUDE_LIB_CPP}" STREQUAL "true")
message(STATUS "Excluding lib.cpp from the build")
else ()
# Include lib.cpp in the build
add_library( # Sets the name of the library.
native-lib

# Sets the library as a shared library.
SHARED

# Provides a relative path to your source file(s).
src/main/cpp/lib.cpp)
endif ()

# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
Expand Down

0 comments on commit 99435d1

Please sign in to comment.