Set up Gradle build for yogacore
Summary: I put the CMake file in the root directory to avoid moving the actual `yoga/` dir around, but created a directory for the Android library manifest nonsense so it works as its own module you can depend on. Reviewed By: emilsjolander Differential Revision: D4913601 fbshipit-source-id: 582064264cf0b6b69c03d0e72ed9dd22d217dd16
This commit is contained in:
committed by
Facebook Github Bot
parent
8c50347f3c
commit
034ab0b3b1
17
CMakeLists.txt
Normal file
17
CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2014-present, Facebook, Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the BSD-style license found in the
|
||||||
|
# LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
# of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
#
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.4.1)
|
||||||
|
|
||||||
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||||
|
|
||||||
|
file(GLOB yogacore_SRC yoga/*.c)
|
||||||
|
add_library(yogacore STATIC ${yogacore_SRC})
|
||||||
|
|
||||||
|
target_link_libraries(yogacore android log)
|
@@ -5,7 +5,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.2.2'
|
classpath 'com.android.tools.build:gradle:2.3.1'
|
||||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
|
||||||
classpath 'com.nabilhachicha:android-native-dependencies:0.1'
|
classpath 'com.nabilhachicha:android-native-dependencies:0.1'
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
include ':yoga', ':yoga-layout', ':yoga:proguard-annotations', ':libfb'
|
include ':yoga', ':yogacore', ':yoga-layout', ':yoga:proguard-annotations', ':libfb'
|
||||||
project(':yoga').projectDir = file('java')
|
project(':yoga').projectDir = file('java')
|
||||||
project(':yoga:proguard-annotations').projectDir = file('java/proguard-annotations')
|
project(':yoga:proguard-annotations').projectDir = file('java/proguard-annotations')
|
||||||
project(':yoga-layout').projectDir = file('android')
|
project(':yoga-layout').projectDir = file('android')
|
||||||
|
17
yogacore/build.gradle
Normal file
17
yogacore/build.gradle
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion rootProject.compileSdkVersion
|
||||||
|
buildToolsVersion rootProject.buildToolsVersion
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion rootProject.minSdkVersion
|
||||||
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
path '../CMakeLists.txt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
yogacore/src/main/AndroidManifest.xml
Normal file
14
yogacore/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2014-present, Facebook, Inc.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
This source code is licensed under the BSD-style license found in the
|
||||||
|
LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.facebook.yogacore">
|
||||||
|
</manifest>
|
Reference in New Issue
Block a user