Part of #10788
Once the list of types that survived trimming is known, we can generate ProGuard rules to specify which ACW/JCW Java classes we want to keep via the -keep class jni.class.Name { *; } rules.
- The build task needs to run after ILLink or ILC and before we run Java trimming (r8).
- This task should run incrementally only when ILLink or ILC produce different typemap.
- This task should not run in Debug at all.
Getting the list of types that are in the typemap might not be trivial at the moment:
Ideally, ILLink and ILC will produce some form of list of types which are included in the typemap, which would allow us to implement a unified build task to generate the proguard rules.
Part of #10788
Once the list of types that survived trimming is known, we can generate ProGuard rules to specify which ACW/JCW Java classes we want to keep via the
-keep class jni.class.Name { *; }rules.Getting the list of types that are in the typemap might not be trivial at the moment:
$(IlcGenerateMetadataLog)or$(IlcGenerateDgmlFile)) but these artifacts are quite large and writing them to disk, reading them from disk, and scanning them will add non-trivial time to the overall build.Ideally, ILLink and ILC will produce some form of list of types which are included in the typemap, which would allow us to implement a unified build task to generate the proguard rules.