Reorganize native dep download and extraction (#154)

Summary:
This moves the native setup to a separate gradle file and unpacks everything outside the build folder. That way we don't throw everything away on every incremental build.

This is an intermediate step to get to a more declarative setup like Fresco has it and get rid of the individual hacks we have for every download.
Pull Request resolved: https://github.com/facebook/Sonar/pull/154

Reviewed By: jknoxville

Differential Revision: D8833812

Pulled By: passy

fbshipit-source-id: 2424c9d6e22e6092c04af344e06939b4a6aba041
This commit is contained in:
Pascal Hartig
2018-07-16 09:15:08 -07:00
committed by Facebook Github Bot
parent d34aba9e21
commit cd6a5f9ff8
35 changed files with 316 additions and 279 deletions

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.doubleconversion">
</manifest>

View File

@@ -0,0 +1,11 @@
cmake_minimum_required (VERSION 3.6.0)
PROJECT(doubleconversion CXX)
enable_language(CXX)
set(PACKAGE_NAME doubleconversion)
set(doubleconversion_DIR double-conversion-3.0.0/double-conversion)
include_directories(${doubleconversion_DIR})
file(GLOB SRCFILES ${doubleconversion_DIR}/*.cc)
add_library(${PACKAGE_NAME} SHARED ${SRCFILES})
install(TARGETS ${PACKAGE_NAME} DESTINATION ./build/)
target_link_libraries(${PACKAGE_NAME})

View File

@@ -0,0 +1,30 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang'
}
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
manifest.srcFile './ApplicationManifest.xml'
}
}
externalNativeBuild {
cmake {
path './CMakeLists.txt'
}
}
}