diff --git a/buildSrc/src/main/kotlin/jadx-java.gradle.kts b/buildSrc/src/main/kotlin/jadx-java.gradle.kts index 13576338d60..4a1e93a1474 100644 --- a/buildSrc/src/main/kotlin/jadx-java.gradle.kts +++ b/buildSrc/src/main/kotlin/jadx-java.gradle.kts @@ -27,7 +27,7 @@ dependencies { repositories { mavenCentral() - // required for `aapt-proto` and `r8` + // required for: aapt-proto, r8, smali google() } diff --git a/jadx-plugins/jadx-dex-input/build.gradle.kts b/jadx-plugins/jadx-dex-input/build.gradle.kts index 6803e6c289b..41e396d91cf 100644 --- a/jadx-plugins/jadx-dex-input/build.gradle.kts +++ b/jadx-plugins/jadx-dex-input/build.gradle.kts @@ -6,17 +6,13 @@ dependencies { api(project(":jadx-core")) // TODO: finish own smali printer - implementation("org.smali:baksmali:2.5.2") { + implementation("com.android.tools.smali:smali-baksmali:3.0.3") { exclude(group = "com.beust", module = "jcommander") // exclude old jcommander namespace } - // force the latest version for smali - constraints { - implementation("com.google.guava:guava:30.1.1-jre") - } + implementation("com.google.guava:guava:32.1.3-jre") // force the latest version for smali // compile smali files in tests - testImplementation("org.smali:smali:2.5.2") { - exclude(group = "junit", module = "junit") // ignore junit 4 transitive dependency + testImplementation("com.android.tools.smali:smali:3.0.3") { exclude(group = "com.beust", module = "jcommander") // exclude old jcommander namespace } } diff --git a/jadx-plugins/jadx-dex-input/src/main/java/jadx/plugins/input/dex/utils/SmaliUtils.java b/jadx-plugins/jadx-dex-input/src/main/java/jadx/plugins/input/dex/utils/SmaliUtils.java index 88ddd6fb97f..d96affc3929 100644 --- a/jadx-plugins/jadx-dex-input/src/main/java/jadx/plugins/input/dex/utils/SmaliUtils.java +++ b/jadx-plugins/jadx-dex-input/src/main/java/jadx/plugins/input/dex/utils/SmaliUtils.java @@ -3,14 +3,15 @@ import java.io.PrintWriter; import java.io.StringWriter; -import org.jf.baksmali.Adaptors.ClassDefinition; -import org.jf.baksmali.BaksmaliOptions; -import org.jf.baksmali.formatter.BaksmaliWriter; -import org.jf.dexlib2.dexbacked.DexBackedClassDef; -import org.jf.dexlib2.dexbacked.DexBackedDexFile; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.android.tools.smali.baksmali.Adaptors.ClassDefinition; +import com.android.tools.smali.baksmali.BaksmaliOptions; +import com.android.tools.smali.baksmali.formatter.BaksmaliWriter; +import com.android.tools.smali.dexlib2.dexbacked.DexBackedClassDef; +import com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile; + public class SmaliUtils { private static final Logger LOG = LoggerFactory.getLogger(SmaliUtils.class); diff --git a/jadx-plugins/jadx-dex-input/src/test/java/jadx/plugins/input/dex/utils/SmaliTestUtils.java b/jadx-plugins/jadx-dex-input/src/test/java/jadx/plugins/input/dex/utils/SmaliTestUtils.java index 3893532c807..45d57b89a36 100644 --- a/jadx-plugins/jadx-dex-input/src/test/java/jadx/plugins/input/dex/utils/SmaliTestUtils.java +++ b/jadx-plugins/jadx-dex-input/src/test/java/jadx/plugins/input/dex/utils/SmaliTestUtils.java @@ -7,8 +7,8 @@ import java.util.List; import java.util.stream.Collectors; -import org.jf.smali.Smali; -import org.jf.smali.SmaliOptions; +import com.android.tools.smali.smali.Smali; +import com.android.tools.smali.smali.SmaliOptions; public class SmaliTestUtils { diff --git a/jadx-plugins/jadx-smali-input/build.gradle.kts b/jadx-plugins/jadx-smali-input/build.gradle.kts index c441e0a8cf3..3aa48f9f2c1 100644 --- a/jadx-plugins/jadx-smali-input/build.gradle.kts +++ b/jadx-plugins/jadx-smali-input/build.gradle.kts @@ -7,12 +7,8 @@ dependencies { implementation(project(":jadx-plugins:jadx-dex-input")) - implementation("org.smali:smali:2.5.2") { - exclude(group = "junit", module = "junit") // ignore junit 4 transitive dependency + implementation("com.android.tools.smali:smali:3.0.3") { exclude(group = "com.beust", module = "jcommander") // exclude old jcommander namespace } - // force the latest version for smali - constraints { - implementation("com.google.guava:guava:30.1.1-jre") - } + implementation("com.google.guava:guava:32.1.3-jre") // force the latest version for smali } diff --git a/jadx-plugins/jadx-smali-input/src/main/java/jadx/plugins/input/smali/SmaliConvert.java b/jadx-plugins/jadx-smali-input/src/main/java/jadx/plugins/input/smali/SmaliConvert.java index e5753657912..15260a5a2ff 100644 --- a/jadx-plugins/jadx-smali-input/src/main/java/jadx/plugins/input/smali/SmaliConvert.java +++ b/jadx-plugins/jadx-smali-input/src/main/java/jadx/plugins/input/smali/SmaliConvert.java @@ -15,11 +15,12 @@ import java.util.stream.Collectors; import org.jetbrains.annotations.Nullable; -import org.jf.smali.Smali; -import org.jf.smali.SmaliOptions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.android.tools.smali.smali.Smali; +import com.android.tools.smali.smali.SmaliOptions; + public class SmaliConvert implements Closeable { private static final Logger LOG = LoggerFactory.getLogger(SmaliConvert.class);