mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-11 21:37:47 +01:00
Merge branch 'master' into refine
This commit is contained in:
commit
5c6d091f39
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -2,3 +2,6 @@
|
||||
|
||||
*.bat text eol=crlf
|
||||
*.jar binary
|
||||
/brut.apktool/apktool-lib/src/main/resources/prebuilt/windows/* binary
|
||||
/brut.apktool/apktool-lib/src/main/resources/prebuilt/macosx/* binary
|
||||
/brut.apktool/apktool-lib/src/main/resources/prebuilt/linux/* binary
|
||||
|
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -1,11 +1,8 @@
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.java'
|
||||
- '**.gradle'
|
||||
- 'brut.apktool/apktool-lib/src/main/resources/**'
|
||||
- '.github/workflows/**'
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.java'
|
||||
@ -18,11 +15,10 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Build/Test (JDK ${{ matrix.java }}, ${{ matrix.os }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 10
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macOS-latest, windows-latest ]
|
||||
java: [ 8, 9, 10, 11, 12, 13, 14 ]
|
||||
java: [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
|
11
INTERNAL.md
11
INTERNAL.md
@ -266,7 +266,7 @@ The steps below are different per flavor and operating system.
|
||||
#### Linux / Windows
|
||||
1. `source build/envsetup.sh`
|
||||
2. `lunch sdk-eng`
|
||||
3. `make LOCAL_MULTILIB=64 USE_NINJA=false aapt`
|
||||
3. `m aapt`
|
||||
4. `strip out/host/linux-x86/bin/aapt`
|
||||
5. `strip out/host/linux-x86/bin/aapt_64`
|
||||
6. `strip out/host/windows-x86/bin/aapt.exe`
|
||||
@ -274,9 +274,8 @@ The steps below are different per flavor and operating system.
|
||||
|
||||
#### Mac
|
||||
1. `source build/envsetup.sh`
|
||||
2. `lunch sdk-eng`
|
||||
3. `make LOCAL_MULTILIB=64 USE_NINJA=false aapt`
|
||||
4. `strip out/host/darwin-x86/bin/aapt_64`
|
||||
2. `m aapt`
|
||||
3. `strip out/host/darwin-x86/bin/aapt_64`
|
||||
|
||||
32/64 bit binaries will be built for Linux and Windows.
|
||||
|
||||
@ -285,7 +284,7 @@ The steps below are different per flavor and operating system.
|
||||
The steps below are different per flavor and operating system.
|
||||
|
||||
#### Linux / Windows
|
||||
1. `make LOCAL_MULTILIB=64 USE_NINJA=false aapt2`
|
||||
1. `m aapt2`
|
||||
2. `strip out/host/linux-x86/bin/aapt2`
|
||||
3. `strip out/host/linux-x86/bin/aapt2_64`
|
||||
4. `strip out/host/windows-x86/bin/aapt2.exe`
|
||||
@ -294,7 +293,7 @@ The steps below are different per flavor and operating system.
|
||||
#### Mac
|
||||
1. `export ANDROID_JAVA_HOME=/Path/To/Jdk`
|
||||
2. `source build/envsetup.sh`
|
||||
3. `make LOCAL_MULTILIB=64 USE_NINJA=false aapt2`
|
||||
3. `m aapt2`
|
||||
4. `strip out/host/darwin-x86/bin/aapt2_64`
|
||||
|
||||
#### Confirming aapt/aapt2 builds are static
|
||||
|
@ -668,6 +668,9 @@ final public class AndrolibResources {
|
||||
return ResConfigFlags.SDK_R;
|
||||
case "S":
|
||||
return ResConfigFlags.SDK_S;
|
||||
case "T":
|
||||
case "Tiramisu":
|
||||
return ResConfigFlags.SDK_DEVELOPMENT;
|
||||
default:
|
||||
return Integer.parseInt(sdkVersion);
|
||||
}
|
||||
|
@ -536,10 +536,12 @@ public class ResConfigFlags {
|
||||
public final static byte SDK_P = 28;
|
||||
public final static byte SDK_Q = 29;
|
||||
public final static byte SDK_R = 30;
|
||||
public final static byte SDK_S = 31;
|
||||
public final static byte SDK_T = 32;
|
||||
|
||||
// AOSP has this as 10,000 for dev purposes.
|
||||
// platform_frameworks_base/commit/c7a1109a1fe0771d4c9b572dcf178e2779fc4f2d
|
||||
public final static int SDK_S = 10000;
|
||||
public final static int SDK_DEVELOPMENT = 10000;
|
||||
|
||||
public final static byte ORIENTATION_ANY = 0;
|
||||
public final static byte ORIENTATION_PORT = 1;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -18,11 +18,9 @@ package brut.androlib.androlib;
|
||||
|
||||
import brut.androlib.BaseTest;
|
||||
import brut.androlib.res.AndrolibResources;
|
||||
import org.junit.Test;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.*;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class InvalidSdkBoundingTest extends BaseTest {
|
||||
@ -75,6 +73,16 @@ public class InvalidSdkBoundingTest extends BaseTest {
|
||||
assertEquals("25", androlibResources.checkTargetSdkVersionBounds());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkForShortHandSTag() {
|
||||
AndrolibResources androlibResources = new AndrolibResources();
|
||||
|
||||
Map<String, String> sdkInfo = new LinkedHashMap<>();
|
||||
sdkInfo.put("targetSdkVersion", "S");
|
||||
|
||||
androlibResources.setSdkInfo(sdkInfo);
|
||||
assertEquals("31", androlibResources.checkTargetSdkVersionBounds());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkForShortHandSdkTag() {
|
||||
@ -92,7 +100,7 @@ public class InvalidSdkBoundingTest extends BaseTest {
|
||||
AndrolibResources androlibResources = new AndrolibResources();
|
||||
|
||||
Map<String, String> sdkInfo = new LinkedHashMap<>();
|
||||
sdkInfo.put("targetSdkVersion", "S");
|
||||
sdkInfo.put("targetSdkVersion", "T");
|
||||
|
||||
androlibResources.setSdkInfo(sdkInfo);
|
||||
assertEquals("10000", androlibResources.checkTargetSdkVersionBounds());
|
||||
|
Loading…
Reference in New Issue
Block a user