Skip to content

Conversation

@yashk2000
Copy link
Member

Fixed #2744

Changes: Updated build gradle version beeing and openCV version to 4.0.1 to include 64-bit native libraries.

@yashk2000
Copy link
Member Author

@iamareebjamal @abishekvashok @sauravvishal8797 please review.

@iamareebjamal
Copy link
Member

iamareebjamal commented Jun 5, 2019

LGTM, but why 4.0.1

Since this is a big PR, why not upgrade to latest 4.1.0 instead of creating another big PR for it

Secondly, can't the files in include directory omitted and copied from the opencv sdk when it is downloaded?

I suppose you have copied them from it, right? Why keep code in the repo that we don't maintain and have to update on each library update?

@yashk2000
Copy link
Member Author

@iamareebjamal yes, we can omit the include directory.

I tried with 4.1.0 after 4.0.1 earlier, but it gave me some errors which were not faced with 4.0.1. So I sent the pr with 4.0.1. I'll try 4.1.0 once again.

@yashk2000
Copy link
Member Author

And also omit the include directory.

@yashk2000
Copy link
Member Author

@iamareebjamal omitting the include directory will be done by adding /app/src/main/jni/include/ to the .gitignore file right?

@iamareebjamal
Copy link
Member

iamareebjamal commented Jun 5, 2019

Your PR should have about 10 files changed once you have omitted the include directory.

There should be no changes in include directory in the PR

@yashk2000
Copy link
Member Author

@iamareebjamal yes sir. I added /app/src/main/jni/include/ to the .gitignore file, but the folder is still here.

@iamareebjamal
Copy link
Member

It obviously will be. You have to delete it. Also, don't squash and force push because if it doesn't work, you won't be able to revert

@iamareebjamal
Copy link
Member

Also, don't delete the folder in this PR, just revert the changes

@yashk2000
Copy link
Member Author

It obviously will be. You have to delete it. Also, don't squash and force push because if it doesn't work, you won't be able to revert

@iamareebjamal sir but /app/src/main/3rdparty/ and /app/src/main/jniLibs are also in the .gitignore. I do not have to delete these folders before pushing changes.

@iamareebjamal
Copy link
Member

Because they were never added in git

Once tracked, always tracked, doesn't matter if you add them in .gitignore after. Read about git tracked files and gitignore

@yashk2000
Copy link
Member Author

Ohk sir. I'll delete the folder and push the changes. Thanks :)

@iamareebjamal
Copy link
Member

Also, don't delete the folder in this PR, just revert the changes

@iamareebjamal
Copy link
Member

Don't delete. The point is to not have 630 changes in this PR. It should only have changes in makefiles and download scripts

@yashk2000
Copy link
Member Author

@iamareebjamal Sir but without deleting how will we make ignore the include file while pushing?
Should that be done in another pr?
Which changes do I revert back to then? Just updating the build gradle version?

@iamareebjamal
Copy link
Member

Sir but without deleting how will we make ignore the include file while pushing?
Should that be done in another pr?

Yes

Which changes do I revert back to then?

All changes should be there except any change in include folder. The opencv script must be updated to copy required files to the include folder

@yashk2000
Copy link
Member Author

yashk2000 commented Jun 5, 2019

The opencv script must be updated to copy required files to the include folder

@iamareebjamal If I do this, then this error will happen:
mv: cannot move ‘/home/travis/openCV/opencv/sdk/native/jni/include/opencv2’ to ‘app/src/main/jni/include/opencv2’: Directory not empty
For now, until the include folder is deleted, should I modify the script to first delete the existing contents of the folder and then move in the new folders?

@iamareebjamal
Copy link
Member

Still 400+ changes. Same can be done with openCVLibrary401/ folder. Please don't add anything we are copying from the opencv SDK

In future, we'll use open cv aar like https://github.com/piruin/opencv-android

So that we don't need this utterly useless step and redundant code in the repo and can manage the dependency in sane way like other "normal" android libraries

implementation 'org.opencv:opencv-android:3.4.1'

Not doing it currently because the latest version is 3.4.1

@yashk2000
Copy link
Member Author

@iamareebjamal openCVLibrary401 is not copied and pasted. It has to imported as a separate module. I think we should leave this because some changes have to made in the manifests and gradle files of both app and openCV module. This might not be very friendly for first-time contributors.

@yashk2000
Copy link
Member Author

In future, we'll use open cv aar like https://github.com/piruin/opencv-android

Yes sir, this is a very good idea.

@yashk2000
Copy link
Member Author

@iamareebjamal sir, is it ok now?

@iamareebjamal
Copy link
Member

openCVLibrary401 is not copied and pasted. It has to imported as a separate module. I think we should leave this

OK, but rename this to openCV, so that we don't have to change this every version. I have no idea why it was thought of as a good idea to add version code in module

@yashk2000
Copy link
Member Author

Ok sir, on it.

@yashk2000
Copy link
Member Author

OK, but rename this to openCV, so that we don't have to change this every version. I have no idea why it was thought of as a good idea to add version code in module

@iamareebjamal done.

@iamareebjamal iamareebjamal merged commit 3df84ad into fossasia:development Jun 6, 2019
pull bot pushed a commit to sahilsaha7773/phimpme-android that referenced this pull request Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App contains only 32 bit native binaries.

2 participants