Skip to content

Commit

Permalink
Fix: breaking changes in dexlib2
Browse files Browse the repository at this point in the history
  • Loading branch information
nasthu committed Jun 13, 2018
1 parent 10fcaf5 commit 18e8458
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions server/src/test/java/com/defold/extender/IntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.google.common.collect.Lists;
import org.apache.commons.io.FileUtils;
import org.jf.dexlib2.DexFileFactory;
import org.jf.dexlib2.Opcodes;
import org.jf.dexlib2.iface.ClassDef;
import org.jf.dexlib2.iface.DexFile;
import org.junit.AfterClass;
Expand Down Expand Up @@ -300,7 +301,7 @@ public void buildAndroidCheckClassesDex() throws IOException, ExtenderClientExce
Files.copy(in, tmpClassesDexPath, StandardCopyOption.REPLACE_EXISTING);

// Verify that classes.dex contains our Dummy class
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), 19 ); // api level
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), Opcodes.forApi(19));
Set<String> dexClasses = new HashSet<>();
for (ClassDef classDef: dexFile.getClasses()) {
dexClasses.add(classDef.getType());
Expand Down Expand Up @@ -361,7 +362,7 @@ public void buildAndroidCheckClassesMultiDex() throws IOException, ExtenderClien
Files.copy(in, tmpClassesDexPath, StandardCopyOption.REPLACE_EXISTING);

// Verify that classes.dex contains our Dummy class
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), 19 ); // api level
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), Opcodes.forApi(19));
Set<String> dexClasses = new HashSet<>();
for (ClassDef classDef: dexFile.getClasses()) {
dexClasses.add(classDef.getType());
Expand Down Expand Up @@ -421,7 +422,7 @@ public void buildAndroidCheckCompiledJava() throws IOException, ExtenderClientEx
Files.copy(in, tmpClassesDexPath, StandardCopyOption.REPLACE_EXISTING);

// Verify that classes.dex contains our Dummy class and our compiled Java class
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), 19 ); // api level
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), Opcodes.forApi(19));
Set<String> dexClasses = new HashSet<>();
for (ClassDef classDef: dexFile.getClasses()) {
dexClasses.add(classDef.getType());
Expand Down Expand Up @@ -485,7 +486,7 @@ public void buildAndroidJavaJarDependency() throws IOException, ExtenderClientEx
Files.copy(in, tmpClassesDexPath, StandardCopyOption.REPLACE_EXISTING);

// Verify that classes.dex contains our Dummy class and our compiled Java class
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), 19 ); // api level
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), Opcodes.forApi(19));
Set<String> dexClasses = new HashSet<>();
for (ClassDef classDef: dexFile.getClasses()) {
dexClasses.add(classDef.getType());
Expand Down Expand Up @@ -545,7 +546,7 @@ public void buildAndroidRJar() throws IOException, ExtenderClientException, Inte
Files.copy(in, tmpClassesDexPath, StandardCopyOption.REPLACE_EXISTING);

// Verify that classes.dex contains our Dummy class and our compiled Java class
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), 19 ); // api level
DexFile dexFile = DexFileFactory.loadDexFile(tmpClassesDexPath.toFile().getAbsolutePath(), Opcodes.forApi(19));
Set<String> dexClasses = new HashSet<>();
for (ClassDef classDef: dexFile.getClasses()) {
dexClasses.add(classDef.getType());
Expand Down

0 comments on commit 18e8458

Please sign in to comment.