-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify Android build and bring up to date (#273)
* Use latest Android platform and build-tools versions * Require ANDROID_NDK environment variable instead of ANDROID_NDK_ROOT * Upgrade gradle wrapper and build.gradle to support gradle 4.4.1 and Android gradle plugin 3.0.1 * Add BoringSSL as a submodule according to https://boringssl.googlesource.com/boringssl/+/HEAD/INCORPORATING.md * Add build.gradle and dummy manifest for BoringSSL * Add BoringSSL as a dependency to the main Android themis build.gradle * Update Circle CI configuration to support updated Android build * Limit JVM memory for gradle to 1GB Otherwise, builds are failing with oom * Disable parallel build for gradle and limit number of workers * Split Android test into separate build and test stages Circle CI fails with out of memory. To reduce memory usage we will compile Themis before starting the emulator. This should also fail the build early if there are any issues with Android build without having to wait for emulator to boot (which takes a while). * Disable gradle deamon in CI * Limit CMake/Ninja build concurrency for Circle CI builds of BoringSSL for Android
- Loading branch information
Showing
10 changed files
with
122 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "third_party/boringssl/src"] | ||
path = third_party/boringssl/src | ||
url = https://boringssl.googlesource.com/boringssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Jun 01 10:43:23 EEST 2015 | ||
#Wed Dec 27 12:10:05 UTC 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include ':boringssl' | ||
project(':boringssl').projectDir = new File('third_party/boringssl') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.cossacklabs.themis.boringssl" android:versionCode="1" android:versionName="0.9.6"> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
buildscript { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.0.1' | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion 27 | ||
buildToolsVersion "27.0.3" | ||
|
||
defaultConfig { | ||
minSdkVersion 16 | ||
targetSdkVersion 16 | ||
externalNativeBuild { | ||
cmake { | ||
arguments "-DCMAKE_TOOLCHAIN_FILE=" + android.ndkDirectory + "/build/cmake/android.toolchain.cmake", | ||
"-DANDROID_NATIVE_API_LEVEL=21", | ||
"-DANDROID_TOOLCHAIN=gcc", | ||
"-DCMAKE_BUILD_TYPE=Release", | ||
"-GNinja" | ||
} | ||
} | ||
} | ||
|
||
externalNativeBuild { | ||
cmake { | ||
path "src/CMakeLists.txt" | ||
} | ||
} | ||
|
||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
} | ||
} | ||
} |
Submodule src
added at
0a54e9