-
Notifications
You must be signed in to change notification settings - Fork 134
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
Issue with unit tests in multi-module project #84
Comments
+1 I reproduce this exact issue with the multi-modules project I'm working on and the usage of |
I'm not very experienced in how gradle works in terms of icluding build dependencies, but from my understanding gradle won't include dependencies of your test dependencies in the resulting artifact. What it means is that test dependencies are not transitive, so you must include |
since this has been open for a while, for anyone else who lands here, in a similar setup i ran into the same issue. adding the second line suggested above ( // in another module's build.gradle.kts
// ...
api("com.jakewharton.threetenabp:threetenabp:_")
testApi("org.threeten:threetenbp:_") note that i have in ...
version.com.jakewharton.threetenabp..threetenabp=1.2.4
version.org.threeten..threetenbp=1.4.5
... |
But don't forget that these versions use different TZDB versions, as ThreeTenBP 1.4.5 uses 2020b, while ThreeThenABP 1.2.4 uses 2020a. |
I was seeing the unit testing issues described in #14, and successfully applied the solutions outlined - however when I try to declare the threetenabp dependencies in another module via gradle's
api
andtestApi
commands, I'm still seeing theZoneRulesException: No time-zone data files registered
error.It's pretty clear that the change to
api
is the problem, but I'm just curious if someone knows why and/or how I can possibly change my gradle setup to get it to work? It's ideal to declare dependencies like this that are re-used throughout multiple modules in the base "core" module and let them transitively apply, instead of having to redeclare in every module's gradle file. Any help is appreciated :)I have a
core
module and a mainapp
module that depends on it, relevant info from gradle files below:Declaring in
app
build.gradle (working):Declaring in
core
build.gradle (not working):The text was updated successfully, but these errors were encountered: