I have Project A and B in my system and B uses some of the packages defined in A and I have added some classes in project A but i am not able to reference them in B.
What I have tried
Can some please advise me how can I achieve this ?
Thanks
Assuming you did step 2 in project B, it should work (although I would like do a clean
as well): ./gradlew clean build --refresh-dependencies
If you do this a lot (and esp if you find it tedious to type --refresh-dependencies
every time, you could consider marking the dependency from project A as changing
...
configurations.all { resolutionStrategy.cacheChangingModulesFor 0, "seconds" }
dependencies {
implementation("com.example.group:my-artifact:3.2.1")) { changing = true }
// ...
}
The configurations
block tells Gradle how to handle changing modules, and the the changing = true
will flag individual dependencies. Then, every Gradle build, it will try to update the dependency.