GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing bumptech.github.io — Glide v4 : Contributing Glide v4 Fast and efficient image loading for Android - 中文版 - Edit this page
ContributingSourceContributions to Glide’s source are welcome! Contribution workflow.To make contributions to Glide’s source:
Building the project.To build the project, you typically need to run a single gradle command from the project root directory:
Glide currently requires a Java version <= 16 to build. Testing changesTestsGlide has two types of tests, unit tests that run on your local machine, and instrumentation tests that run on an emulator or device. Unit testsGlide’s unit tests are run as part of Glide’s build, so you can just use:
For a faster development cycle, you can also just run the unit tests for the main library with:
Annotation Processor testsTo test annotation processor changes run:
If you changed the output and the regression tests are failing, you can re-generate the test files by running:
If you do run Instrumentation tests.To run Glide’s instrumentation tests, you need to either plug in a real device, or add an emulator using Android Studio. It’s now quite easy to add an emulator in Android Studio and x86 emulators are quite fast to boot and run. As a result, I’d generally recommend running Glide’s instrumentation tests on an emulator. To run Glide’s instrumentation tests:
Sample projectsGlide’s tests are not completely comprehensive. To verify your changes work and do not negatively affect performance, it’s also a good idea to try running one or more of Glide’s sample projects. Glide’s sample projects are located in samples/. Sample projects can be built and installed onto a device or emulator using gradle:
For example, to run the Flickr demo:
Code StyleGlide uses Google’s Java style guide. To configure Android Studio to use Google’s style automatically, use the following steps:
To reformat a file after adding the style guide to Android Studio, open the ‘Code’ menu, then click ‘Reformat Code’. All new code should follow the given style guide and there’s some automated enforcement of the style guide in Glide’s test suite. Pull requests to fix style issues in Glide’s existing code are welcome as well. However, it’s generally best to keep changes that fix style guide issues in existing code and changes that add new code separate. Two pull requests are completely fine if you want to fix some style issues and contribute some new functionality or bug fixes. When in doubt, send us a single pull request and we will work with you. DocumentationVia GitHubTo make simple contributions to existing pages on this documentation site, use GitHub’s UI for editing markdown files. To do so:
Via the Git BranchFor more involved changes where you want to add or remove a page, change the order in which their displayed, add a new section or perform any other more advanced task, you’ll need to clone the git branch where the documentation site is stored. To do so:
Modifying existing pagesThe pages you see on the docs page are located in the Adding a new pageNew pages can be added using When adding a new page, make sure you add The final header will look something like this: Viewing your local changesTo view your local changes, you will need to install jekyll and the gems used by the docs page:
Then you can run jekyll locally:
Finally you can view a version of the site with your local changes: |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |