Sub AppStart (Args() As String)
Dim date As Long = DateTime.DateParse("12/31/1999")
Log(date)
javaExe = File.Combine(GetSystemProperty("java.home", ""), "bin/java")
File.MakeDir(folder, "temp")
File.Delete(folder, "Converted.jar")
temp = File.Combine(folder, "temp") ' The path
DeleteFolderRecursive(temp)
ExtractAndMergeClasses
Desugar
RemoveClassesFromAARs
Log("Done!")
End Sub
Sub ExtractAndMergeClasses
Log("extract")
For Each f As String In File.ListFiles(folder)
If f.EndsWith(".aar") Then
archiver.UnZipFiles(folder, f, folder, Array As String("classes.jar"), "")
archiver.UnZip(folder, "classes.jar", temp, "")
File.Delete(folder, "classes.jar")
End If
Next
Log("merge")
Run(zip, Array("-r", File.Combine(temp, "merged.jar"), ".")) ' combining temp path and filename
End Sub