Skip to content

Commit

Permalink
Update also java sdk via CI
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltroger committed Feb 27, 2024
1 parent 01c8dd6 commit c4931b1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/update_opencv.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update Native OpenCV
name: Update OpenCV

on:
workflow_dispatch:
Expand All @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -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()
Expand Down

0 comments on commit c4931b1

Please sign in to comment.