import{_ as e,o as a,c as s,a as n}from"./app-OEUYI7Bq.js";const o={},l=n(`<h1 id="r8-proguard-obfuscation" tabindex="-1"><a class="header-anchor" href="#r8-proguard-obfuscation" aria-hidden="true">#</a> R8 &amp; ProGuard Obfuscation</h1><blockquote><p>In most scenarios, Android application installation packages can reduce size through obfuscation. Here is a configuration method for obfuscation rules.</p></blockquote><p>If you are using the <a href="../library/kavaref-extension">kavaref-extension</a> module and using the <code>TypeRef</code> feature, please add the following rule to your <code>proguard-rules.pro</code> file.</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#adbac7;">-keepattributes Signature</span></span>
<span class="line"><span style="color:#adbac7;">-keep,allowobfuscation class * extends com.highcapable.kavaref.extension.TypeRef</span></span>
<span class="line"><span style="color:#adbac7;">-keepclassmembers class * extends com.highcapable.kavaref.extension.TypeRef {</span></span>
<span class="line"><span style="color:#adbac7;">    &lt;init&gt;(...);</span></span>
<span class="line"><span style="color:#adbac7;">}</span></span>
<span class="line"><span style="color:#adbac7;"></span></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><code>TypeRef</code> has been annotated with <code>Keep</code>. If it doesn&#39;t work, please manually add the following rules to keep the class.</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#adbac7;">-keep class com.highcapable.kavaref.extension.TypeRef {*;}</span></span>
<span class="line"><span style="color:#adbac7;"></span></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,6),i=[l];function c(r,t){return a(),s("div",null,i)}const p=e(o,[["render",c],["__file","r8-proguard.html.vue"]]);export{p as default};
