diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..0c892a10 --- /dev/null +++ b/CMakeLists.txt @@ -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) diff --git a/build.gradle b/build.gradle index 41a925fa..bc4f8ad5 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } 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.github.dcendents:android-maven-gradle-plugin:1.4.1' classpath 'com.nabilhachicha:android-native-dependencies:0.1' diff --git a/settings.gradle b/settings.gradle index 304db30e..93d836ba 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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:proguard-annotations').projectDir = file('java/proguard-annotations') project(':yoga-layout').projectDir = file('android') diff --git a/yogacore/build.gradle b/yogacore/build.gradle new file mode 100644 index 00000000..c31d7294 --- /dev/null +++ b/yogacore/build.gradle @@ -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' + } + } +} diff --git a/yogacore/src/main/AndroidManifest.xml b/yogacore/src/main/AndroidManifest.xml new file mode 100644 index 00000000..18ddd4c2 --- /dev/null +++ b/yogacore/src/main/AndroidManifest.xml @@ -0,0 +1,14 @@ + + + + + +