Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Issue with unit tests in multi-module project #84

@erawhctim

Description

@erawhctim

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 and testApi commands, I'm still seeing the ZoneRulesException: 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 main app module that depends on it, relevant info from gradle files below:

Declaring in app build.gradle (working):

implementation project(':core')

implementation 'com.jakewharton.threetenabp:threetenabp:1.0.4'
testImplementation 'org.threeten:threetenbp:1.3.2'

Declaring in core build.gradle (not working):

api 'com.jakewharton.threetenabp:threetenabp:1.0.4'
testApi 'org.threeten:threetenbp:1.3.2'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions