Files
flipper/android/build.gradle
Pascal Hartig 4e943dbb36 Limit CMake targets to build
Summary:
This doesn't solve our build caching issue (GH230) but
helps a bit with build times as we can skip building all
sorts of test targets which are otherwise included.

The sonar target is the only thing we care about here.

Reviewed By: danielbuechele

Differential Revision: D9360117

fbshipit-source-id: 13a976243b48efbe0f69e9fe47780486f9688eb8
2018-08-16 08:27:21 -07:00

69 lines
1.6 KiB
Groovy

apply plugin: 'com.android.library'
apply plugin: 'maven'
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
targets 'sonar'
}
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
java {
srcDir 'plugins'
}
}
}
externalNativeBuild {
cmake {
path './CMakeLists.txt'
}
}
dependencies {
compileOnly deps.lithoAnnotations
implementation project(':fbjni')
implementation deps.soloader
implementation deps.guava
implementation deps.jsr305
implementation deps.supportAppCompat
implementation deps.stetho
implementation deps.okhttp3
implementation deps.lithoCore
implementation deps.lithoWidget
implementation deps.rhino
implementation deps.leakcanary
}
}
preBuild.dependsOn(tasks.getByPath(':third-party:prepare'))
apply from: rootProject.file('gradle/release.gradle')
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts.add('archives', sourcesJar)