-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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(ci): ensure testlib
is built
#17531
Conversation
added a dependency on the assemblePlayDebugAndroidTest task from AnkiDroid's androidTest in build.gradle.
First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there 👋 welcome to AnkiDroid
One subtle suggestion here but otherwise, this seems like it should work!
You erased the testing section of the PR template though so I am not sure how you proved to yourself it worked?
Please re-insert that section, then show the results of a ./gradlew androidTest -v
(I think -v
prints out the executed tasks...) before and after the change to see if the new task dependency is definitely missing before and definitely there after in the list of executed tasks
@@ -281,6 +281,11 @@ tasks.register('copyTestLibIntoAndroidTest', Copy) { | |||
tasks.named('preBuild').configure { dependsOn('copyTestLibIntoAndroidTest') } | |||
tasks.named('runKtlintCheckOverAndroidTestSourceSet').configure { mustRunAfter('copyTestLibIntoAndroidTest') } | |||
|
|||
// to run manually: `./gradlew :testlib:assemblePlayDebugAndroidTest` | |||
tasks.named("assemblePlayDebugAndroidTest") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other task dependencies use .configure
for a reason: it is done that way in order to work well with Gradle's ability to defer configuration, which can speed compilation for jobs that don't use some tasks and thus don't need to configure them
This was suggested as something to change via gradle lint rules in one of the recent gradle updates
tasks.named("assemblePlayDebugAndroidTest") { | |
tasks.named("assemblePlayDebugAndroidTest").configure { |
Actually, it looks like it didn't compile at all
Did you run this prior to submitting it? |
@mikehardy Shall i work on this issue? |
@tanishy7777 do you intend to get this working locally and respond to the comment? @MritunjayTiwari14 I'm not sure what you are talking about. I'm not sure what hamcrest etc have to do with it, I don't see any errors related to that. |
@mikehardy Alright, just saw the other PR where David had already fixed the Dependency issue. Sorry for disturbing. |
To note: this issue (#17520) is a follow-on from that PR |
@david-allison just want to confirm that is Gradle still throwing those duplicate class errors while trying to compile, because in #17520 which is still unresolved the compilation still throws duplicate class errors. |
Looks fine to me. The point of this issue is to make sure these errors don't reappear
|
Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically |
Added a dependency on the assemblePlayDebugAndroidTest task from AnkiDroid's androidTest in build.gradle.
Purpose / Description
Fixes the issue #17520 by adding a dependency on the assemblePlayDebugAndroidTest task from AnkiDroid's androidTest in build.gradle.
Fixes
testlib
is built #17520Checklist
Please, go through these checks before submitting the PR.