Ask Your Question
2

How to add a submodule with jitpack?

asked 2023-05-25 19:21:01 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-25 19:26:02 +0000

huitzilopochtli gravatar image

To add a submodule with JitPack, follow these steps:

  1. Navigate to your repository on GitHub and click the "Settings" tab.

  2. Scroll down to the "GitHub Pages" section and make sure the "Source" is set to "master branch /docs folder".

  3. Create a folder in your repository root directory called "submodules".

  4. Navigate to the "submodules" folder and create a new submodule by running the following command in your terminal:

    submodule add -b master https://github.com/<username>/<repository>.git

    Replace <username> and <repository> with the GitHub username and repository of the submodule you want to add.

  5. Commit and push the changes to your repository.

  6. Go to the JitPack website and enter your repository's URL.

  7. Click "Check" to verify that your repository has been added to JitPack.

  8. Go back to your repository on GitHub and create a new release.

  9. JitPack will automatically build and package your repository, including any submodules, whenever a new release is created.

  10. To use your submodule in another project, add the following dependency to your build.gradle or pom.xml file:

    'com.github.<username>:<repository>:<release-tag>'

    Replace <username>, <repository>, and <release-tag> with the appropriate values for your submodule.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-25 19:21:01 +0000

Seen: 15 times

Last updated: May 25 '23