Skip to content
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

upgrade android ndk to r17c #7698

Closed
wants to merge 2 commits into from
Closed

upgrade android ndk to r17c #7698

wants to merge 2 commits into from

Conversation

jakubgs
Copy link
Member

@jakubgs jakubgs commented Mar 8, 2019

@jakubgs jakubgs added the android label Mar 8, 2019
@jakubgs jakubgs self-assigned this Mar 8, 2019
@status-github-bot
Copy link

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?

@status-im-auto
Copy link
Member

status-im-auto commented Mar 8, 2019

Jenkins Builds

Click to see older builds (12)
Commit #️⃣ Finished (UTC) Duration Platform Result
2398343 #2 2019-03-08 08:11:09 ~2 min android 📄 log
2398343 #2 2019-03-08 08:11:21 ~2 min android-e2e 📄 log
✔️ 2398343 #1 2019-03-08 08:23:01 ~16 min ios 📦 ipa
✔️ 2398343 #1 2019-03-08 08:25:19 ~18 min windows 📦 exe
✔️ 2398343 #1 2019-03-08 08:26:27 ~20 min linux 📦 App
✔️ 2398343 #1 2019-03-08 08:27:22 ~20 min macos 📦 dmg
70ef9b6 #3 2019-03-11 10:22:35 ~2 min android-e2e 📄 log
70ef9b6 #3 2019-03-11 10:22:35 ~2 min android 📄 log
✔️ 70ef9b6 #2 2019-03-11 10:35:40 ~15 min macos 📦 dmg
✔️ 70ef9b6 #2 2019-03-11 10:37:14 ~17 min ios 📦 ipa
✔️ 70ef9b6 #2 2019-03-11 10:38:00 ~18 min windows 📦 exe
✔️ 70ef9b6 #2 2019-03-11 10:38:45 ~18 min linux 📦 App
Commit #️⃣ Finished (UTC) Duration Platform Result
bdb9243 #4 2019-03-11 11:19:35 ~1 min android 📄 log
bdb9243 #4 2019-03-11 11:19:44 ~1 min android-e2e 📄 log
✔️ bdb9243 #3 2019-03-11 11:33:59 ~16 min macos 📦 dmg
✔️ bdb9243 #3 2019-03-11 11:35:18 ~17 min ios 📦 ipa
✔️ bdb9243 #3 2019-03-11 11:35:39 ~17 min windows 📦 exe
✔️ bdb9243 #3 2019-03-11 11:37:15 ~19 min linux 📦 App
3b92545 #5 2019-03-11 13:55:30 ~2 min android 📄 log
3b92545 #5 2019-03-11 13:55:30 ~2 min android-e2e 📄 log
3b92545 #4 2019-03-11 14:05:24 ~12 min macos 📄 log
✔️ 3b92545 #4 2019-03-11 14:10:16 ~17 min ios 📦 ipa
✔️ 3b92545 #4 2019-03-11 14:11:46 ~18 min windows 📦 exe
✔️ 3b92545 #4 2019-03-11 14:13:01 ~19 min linux 📦 App

@jakubgs
Copy link
Member Author

jakubgs commented Mar 8, 2019

Doesn't seem the codebase likes the upgrade:

:react-native-android:buildReactNdkLib
A problem was found with the configuration of task ':react-native-android:buildReactNdkLib'. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0.
 - File '/home/jenkins/workspace/status-react_prs_android_PR-7698/node_modules/react-native/ReactAndroid/src/main/jni/react' specified for property '$1' is not a file.
/usr/lib/android-ndk/build/core/setup-app-platform.mk:135: *** Android NDK: Aborting    .  Stop.
Android NDK: APP_PLATFORM set to unknown platform: android-16.    
make[1]: Entering directory `/home/jenkins/workspace/status-react_prs_android_PR-7698/node_modules/react-native/ReactAndroid/src/main/jni/react/jni'
make[1]: Leaving directory `/home/jenkins/workspace/status-react_prs_android_PR-7698/node_modules/react-native/ReactAndroid/src/main/jni/react/jni'
:react-native-android:buildReactNdkLib FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-android:buildReactNdkLib'.
> Process 'command '/usr/lib/android-ndk/ndk-build'' finished with non-zero exit value 2

