Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
Author: aurimas@google.com
Updated: 6/6/2017

Instructions on how to compile and apply refaster rules to support library

0. Download error-prone and refaster jars
http://errorprone.info/docs/refaster will have up to date instructions

1. Compile the refaster rule (in this example IsAtLeastO.java)
java -cp /path/to/android.jar:/path/to/support-compat.jar:javac-9-dev-r3297-4.jar:error_prone_refaster-2.0.18.jar com.google.errorprone.refaster.RefasterRuleCompiler IsAtLeastO.java --out `pwd`/myrule.refaster

2. Update build to use the refaster rule
Add compiler args to error-prone in SupportLibraryPlugin.groovy
'-XepPatchChecks:refaster:/path/to/refaster/myrule.refaster',
'-XepPatchLocation:' + project.projectDir

3. Compile support library using the refaster rule
./gradlew assembleErrorProne

4. Apply patches
error-prone will produce patch files like "design/error-prone.patch" and to apply them, cd into the
directory e.g. "design" and then run:
patch -p0 -u -i error-prone.patch

5. Rules have been applied! Celebrate!
Morty Proxy This is a proxified and sanitized view of the page, visit original site.