1

Library information:

Question:

Hello! I'd like to use my fork in another kotlin project in the same way as I already use the main library.

Here's what I'm adding to my Gradle build file: implementation 'com.Trecobat:Calendar5DaysPerWeek:view:1.0.1'

The link to my repo git : https://github.com/Trecobat/Calendar5DaysPerWeek

If anyone can help me simply by using a fork with Android Studio, I'd love it :D !

The problem is that when I try to do this with the implementation in my kotlin project, it can't find the library.

Here's the error I found:

Could not find com.Trecobat:Calendar5DaysPerWeek:view. Required project :app Search in build.gradle files
1
  • Question needs formatting
    – SKD
    Commented Jan 30 at 10:18

1 Answer 1

1

You would need to publish your fork to some repository. The library you referenced is not resolved via GitHub but instead is resolved from maven central repository.

You can find a list of repositories Gradle visits to resolve your dependencies in your settings.gradle(.kts) file.

So what's the best course of action for you here?

In my opinion, if your changes can be useful in general sense you should create a PR against the main repo and if author merges it you will get access to your configuration as is with an added benefit that other people will be able to use your configuration as well

4
  • Hey thanks for your reply Maksym Moroz! The change I've made won't help the calendar library as a whole. It's a small modification that allows me to list the calendar in 5 days instead of 7. I've already discussed it with the owner of the library, who doesn't want to integrate it because of the risk of excessive maintenance. My aim is really to keep everything the same and to have a simple fork with this modification that I've made for use in my other kotlin mobile application. Because in this app I'll need a calendar in 7 and 5 days a week.
    – V4IER
    Commented Jan 29 at 10:34
  • In that case you will have to either publish it to a private repository like nexus or artifactory or, alternatively, you can build it locally and include with it a help of included build Gradle functionality docs.gradle.org/current/userguide/composite_builds.html Commented Jan 29 at 10:41
  • I have tested the compilation locally but I get an error when I use this: import com.kizitonwose.calendar.buildsrc.Plugins And I don't have this import locally ...
    – V4IER
    Commented Jan 29 at 10:55
  • Using composite builds is challenging but I documentation I linked has some good examples for you to follow Commented Jan 29 at 11:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.