Skip to content

Commit

Permalink
build(deps): migrate to Google fork of Smali
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Dec 4, 2023
1 parent 2de91f9 commit 5d56001
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/jadx-java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {

repositories {
mavenCentral()
// required for `aapt-proto` and `r8`
// required for: aapt-proto, r8, smali
google()
}

Expand Down
10 changes: 3 additions & 7 deletions jadx-plugins/jadx-dex-input/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
8 changes: 2 additions & 6 deletions jadx-plugins/jadx-smali-input/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5d56001

Please sign in to comment.