afreakyelf / Pdf-Viewer

A Lightweight PDF Viewer Android library which only occupies around 80kb while most of the Pdf viewer occupies up to 16MB space.
https://afreakyelf.github.io/Pdf-Viewer/
MIT License
692 stars 150 forks source link

How to import library locally for contribution? #110

Closed mrgarciamanuel closed 3 months ago

mrgarciamanuel commented 4 months ago

Hi, i'm new in this library and want to use it a projet, but i have some feature in mind that this library does not provide yet.

I just forked the repo and created my own branch, but i don't know how to use it locally in some projects.

From my resources, i think i have to generate .AAR/.JAR file of this library and import it in my project dependecies.

Can u please give some help.

Thank u for your attention.

github-actions[bot] commented 4 months ago

Thank you for creating your first issue. We appreciate your help in making this project better. We will look into it, and get back to you soon.

afreakyelf commented 4 months ago

Sure! To use your forked library locally, follow these steps:

In your library module, generate the .AAR or .JAR file:

Go to Build > Build Bundle(s) / APK(s) > Build APK(s) or Build AAR. Alternatively, use Gradle commands like ./gradlew assembleRelease for AAR. Once generated, locate the .AAR or .JAR file in the build/outputs/ directory.

In your project, create a libs folder inside the app module if it doesn't already exist, and copy the .AAR or .JAR file there.

Add the file as a dependency in your project's build.gradle:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
    // include other dependencies
}

Sync your project with Gradle files.

Now, your project should be able to use the local version of the library.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 3 months ago

This issue was closed because it has been stalled for 5 days with no activity.