Skip to content

Build pytorch_android using Gradle wrapper. #51067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

H1Gdev
Copy link
Contributor

@H1Gdev H1Gdev commented Jan 26, 2021

Here, there is the following description.
The recommended way to execute any Gradle build is with the help of the Gradle Wrapper

I took a little time to prepare Gradle for pytorch_android build. (version etc.)

I think using Gradle wrapper will make pytorch_android build more seamless.

Gradle wrapper version: 4.10.3

export GRADLE_VERSION=4.10.3

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jan 26, 2021

💊 CI failures summary and remediations

As of commit 664af49 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

@codecov
Copy link

codecov bot commented Jan 26, 2021

Codecov Report

Merging #51067 (664af49) into master (430329e) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #51067      +/-   ##
==========================================
- Coverage   80.82%   80.82%   -0.01%     
==========================================
  Files        1948     1948              
  Lines      213169   213169              
==========================================
- Hits       172289   172287       -2     
- Misses      40880    40882       +2     

@heitorschueroff heitorschueroff added module: android Related to Android support oncall: mobile Related to mobile support, including iOS and Android triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jan 26, 2021
Copy link
Contributor

@IvanKobzarev IvanKobzarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint check fails on having +x permission for gradlew

Run (! find . ( -path ./third_party -o -path ./.git -o -path ./torch/bin -o -path ./build ) -prune -o -type f -executable -regextype posix-egrep -not -regex '.+(.(bash|sh|py|so)|git-pre-commit|git-clang-format)$' -print | grep . || (echo 'The above files have executable permission; please remove their executable permission by using chmod -x'; false))
./android/gradlew
The above files have executable permission; please remove their executable permission by using chmod -x
Error: Process completed with exit code 1.

Need to check if without this it will run correctly

@H1Gdev
Copy link
Contributor Author

H1Gdev commented Feb 5, 2021

@IvanKobzarev

Need to check if without this it will run correctly

An error occurred if did not have execute permission.

Feb 05 01:51:24 /var/lib/jenkins/workspace/.circleci/scripts/../../android/build_test_app_custom.sh: line 32: /var/lib/jenkins/workspace/android/gradlew: Permission denied

Do you want to revert d4076d2 commit ?

@IvanKobzarev
Copy link
Contributor

@H1Gdev

Do you want to revert d4076d2 commit ?

Yes, please revert that commit.
We will try to add gradlew to whitelist to avoid lint failure.
After that it should be good to land.

@IvanKobzarev
Copy link
Contributor

@H1Gdev
After reverting chmod -x,
Could you also rebase on the top of master once #51796 will be landed.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IvanKobzarev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IvanKobzarev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@H1Gdev H1Gdev deleted the use_gradlew branch February 9, 2021 11:26
@facebook-github-bot
Copy link
Contributor

@IvanKobzarev merged this pull request in 8ab22a0.

xsacha pushed a commit to xsacha/pytorch that referenced this pull request Mar 31, 2021
Summary:
[Here](https://docs.gradle.org/current/userguide/gradle_wrapper.html), there is the following description.
`The recommended way to execute any Gradle build is with the help of the Gradle Wrapper`

I took a little time to prepare Gradle for `pytorch_android` build. (version etc.)

I think using Gradle wrapper will make `pytorch_android` build more seamless.

Gradle wrapper version: 4.10.3

https://github.com/pytorch/pytorch/blob/250c71121b8ac2ef1899a2414c939d4d45fc2be4/.circleci/scripts/build_android_gradle.sh#L13

Pull Request resolved: pytorch#51067

Reviewed By: izdeby

Differential Revision: D26315718

Pulled By: IvanKobzarev

fbshipit-source-id: f8077d7b28dc0b03ee48bcdac2f5e47d9c1f04d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Merged module: android Related to Android support oncall: mobile Related to mobile support, including iOS and Android open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants