bitrise-steplib / steps-gradle-runner

MIT License
10 stars 28 forks source link

Can't specify multiple APK include filters #60

Closed DSteve595 closed 5 years ago

DSteve595 commented 6 years ago

In my project, I'm building an app bundle (.aab) and an APK. I'm trying to have them both be picked up (*.aab and *.apk) in the APK path list, but it looks like I can't add multiple options to the APK include filter. This is supported in the exclude filter, and it adds multiple ! -path arguments to find, but it doesn't seem to work for the include filter.

BirmacherAkos commented 6 years ago

Hi @DSteve595 !

Thanks for the report 🥇 I've created a card for the Tooling Team.

BirmacherAkos commented 5 years ago

Hi!

We've discussed this with the Tooling Team and we came to that conclusion that the step should not support multiple options for the APK include filter.

We think it is a better pattern to use multiple gradle runner steps for this. One for generating the .apk and another to generate the .aab.

The core principle to follow is that when you construct a bitrise workflow you describe what you do manually, locally on your Mac/PC, and then you have bitrise to do the same steps for you automatically. Basically, you automate the same steps you would do.

If you want to do this on your local machine via ./gradlew command you would need to run it multiple time. One for the .apk and one for the .aab.

DSteve595 commented 5 years ago

Appreciate the response!

If you want to do this on your local machine via ./gradlew command you would need to run it multiple time

This isn't true, ./gradlew assembleRelease bundleRelease is a perfectly valid command that will produce both an APK and an AAB.

DSteve595 commented 5 years ago

👋

fehersanyi-bitrise commented 5 years ago

Hy @DSteve595

I understand the concept, but maybe the step can't handle it like this, I would suggest using 2 gradle runner steps after another and run the 2 commands separately, and in the bundleRelease version change the export options from apk to aab

sophiataskova commented 5 years ago

@DSteve595 now you should be able to, using app_file_include_filter

DSteve595 commented 5 years ago

Thanks so much!