diff --git a/.github/workflows/update_opencv.yml b/.github/workflows/update_opencv.yml index f1be0de..53e98e4 100644 --- a/.github/workflows/update_opencv.yml +++ b/.github/workflows/update_opencv.yml @@ -1,4 +1,4 @@ -name: Update Native OpenCV +name: Update OpenCV on: workflow_dispatch: @@ -14,12 +14,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: download and unzip the sdk + - name: Download and unzip the OpenCV sdk run: | wget https://github.com/opencv/opencv/releases/download/${{ github.event.inputs.version }}/opencv-${{ github.event.inputs.version }}-android-sdk.zip unzip opencv-${{ github.event.inputs.version }}-android-sdk.zip - - name: replace the native folder + - name: Update OpenCV Native SDK run: | rm -rd opencv/native mkdir opencv/native @@ -28,13 +28,16 @@ jobs: cp -r OpenCV-android-sdk/sdk/native/jni/include opencv/native/jni/ cp -r OpenCV-android-sdk/sdk/native/libs opencv/native/ + - name: Update OpenCV Java SDK + run: sed -i 's/ext.opencv_version = .*/ext.opencv_version = "${{ github.event.inputs.version }}"/g' build.gradle + - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: - branch: feature/update_opencv_native - title: Update of OpenCV Native - commit-message: Update of OpenCV Native - body: Don't forget to also update the Java dependency (coming through Maven) + branch: feature/update_opencv + title: Update of OpenCV + commit-message: Update of OpenCV add-paths: | opencv/native/* + build.gradle diff --git a/app/build.gradle b/app/build.gradle index 074275b..d98cd79 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,10 +43,10 @@ android { kotlin.jvmToolchain(java_version) dependencies { - implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0" + implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.core:core-ktx:1.12.0' implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation 'androidx.activity:activity-ktx:1.8.2' implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'org.opencv:opencv:4.9.0' + implementation "org.opencv:opencv:$opencv_version" } diff --git a/build.gradle b/build.gradle index eb0731f..adc4602 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,9 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.9.22' + ext.kotlin_version = "1.9.22" ext.java_version = 21 + ext.opencv_version = "4.9.0" repositories { mavenCentral() google()