Closed ManuLpz4 closed 2 years ago
I've just started to look into this for my own project @ManuLpz4, did you manage to solve it?
@connorads Nope yet, but if you want we can work together to achieve it 👍🏻
So I got it working @ManuLpz4. Hopefully the explanation below makes sense, if not please feel free to ask questions.
First I started by working out how to do it locally. Take a read, it might help explain how this works.
Which version of Android Gradle Plugin (AGP) are you using @ManuLpz4?
To get it working in CI there are two steps:
android.defaultConfig.ndk.debugSymbolLevel = 'FULL'
The NDK version I need installing 21.1.6352462
wasn't already there so I have to install it somehow.
But it looks like 21.4.7075529
(which works with AGP 4.2
& 7.0
), 22.1.7171670
, 23.0.7599858
are already installed in /usr/local/lib/android/sdk/ndk/
which I'm guessing was done by this flutter-action
🤷
I tried to install NDK using sdkmanager
and it took 80 seconds. Simpler but slightly slower than previous way.
# your GitHub Action workflow yml
- name: Install NDK 21.1.6352462
run: $ANDROID_HOME/tools/bin/sdkmanager --install "ndk;21.1.6352462"
Step 2. was actually quite pernickety at first ... So I looked for a GitHub action to install the NDK, but it wasn't really prepped for this use case ...
I've started with a bit of dirty approach which was to fork setup-ndk
GitHub action to get it to extract in the Android SDK/NDK folder and then rename the folder it creates in my workflow:
# your GitHub Action workflow yml
- uses: connorads/setup-ndk@hard-coded-extract-path
with:
ndk-version: r21b
- name: Rename NDK folder from android-ndk-r21b to 21.1.6352462
run: |
mv /usr/local/lib/android/sdk/ndk/android-ndk-r21b /usr/local/lib/android/sdk/ndk/21.1.6352462
To tidy this up a bit I might try and instead use sdkmanager
to install the NDK version so I don't have to do all this forkery and renaming. I thought this might add a lot of time to the build but the ndk-setup
action already takes around 60 seconds and sdkmanager
took 90 seconds locally on a bad connection. Will let you know if I do it and get it working.
Would be nice to get this down from 80 seconds.
Java install takes 6 seconds with actions/setup-java
Flutter install takes 52 seconds with subosito/flutter-action
Would it be possible to speed this up using some GitHub action caching?
Alternatively if I just update to AGP 4.2+ then this action would already have installed the correct version of the NDK.
Hi guys! Hope you are doing well 😁
In @belo-app we are facing problems to generate debug symbols to upload to Google Play and we are getting the following warning:
Someone knows how to solve it for CD? All solutions aims to solve it locally :/
Please and thank you :)