Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jobs:
"$SDKMANAGER" --sdk_root="$ANDROID_HOME" 'build-tools;30.0.3'
"$SDKMANAGER" --sdk_root="$ANDROID_HOME" 'platforms;android-26'
"$SDKMANAGER" --sdk_root="$ANDROID_HOME" 'extras;android;m2repository'
"$SDKMANAGER" --sdk_root="$ANDROID_HOME" 'ndk;28.2.13676358'
"$SDKMANAGER" --sdk_root="$ANDROID_HOME" 'ndk;27.3.13750724'
"$SDKMANAGER" --sdk_root="$ANDROID_HOME" 'cmake;3.22.1'

- name: Build with Gradle
Expand Down
24 changes: 22 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ext {
androidVersionName = "$version"
androidMinSdkVersion = 19
androidTargetSdkVersion = 26
androidNdkVersion = '28.2.13676358'
androidNdkVersion = '27.3.13750724'
androidCmakeVersion = '3.22.1'
}

Expand All @@ -40,6 +40,8 @@ android {
versionName androidVersionName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArgument "class", "org.conscrypt.ConscryptAndroidSuite"
multiDexEnabled true

consumerProguardFiles 'proguard-rules.pro'

Expand All @@ -49,7 +51,7 @@ android {
'-DANDROID_STL=c++_static',
"-DBORINGSSL_HOME=$boringsslHome",
"-DCMAKE_CXX_STANDARD=17",
'-DCMAKE_SHARED_LINKER_FLAGS=-z max-page-size=16384'
'-DCMAKE_SHARED_LINKER_FLAGS=-z max-page-size=16384 -z common-page-size=16384'
cFlags '-fvisibility=hidden',
'-DBORINGSSL_SHARED_LIBRARY',
'-DBORINGSSL_IMPLEMENTATION',
Expand Down Expand Up @@ -82,6 +84,20 @@ android {
srcDirs += "build/generated/resources"
}
}
sourceSets.androidTest {
java {
srcDirs = [
"${rootDir}/common/src/test/java",
"${rootDir}/openjdk/src/test/java",
]
}
resources {
srcDirs = [
"${rootDir}/common/src/test/resources",
"${rootDir}/openjdk/src/test/resources",
]
}
}
externalNativeBuild {
cmake {
path 'CMakeLists.txt'
Expand Down Expand Up @@ -109,6 +125,10 @@ preBuild {

dependencies {
publicApiDocs project(':conscrypt-api-doclet')
androidTestImplementation project(':conscrypt-testing')
androidTestImplementation libs.bouncycastle.apis
androidTestImplementation libs.bouncycastle.provider
androidTestImplementation libs.mockito.android
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
exclude module: 'support-annotations'
exclude module: 'support-v4'
Expand Down
4 changes: 4 additions & 0 deletions android/src/androidTest/AndroidManifest.xml
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">
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
android.useAndroidX=true
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m
5 changes: 3 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[versions]
bnd = "6.4.0"
bouncycastle = "1.84"
bouncycastle = "1.77"
caliper = "1.0-beta-2"
errorprone = "2.31.0"
jacoco = "0.8.12"
jmh = "1.37"
jmh-plugin = "0.7.2"
junit = "4.13.2"
mockito = "4.11.0"
mockito = "2.28.2"
netty-handler = "4.1.24.Final"
netty-tcnative = "2.0.26.Final"
shadow = "7.1.2"
Expand All @@ -31,6 +31,7 @@ jacoco-agent = { module = "org.jacoco:org.jacoco.agent", version.ref = "jacoco"
jacoco-ant = { module = "org.jacoco:org.jacoco.ant", version.ref = "jacoco" }
junit = { module = "junit:junit", version.ref = "junit" }
mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockito-android = { module = "org.mockito:mockito-android", version.ref = "mockito" }

# JMH Benchmarking
jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" }
Expand Down
6 changes: 3 additions & 3 deletions testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ sourceSets {
dependencies {
compileOnly project(':conscrypt-constants')

implementation libs.bouncycastle.apis,
libs.bouncycastle.provider,
libs.junit
implementation libs.bouncycastle.apis
implementation libs.bouncycastle.provider
api libs.junit
}

// No public methods here.
Expand Down
Loading