Skip to content
Browse files

Fix import order issue for androidx

Bug: 948803
Change-Id: I61de64544305af054571c3aa5f535a8b95f611a9
Reviewed-by: Nico Weber <>
Reviewed-by: Sam Maier <>
Reviewed-by: Andrew Grieve <>
Commit-Queue: Yun Liu <>
Cr-Commit-Position: refs/heads/master@{#647808}
  • Loading branch information
Yun Liu Commit Bot
Yun Liu authored and Commit Bot committed Apr 4, 2019
1 parent 5b2567a commit f40227d9c888639f7676636b073768bc0103c408
Showing with 4 additions and 12 deletions.
  1. +3 −0 .clang-format
  2. +1 −4 styleguide/java/
  3. +0 −8 tools/android/checkstyle/chromium-style-5.0.xml
@@ -34,3 +34,6 @@ IPC_STRUCT_END|\

# TODO: Remove this once clang-format r357700 is rolled in.
JavaImportGroups: ['android', 'androidx', 'com', 'dalvik', 'junit', 'org', '', 'org.chromium', 'java', 'javax']
@@ -206,6 +206,7 @@ if (someConditional)
This is the order of the import groups:

1. android
1. androidx
1. com (except
1. dalvik
1. junit
@@ -215,10 +216,6 @@ This is the order of the import groups:
1. java
1. javax

This is enforced by the
[Chromium Checkstyle configuration](../../tools/android/checkstyle/chromium-style-5.0.xml)
under the ImportOrder module.

## Location
"Top level directories" are defined as directories with a GN file, such as
@@ -98,14 +98,6 @@
<module name="NoFinalizer">
<property name="severity" value="info"/>
<module name="ImportOrder">
<property name="severity" value="error"/>
<message key="import.ordering" value="Wrong order for {0} import. Follow the AOSP Java Code Style: When using Android Studio, use Ctrl+Alt+O to sort imports. A style configuration file can be found at //tools/android/android_studio/ChromiumStyle.xml."/>
<property name="groups" value="android, com, dalvik, junit, org,, org.chromium, java, javax"/>
<property name="ordered" value="true"/>
<property name="option" value="top"/>
<property name="separated" value="true"/>
<module name="RegexpSinglelineJava">
<property name="id" value="StringBufferCheck"/>
<property name="severity" value="error"/>

0 comments on commit f40227d

Please sign in to comment.
You can’t perform that action at this time.