feat(script): use cache for compiled scripts

This commit is contained in:
Skylot
2023-10-27 20:49:11 +01:00
parent 192a8116f1
commit 41d986bdca
4 changed files with 132 additions and 4 deletions
@@ -3,14 +3,28 @@ package jadx.plugins.script
import jadx.api.JadxArgs
import jadx.api.JadxDecompiler
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import java.io.File
import kotlin.system.measureTimeMillis
import kotlin.time.DurationUnit
import kotlin.time.toDuration
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class JadxScriptPluginTest {
@BeforeAll
fun disableCache() {
System.setProperty("JADX_SCRIPT_CACHE_ENABLE", "false")
}
@AfterAll
fun clear() {
System.clearProperty("JADX_SCRIPT_CACHE_ENABLE")
}
@Test
fun integrationTest() {
val args = JadxArgs()