Skip to content

Commit

Permalink
Merge pull request #36400 from ZhilkinSerg/android-2019-12-24
Browse files Browse the repository at this point in the history
Updated Android build process (2019-12-24)
  • Loading branch information
ZhilkinSerg authored Dec 24, 2019
2 parents e46c05b + 6df14b0 commit 5f963d1
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
!config/
!deps*.zip
*.iml
.cxx
.DS_Store
Expand Down
20 changes: 14 additions & 6 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ if (keystorePropertiesFile.exists()) {
def njobs = getProperty("j")

def localize = getProperty("localize").toBoolean()
def abi32 = getProperty("abi32").toBoolean()
def abi64 = getProperty("abi64").toBoolean()
def abi_arm_32 = getProperty("abi_arm_32").toBoolean()
def abi_arm_64 = getProperty("abi_arm_64").toBoolean()
def abi_x86_32 = getProperty("abi_x86_32").toBoolean()
def abi_x86_64 = getProperty("abi_x86_64").toBoolean()
def deps = getProperty("deps")
def override_version = getProperty("override_version")
def version_header_path = getProperty("version_header_path")
Expand All @@ -52,8 +54,8 @@ println("Using minSdkVersion: $override_minSdkVersion")
println("Using targetSdkVersion: $override_targetSdkVersion")
println("Using ndkBuildAppPlatform: $override_ndkBuildAppPlatform")

if (!abi32 && !abi64) {
throw new GradleException("Both `abi32` and `abi64` properties are set to false")
if (!abi_arm_32 && !abi_arm_64 && !abi_x86_32 && !abi_x86_64) {
throw new GradleException("All supported ABI properties are set to false!")
}
if (!file(deps).exists()) {
throw new GradleException("Dependencies file does not exist:" + deps)
Expand Down Expand Up @@ -154,12 +156,18 @@ android {
// Resets the list of ABIs that Gradle should create APKs for to none.
reset()
// Specifies a list of ABIs that Gradle should create APKs for.
if (abi32) {
if (abi_arm_32) {
include "armeabi-v7a"
}
if (abi64) {
if (abi_arm_64) {
include "arm64-v8a"
}
if (abi_x86_32) {
include "x86"
}
if (abi_x86_64) {
include "x86_64"
}
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
universalApk false
}
Expand Down
Binary file modified android/app/deps.zip
Binary file not shown.
Binary file added android/app/deps_debug.zip
Binary file not shown.
20 changes: 14 additions & 6 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,21 @@ j=2
# You can override this from the command line by passing "-Plocalize=#"
localize=true

# This property controls whether to build 32 bit ABI
# You can override this from the command line by passing "-Pabi32=#"
abi32=true
# This property controls whether to build arm 32 bit ABI
# You can override this from the command line by passing "-Pabi_arm_32=#"
abi_arm_32=true

# This property controls whether to build 64 bit ABI
# You can override this from the command line by passing "-Pabi64=#"
abi64=true
# This property controls whether to build arm 64 bit ABI
# You can override this from the command line by passing "-Pabi_arm_64=#"
abi_arm_64=true

# This property controls whether to build x86 32 bit ABI
# You can override this from the command line by passing "-Pabi_x86_32=#"
abi_x86_32=false

# This property controls whether to build x86 64 bit ABI
# You can override this from the command line by passing "-Pabi_x86_64=#"
abi_x86_64=false

# This property controls which dependencies file to use
# You can override this from the command line by passing "-Pdeps=#"
Expand Down

0 comments on commit 5f963d1

Please sign in to comment.