Skip to content

Commit

Permalink
remove unusaged methods
Browse files Browse the repository at this point in the history
  • Loading branch information
linsea committed Mar 28, 2017
1 parent 405c01c commit 49a585b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
36 changes: 0 additions & 36 deletions src/main/java/com/github/linsea/apk/compare/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public static void main(String[] args) {
outputDiffList.add(diffItem);
}

// outputCSV(args[2], outputDiffList);
outputMarkdown(args, outputDiffList);

System.out.println("APK compare done!");
Expand Down Expand Up @@ -124,26 +123,6 @@ private static void outputMarkdown(String[] filenames, List<DiffItem> outputDiff
}
}

private static void outputMarkdownDiffList(Writer writer, String title, List<DiffItem> outputDiffList) {
if (outputDiffList.size() > 0) {
try {
writer.append("## ").append(title).append("\n");
writer.append("| OLD FILE | NEW FILE | DIFF SIZE (byte)|\n");
writer.append("| -------- | -------- | -------------: |\n");
for (DiffItem diffItem : outputDiffList) {
writer.append("| ").append(diffItem.oldFilename).append(" | ")
.append(diffItem.newFilename).append(" | ")
.append(diffItem.diffSize.toString())
.append(" |\n");
writer.flush();
}
writer.write("\n");
} catch (IOException e) {
e.printStackTrace();
}
}
}

private static void outputMarkdownAddedList(Writer writer, List<DiffItem> outputDiffList) {
if (outputDiffList.size() > 0) {
try {
Expand Down Expand Up @@ -228,21 +207,6 @@ private static void outputMarkdownRemovedList(Writer writer, List<DiffItem> outp
}
}

private static void outputCSV(String filename, List<DiffItem> outputDiffList) {
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(filename + ".csv"));
writer.append("OLD FILE,NEW FILE,DIFF SIZE(byte)\n");
for (DiffItem diffItem : outputDiffList) {
writer.append(diffItem.oldFilename).append(',')
.append(diffItem.newFilename).append(',')
.append(diffItem.diffSize.toString())
.append('\n');
}
} catch (IOException e) {
e.printStackTrace();
}
}

private static Map<String, Long> getFilesInfo(String apkFilePath) {
Map<String, Long> map = new LinkedHashMap<String, Long>();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public class ApkCompareTest {
@Test
public void test() {
String[] args = new String[]{
"/home/andy/tmp/yymobile_client-6.0.0-SNAPSHOT-43116-official.apk",
"/home/andy/tmp/yymobile_client-6.0.5-SNAPSHOT-43366-official.apk",
"/home/andy/tmp/app-6.0.0.apk",
"/home/andy/tmp/app-6.0.5.apk",
"changes"};
Main.main(args);
}
Expand Down

0 comments on commit 49a585b

Please sign in to comment.