question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use as git submodule?

See original GitHub issue

Hi,

I cloned into our vendor directory:

git submodule add [url] vendor/folio-reader

After, i have assed to settings.gradle:

include ':folio-reader'
project(':folio-reader').projectDir = file("../vendor/folio-reader")

After, i have added to dependencies:

implementation project(':folioreader')

But i got error:

Unable to resolve dependency for ':app@ubookDebug/compileClasspath': Could not resolve project :folioreader.

image

Can someone help me use it as git submodule?

Thanks.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hrishikesh-kadamcommented, Dec 26, 2018

@prsolucoes Please download this zip file https://drive.google.com/open?id=1qbfEZ_nWZK4BsKhlsWuD0xpJ8CoOGCJG

I have tried to mock a project structure like yours. Important steps to get started for you will be -

  1. Change publishedGroupId and artifact, like I did in RootFolder\vendor\FolioReader-Android\folioreader\build.gradle
  2. Run gradlew install on this path - RootFolder\vendor\FolioReader-Android. This will generate all the necessary files like .aar, .pom, etc in your {user}\m2\respository\com\ubook\folioreader\0.5.1.internal
  3. Now add mavenLocal() and jitpack maven url like I did in RootFolder\MyApplication\build.gradle
  4. Add multidex support in your app module. You can read it more here - https://developer.android.com/studio/build/multidex, also I have enabled multidex in attached project.
  5. Lastly just see how I added implementation statement in RootFolder\MyApplication\app\build.gradle

In short, what this does is publishes your modified FolioReader locally and imports it through gradle using mavenLocal() repo.

Also please close #310, let’s have conversation on this issue.

0reactions
sapthacommented, Jul 11, 2020

@prsolucoes Please download this zip file https://drive.google.com/open?id=1qbfEZ_nWZK4BsKhlsWuD0xpJ8CoOGCJG

I have tried to mock a project structure like yours. Important steps to get started for you will be -

  1. Change publishedGroupId and artifact, like I did in RootFolder\vendor\FolioReader-Android\folioreader\build.gradle
  2. Run gradlew install on this path - RootFolder\vendor\FolioReader-Android. This will generate all the necessary files like .aar, .pom, etc in your {user}\m2\respository\com\ubook\folioreader\0.5.1.internal
  3. Now add mavenLocal() and jitpack maven url like I did in RootFolder\MyApplication\build.gradle
  4. Add multidex support in your app module. You can read it more here - https://developer.android.com/studio/build/multidex, also I have enabled multidex in attached project.
  5. Lastly just see how I added implementation statement in RootFolder\MyApplication\app\build.gradle

In short, what this does is publishes your modified FolioReader locally and imports it through gradle using mavenLocal() repo.

Also please close #310, let’s have conversation on this issue.

Hi @hrishikesh-kadam , The drive url is not accessible and so we cannot see the sample code you did. Can you please give sample for how you did the steps 1 and 3 above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git - Submodules - Git SCM
Let's start by adding an existing Git repository as a submodule of the repository that we're working on. To add a new submodule...
Read more >
How To Add and Update Git Submodules - devconnected
The first thing you want to do is to add a Git submodule to your main project. In order to add a Git...
Read more >
Git submodule - Atlassian
A git submodule is a record within a host git repository that points to a specific commit in another external repository. Submodules are...
Read more >
Working with submodules - The GitHub Blog
Before you add a repository as a submodule, first check to see if you have a better alternative available. Git submodules work well...
Read more >
How to create Git submodules in GitHub and GitLab by example
Clone the parent or top-level repository. · In the root of the parent, issue a “git submodule add” command and provide the GitHub...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found