Not sure what APP_PLATFORM does but we set it to android-18:
https://github.com/status-im/status-react/blob/38aca129cd65216078381d10abb7fb7347fce427/android/app/jni/Application.mk#L1-L4

@pedropombeiro
Copy link
Contributor

Wondering if we should do this after we've merged the feature/nix branch

@rasom
Copy link
Contributor

rasom commented Mar 11, 2019

@pombeirp why?

Signed-off-by: Jakub Sokołowski <jakub@status.im>
.TOOLVERSIONS Outdated
android-ndk;r10e;070be287539e3e7706f8dabfb6bf9879
android-sdk-build-tools;28.0.1;
android-ndk;r17c;a4b6b8281e7d101efd994d31e64af746
android-sdk-build-tools;28.0.3;
android-sdk-platform;android-27;
Copy link
Contributor

Choose a reason for hiding this comment

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

@pombeirp we also need to use android-28, can we change this as well? Or this config doesn't have effect on docker image?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I'll push a new image with that change too. In your #status-core message you mentioned

we need to upgrade android-sdk-build-tools to 28.0.3 and android-sdk-platform to android-27

that's why I didn't change it

Copy link
Contributor

Choose a reason for hiding this comment

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

oh I see, that was a mistake, sorry

@pedropombeiro
Copy link
Contributor

@pombeirp why?

Because all these dockerfiles disappear in that branch, so we'll need to redo this work in Nix before merging to develop.

@rasom
Copy link
Contributor

rasom commented Mar 11, 2019

so we'll need to redo this work in Nix before merging to develop

ok, I see. The problem here is that it probably will be a bit hard to maintain this PR because it's quite big, so if we switch to Nix soon then no problem to merge it after. Otherwise it might be a bit tricky with conflicts, already rebased it twice (though without huge difficulties).

@rasom
Copy link
Contributor

rasom commented Mar 11, 2019

to maintain this PR because it's quite big

I mean another PR #7666 :)

android-sdk-platform;android-27;
android-ndk;r17c;a4b6b8281e7d101efd994d31e64af746
android-sdk-build-tools;28.0.3;
android-sdk-platform;android-28;
android-sdk;4333796;aa190cfd7299cd6a1c687355bb2764e4
Copy link
Contributor

Choose a reason for hiding this comment

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

should this line be changed? how do we manage this file btw? is this some docker related stuff?

Copy link
Contributor

Choose a reason for hiding this comment

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

This file is read when generating the Dockerfile to figure out which files to incorporate in it. It is also used to tag the Docker image with a different hash, depending on the values we put here.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, understood

android-sdk-platform;android-27;
android-ndk;r17c;a4b6b8281e7d101efd994d31e64af746
android-sdk-build-tools;28.0.3;
android-sdk-platform;android-28;
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not too familiar with the Android SDK dependencies, I assume that we need this baseline 26 platform for some reason.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it is, that's kinda how sdkmanager works, the packages included are named after the version of sdk. I guess it could be parametrized.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah wait, it actually already is parametrized right below it:
https://github.com/status-im/status-react/blob/6d3211de46f302ab1a92eb3bb711733dd9cb8d9f/docker/android/Dockerfile#L14
So my guess would be that when I was building this it wouldn't work if also platform:android-26 was not installed.

@pedropombeiro
Copy link
Contributor

pedropombeiro commented Mar 18, 2019

When I build the app locally, I do see this:

Configuration 'compile' in project ':react-native-image-crop-picker' is deprecated. Use 'implementation' instead.
WARNING: The specified Android SDK Build Tools version (26.0.1) is ignored, as it is below the minimum supported version (26.0.2) for Android Gradle Plugin 3.0.1.
Android SDK Build Tools 26.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

The buildToolsVersion "26.0.1" directive is in node_modules/react-native-image-crop-picker/android./build.gradle

Maybe we should just update that module. cc @jeluard

@jakubgs
Copy link
Member Author

jakubgs commented Mar 22, 2019

Considering we've merged the Nix branch and the way to manage NDK is this file now:
https://github.com/status-im/status-react/blob/develop/scripts/lib/setup/nix/mobile/android-ndk/default.nix
This PR is no obsolete.

@jakubgs jakubgs closed this Mar 22, 2019
@jakubgs jakubgs deleted the add-android-ndk-r17c branch March 22, 2019 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants