mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-05 08:14:26 +02:00
Fixes issue #395 - checks for aapt during build
This commit is contained in:
parent
92eae964a9
commit
0673c1e2dc
1
CHANGES
1
CHANGES
@ -6,6 +6,7 @@ v1.5.2 (TBA)
|
|||||||
-Moved build.gradle files to each sub-project, more organization :)
|
-Moved build.gradle files to each sub-project, more organization :)
|
||||||
-Fixed (issue #394) - Prevented duplicated files in final jar which saved around 1.2mb.
|
-Fixed (issue #394) - Prevented duplicated files in final jar which saved around 1.2mb.
|
||||||
-Added Proguard to drop final jar size from 6.2mb to 2.6mb.
|
-Added Proguard to drop final jar size from 6.2mb to 2.6mb.
|
||||||
|
-Fixed (issue #395) - Added check for "aapt" in unit-tests.
|
||||||
|
|
||||||
v1.5.1 PR3 (Released December 23 - 2012) Codename: Pre Release 3
|
v1.5.1 PR3 (Released December 23 - 2012) Codename: Pre Release 3
|
||||||
-Reverted "Prevents removal of <uses-sdk> on decompile, but then throws warning on rebuild (issue #366)"
|
-Reverted "Prevents removal of <uses-sdk> on decompile, but then throws warning on rebuild (issue #366)"
|
||||||
|
@ -115,6 +115,11 @@ public class BuildAndDecodeTest {
|
|||||||
public void xmlReferencesTest() throws BrutException {
|
public void xmlReferencesTest() throws BrutException {
|
||||||
compareXmlFiles("res/xml/references.xml");
|
compareXmlFiles("res/xml/references.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void aaptPresent() throws BrutException {
|
||||||
|
checkIfAaptPresent();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void qualifiersTest() throws BrutException {
|
public void qualifiersTest() throws BrutException {
|
||||||
@ -122,6 +127,19 @@ public class BuildAndDecodeTest {
|
|||||||
"-xlarge-long-land-desk-night-xhdpi-finger-keyssoft-12key" +
|
"-xlarge-long-land-desk-night-xhdpi-finger-keyssoft-12key" +
|
||||||
"-navhidden-dpad/strings.xml");
|
"-navhidden-dpad/strings.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkIfAaptPresent() throws BrutException {
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Process proc = Runtime.getRuntime().exec("aapt");
|
||||||
|
BufferedReader br = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
|
||||||
|
String line = null;
|
||||||
|
while ( (line = br.readLine()) != null){}
|
||||||
|
} catch (Exception ex){
|
||||||
|
System.out.println("Please install 'aapt' to your path. See project website for more information.");
|
||||||
|
throw new BrutException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void compareValuesFiles(String path) throws BrutException {
|
private void compareValuesFiles(String path) throws BrutException {
|
||||||
compareXmlFiles("res/" + path,
|
compareXmlFiles("res/" + path,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user