Adnan Begovic | 873364c | 2016-03-04 15:29:23 -0800 | [diff] [blame] | 1 | # Copyright (C) 2016 The CyanogenMod Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Adnan Begovic | 873364c | 2016-03-04 15:29:23 -0800 | [diff] [blame] | 15 | # Don't skip non public library classes, make sure we're not keeping anything which will get mapped against api verification. |
Adnan Begovic | ba01275 | 2016-03-03 10:51:57 -0800 | [diff] [blame] | 16 | -dontskipnonpubliclibraryclasses |
Adnan Begovic | 873364c | 2016-03-04 15:29:23 -0800 | [diff] [blame] | 17 | |
| 18 | # Do the same with class members |
Adnan Begovic | ba01275 | 2016-03-03 10:51:57 -0800 | [diff] [blame] | 19 | -dontskipnonpubliclibraryclassmembers |
Adnan Begovic | 873364c | 2016-03-04 15:29:23 -0800 | [diff] [blame] | 20 | |
Adnan Begovic | c0bd6d0 | 2016-03-07 11:16:58 -0800 | [diff] [blame] | 21 | # Keep test packages |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 22 | -keep class androidx.** { *; } |
Adnan Begovic | c0bd6d0 | 2016-03-07 11:16:58 -0800 | [diff] [blame] | 23 | -keep class android.test.** { *; } |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 24 | -keep public class * extends androidx.** { *; } |
Adnan Begovic | c0bd6d0 | 2016-03-07 11:16:58 -0800 | [diff] [blame] | 25 | -keep public class * extends android.test.** { *; } |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 26 | -keep interface androidx.** { *; } |
Adnan Begovic | c0bd6d0 | 2016-03-07 11:16:58 -0800 | [diff] [blame] | 27 | -keep interface android.test.** { *; } |
| 28 | |
| 29 | # Keep all junit classes |
| 30 | -keep class junit.** { *; } |
| 31 | -keep class org.junit.** { *; } |
| 32 | -keep interface junit.** { *; } |
| 33 | -keep interface org.junit.** { *; } |
| 34 | |
Adnan Begovic | 7ed4fca | 2016-03-07 11:48:37 -0800 | [diff] [blame] | 35 | # Keep compiled java classes from declared aidl's within the test package |
| 36 | -keep public class * extends android.os.IInterface { *; } |
| 37 | |
Adnan Begovic | 873364c | 2016-03-04 15:29:23 -0800 | [diff] [blame] | 38 | # Don't warn about the Android Support Test JUnit Runner |
Sam Mortimer | 3533d38 | 2019-05-13 15:28:04 -0700 | [diff] [blame] | 39 | -dontwarn androidx.** |
Adnan Begovic | c0bd6d0 | 2016-03-07 11:16:58 -0800 | [diff] [blame] | 40 | -dontwarn android.test.** |
Adnan Begovic | 873364c | 2016-03-04 15:29:23 -0800 | [diff] [blame] | 41 | |
| 42 | # Don't warn about junit |
Adnan Begovic | ba01275 | 2016-03-03 10:51:57 -0800 | [diff] [blame] | 43 | -dontwarn junit.** |
Adnan Begovic | c0bd6d0 | 2016-03-07 11:16:58 -0800 | [diff] [blame] | 44 | -dontwarn org.junit.** |
Adnan Begovic | 873364c | 2016-03-04 15:29:23 -0800 | [diff] [blame] | 45 | |
Danesh M | b6e71bc | 2016-06-08 11:25:08 -0700 | [diff] [blame] | 46 | # keep mockito methods |
| 47 | -keep class org.mockito.** { *; } |
| 48 | -keep interface org.mockito.** { *; } |
| 49 | -keep class com.google.dexmaker.** { *; } |
| 50 | -keep interface com.google.dexmaker.** { *; } |
| 51 | |
Adnan Begovic | 873364c | 2016-03-04 15:29:23 -0800 | [diff] [blame] | 52 | # Always process |
Adnan Begovic | ba01275 | 2016-03-03 10:51:57 -0800 | [diff] [blame] | 53 | -forceprocessing |
Adnan Begovic | 873364c | 2016-03-04 15:29:23 -0800 | [diff] [blame] | 54 | |
| 55 | # Make sure not to obfuscate the output |
Adnan Begovic | ba01275 | 2016-03-03 10:51:57 -0800 | [diff] [blame] | 56 | -dontobfuscate |