diff --git a/build.gradle b/build.gradle index f3f5d2a..83ddfdd 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ configurations { } dependencies { - implementation group: 'net.bytebuddy', name: 'byte-buddy-dep', version: '1.11.2' + implementation group: 'net.bytebuddy', name: 'byte-buddy-dep', version: '1.12.6' // byte buddy contains references to jna classes and without them the r8Jar step fails compileOnly group: 'net.java.dev.jna', name: 'jna', version: '5.8.0' @@ -143,11 +143,13 @@ task distJar(type: Jar) { // Pull raw advice classes from the shadow JAR, unminified: from (zipTree(shadowJar.getArchiveFile())) { include "tech/httptoolkit/javaagent/advice/**/*" + include "tech/httptoolkit/relocated/net/bytebuddy/agent/builder/**/*" } // Pull other source & bundled dependencies in their minified form, from R8: from (zipTree(r8Jar.outputs.files[0])) { exclude "tech/httptoolkit/javaagent/advice/**/*" + exclude "tech/httptoolkit/relocated/net/bytebuddy/agent/builder/**/*" } } diff --git a/r8-rules.txt b/r8-rules.txt index c1af55e..d99a5c2 100644 --- a/r8-rules.txt +++ b/r8-rules.txt @@ -1,6 +1,9 @@ -dontobfuscate +-dontoptimize -allowaccessmodification -keepattributes SourceFile, LineNumberTable, *Annotation* +-keep class tech.httptoolkit.relocated.net.bytebuddy.agent.builder.** { *; } + -keep class tech.httptoolkit.javaagent.** { *; } -keep class tech.httptoolkit.relocated.net.bytebuddy.asm.** { *; } \ No newline at end of file