Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
android-components
Commits
fd085f2d
Commit
fd085f2d
authored
Apr 11, 2019
by
Michael Droettboom
Browse files
1543487: Add docs about proguard rules
parent
fc991368
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/service/glean/README.md
View file @
fd085f2d
...
...
@@ -6,6 +6,7 @@ A client-side telemetry SDK for collecting metrics and sending them to Mozilla's
-
[
Before using the library
](
#before-using-the-library
)
-
[
Usage
](
#usage
)
-
[
Setting up the dependency
](
#setting-up-the-dependency
)
-
[
Setting up the proguard rule
](
#setting-up-the-proguard-rule
)
-
[
Integrating with the build system
](
#integrating-with-the-build-system
)
-
[
Initializing glean
](
#initializing-glean
)
-
[
Adding new metrics
](
#adding-new-metrics
)
...
...
@@ -33,6 +34,20 @@ Use Gradle to download the library from [maven.mozilla.org](https://maven.mozill
implementation "org.mozilla.components:service-glean:{latest-version}"
```
### Setting up the proguard rule
Applications that use Glean need to set up a proguard rule to prevent it from
removing some of the objects created for your application by the Glean code
generator.
Add the following rule to your
`proguard-rules.pro`
file, replacing
`APP_PACKAGE_NAME`
with your application's package name:
```
# Keep code generated from Glean Metrics
-keep APP_PACKAGE_NAME.GleanMetrics. ** { *; }
```
### Integrating with the build system
In order for Glean to work, a Python environment must be accessible at build time. This is done
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment