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

Use testOnly in unit-test sample. #1085

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions unit-test/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ android {
viewBinding true
prefab true
}

packagingOptions {
// Libraries that are wrongly included in the junit-gtest AAR that will
// end up in our APK if we don't explicitly exclude them.
jniLibs {
excludes += ['**/libadder.so', '**/libapptest.so', '**/libc++_shared.so']
// Gradle has no way of knowing which of the libraries in our
// CMakeLists.txt are for the app and which are for tests, so we
// have to tell it which libraries are test libraries. Without
// this, the test libraries will end up packaged in the real API
// and not just the test APK.
//
// If you copy this project, be sure to update this to specify the
// names of your own test libraries.
testOnly += ["**/libapp_tests.so"]
}
}

}

dependencies {
Expand Down
Loading