In a pure Java module, I have a dependency to compile group: 'org.threeten', name: 'threetenbp', version: threeTenVersion, classifier: 'no-tzdb'
. I'm using the no-tzdb
variant because this module will be used inside an Android app and the the tzdb will be added by the Android module.
However, in my unit tests, I would like to be able to call some methods like DateTime.now()
which requires ThreeTen to be initializd with a tzdb.
I would like to know if there is a way to use another version of the library only during unit tests so that I can use the version with the tzdb installed ?
I already tried the following :
compile group: 'org.threeten', name: 'threetenbp', version: threeTenVersion, classifier: 'no-tzdb'
testCompile "org.threeten:threetenbp:threeTenVersion"
But the no-tzdb
is still used.
Thank you, Pierre