Files
flipper/android/build.gradle
Pascal Hartig 65f28ecdbe Upgrade Kotlin to 1.8.20 (#4753)
Summary:
[android] Upgrade Kotlin to 1.8.20
The additional source/target settings should hopefully no longer be necessary with
AGP 8.1:

https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support

Pull Request resolved: https://github.com/facebook/flipper/pull/4753

Test Plan:
- CI
- Build sample app
- AS sync

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/4753).
* https://github.com/facebook/flipper/issues/4759
* https://github.com/facebook/flipper/issues/4758
* https://github.com/facebook/flipper/issues/4757
* https://github.com/facebook/flipper/issues/4756
* https://github.com/facebook/flipper/issues/4755
* https://github.com/facebook/flipper/issues/4754
* __->__ https://github.com/facebook/flipper/issues/4753
* https://github.com/facebook/flipper/issues/4752
* https://github.com/facebook/flipper/issues/4751

Reviewed By: ivanmisuno

Differential Revision: D46068906

Pulled By: passy

fbshipit-source-id: 93da60ebfe2ec590ef88ea1936fcfd5257699cc7
2023-05-23 10:16:38 -07:00

106 lines
2.9 KiB
Groovy

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlinx-serialization'
android {
namespace 'com.facebook.flipper'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion
// Uncomment this and enable the database plugin test when roboelectric is upgraded
// testOptions.unitTests.includeAndroidResources = true
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
buildConfigField "boolean", "IS_ASAN_BUILD", 'false'
buildConfigField "boolean", "LOAD_FLIPPER_EXPLICIT", 'false'
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
targets 'flipper'
}
}
}
lintOptions {
abortOnError false
}
sourceSets {
test {
java {
exclude 'com/facebook/flipper/plugins/facebook/**'
}
}
}
compileOptions {
targetCompatibility rootProject.javaTargetVersion
sourceCompatibility rootProject.javaTargetVersion
}
buildFeatures {
prefab true
}
packagingOptions {
exclude("**/libfbjni.so")
exclude("**/libc++_shared.so")
}
externalNativeBuild {
cmake {
path './CMakeLists.txt'
}
}
dependencies {
compileOnly deps.proguardAnnotations
implementation deps.kotlinStdLibrary
implementation deps.kotlinCoroutinesAndroid
implementation deps.openssl
implementation deps.fbjni
implementation deps.soloader
implementation deps.jsr305
implementation deps.supportAppCompat
implementation deps.supportSqlite
implementation deps.websocket
implementation deps.kotlinxSerializationJson
testImplementation deps.mockito
testImplementation deps.robolectric
testImplementation deps.testCore
testImplementation deps.testRules
testImplementation deps.hamcrest
testImplementation deps.junit
}
}
// Patch below is used in case the 'configureCMake' task
// gets executed in parallel with the 'preBuild' task.
// Our CMakeFile expects third-party dependencies to be already
// in-place and patched.
tasks.matching { it.name.startsWith("configureCMake") }.all {
dependsOn(tasks.getByPath(':third-party:prepare'))
}
preBuild.dependsOn(tasks.getByPath(':third-party:prepare'))
apply plugin: 'com.vanniktech.maven.publish'