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

Build fails for all Android library modules #4

Open
drewhamilton opened this issue Jun 24, 2019 · 4 comments
Open

Build fails for all Android library modules #4

drewhamilton opened this issue Jun 24, 2019 · 4 comments

Comments

@drewhamilton
Copy link

@drewhamilton drewhamilton commented Jun 24, 2019

For Android library modules, the failure message is "Could not find the exported app APK".

It makes sense that an app APK can't be found, because Android libraries don't produce APKs. This step, either as a built-in fallback or by explicit option, should allow builds without an app APK, and should still run the test APK.

@bitce

This comment has been minimized.

Copy link

@bitce bitce commented Jul 3, 2019

Hi @drewhamilton!

Could you please post a build URL related to this issue here?

@drewhamilton

This comment has been minimized.

Copy link
Author

@drewhamilton drewhamilton commented Jul 7, 2019

@bitce I have no idea if you can view this link or how to make it public if not: https://app.bitrise.io/build/6ffc1ae223b01877#?tab=log.

The relevant portion of the log is this:

> Task :javatime:assembleDebugAndroidTest

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 52s
73 actionable tasks: 62 executed, 11 up-to-date

Export APKs:
  Export [ javatime-debug-androidTest.apk => $BITRISE_DEPLOY_DIR/javatime-debug-androidTest.apk ]
Could not find the exported app APK
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | android-build-for-ui-testing@0.1.1 (exit code: 1)             | 61 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...e-steplib/bitrise-step-android-build-for-ui-testing/issues |
| Source: ...hub.com/bitrise-steplib/bitrise-step-android-build-for-ui-testing |
+---+---------------------------------------------------------------+----------+

As you can see, it finds the test APK (javatime-debug-androidTest.apk) but cannot find the exported app APK (because this is a library module that produces an AAR; there is no app APK).

Searching 'main.go' in this repo shows that an app APK is checked for unconditionally:

if exportedAppArtifact == "" {
	return fmt.Errorf("Could not find the exported app APK")
}

This discussion suggests a workaround of generating an empty APK to upload. I don't want to do this. So it would be nice if this plugin handled it for me:

  • If the APK is not actually needed and Firebase works fine without it, allow there to be no app APK without failing the build.
  • If the APK is absolutely required by Firebase, include a dummy APK in this repo and fall back to that if none is found from the build.

It would be fine if allowing this was opt-in by providing a "This is a library module" checkbox or something.

@Roland-Bak

This comment has been minimized.

Copy link

@Roland-Bak Roland-Bak commented Jul 18, 2019

@drewhamilton Thank you for the input! Your request definitely makes sense, so we created a feature request of it on our discuss board, so everyone can vote for their preferred feature and we can see what's mostly in demand. You can track this here:
https://discuss.bitrise.io/t/update-android-library-module-builds-to-work-without-apks/9664

@drewhamilton

This comment has been minimized.

Copy link
Author

@drewhamilton drewhamilton commented Jul 18, 2019

Voted. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.