build(deps): migrate to Google fork of Smali

This commit is contained in:
Skylot 2023-12-04 20:42:09 +00:00
parent 2de91f9a3a
commit 5d56001826
No known key found for this signature in database
GPG Key ID: 47866607B16F25C8
6 changed files with 17 additions and 23 deletions

View File

@ -27,7 +27,7 @@ dependencies {
repositories {
mavenCentral()
// required for `aapt-proto` and `r8`
// required for: aapt-proto, r8, smali
google()
}

View File

@ -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
}
}

View File

@ -3,14 +3,15 @@ package jadx.plugins.input.dex.utils;
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);

View File

@ -7,8 +7,8 @@ import java.util.Collections;
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 {

View File

@ -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
}

View File

@ -15,11 +15,12 @@ import java.util.concurrent.Callable;
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);