summaryrefslogtreecommitdiff
path: root/android
AgeCommit message (Collapse)AuthorFilesLines
2021-05-10More missing version changesHEADv2.0.0masterWouter van Oortmerssen1-1/+1
2021-05-10Updated main version numbers to 2.0Wouter van Oortmerssen1-1/+1
2021-01-04Fix multiple fbs code generation failure (#6365)Bruno ZIKI Kongawi1-2/+10
2020-11-05Modernize android build and sample (#6229)Paulo Pinheiro41-647/+891
Android build was dated, using the Android.mk approach. Current project configuration on Android encourages the usage of CMake, so we are updating the android project as an example on how to use either the Java/Kotlin generate code or the native C++ one.
2020-01-02Removed code_generators.cpp from library targetsWouter van Oortmerssen1-3/+3
Change-Id: Ia6e032a77983bf1838b8675f51d1c910acc991d8
2019-11-14Removed idl_gen_general.cpp and move contents to code_generators.cpp (#5625)Derek Bailey1-2/+1
2019-08-23Android: remove app_dummy() callsWouter van Oortmerssen1-4/+1
Change-Id: I0ebd4502f98d009ce5afe8c8bafb629284f0366c
2019-08-01[C++] remove static_cast expression (#5440)Alexey Geraskin1-0/+2
* [C++] remove static_cast expression * [C++] Add unit test for native_type usage * [C++] Add flatc compilation for native_type_test.fbs * [C++] update CMakeLists to compile native_type_test.fbs properly * Update BUILD file for bazel * [C++] Add generated native_type_test_generated.h and fix arguments for flatc according to CMakeList * [C++] remove "= default" from constructor to support old compilers * Update BUILD file for bazel, attempt 2 * [C++] Workaround for MSVC 2010 for the issue with std::vector and explicitly aligned custom data types * Update BUILD file for bazel, attempt 3 * Update BUILD file for bazel, attempt 4 * Update BUILD file for bazel, attempt 5 * Update BUILD file for bazel, attempt 6 * [C++] Workaround for MSVC 2010 for the issue with std::vector and explicitly aligned custom data types Part 2 * [C++] Keep only one optional parameter to compile_flatbuffers_schema_to_cpp_opt * native_type_test.fbs style corrected * [C++] Code style modifications * [C++] Fix flatc arguments in CMakeLists * [C++] Remove --gen-compare from default parameters for flatc in CMakeLists * [C++] Change Vector3D fields from double to float, to have alignment eq. 4 (to support MSVC 2010), plus minor review fix * [C++] Remove one more #if !defined * [C++] Restore version with correct static_cast, add the same fix for SortedStructs * Revert "[C++] Restore version with correct static_cast, add the same fix for SortedStructs" This reverts commit d61f4d6628cfce530c8b9a4c9e7af368d599f99f. * [C++] Fix Android.mk
2018-10-08Disable armeabi builds for Android and re-enable CI builds. (#4970)Stewart Miles1-1/+1
armeabi support was removed from the Android NDK so we should no longer build it. Since this fixes the Android build failures this commit also re-enables Travis Android builds. While re-enabling Android builds, some recent changes broke C++98 support so this fixes those issues as well which include: - Conditionally compiling use of move constructors, operators and std::move. - Changing sample to use flatbuffers::unique_ptr rather than std::unique_ptr. Finally, added the special "default_ptr_type" value for the "cpp_ptr_type" attribute. This expands to the value passed to the "--cpp-ptr-type" argument of flatc.
2018-09-24Add FlatBufferBuilder move semantics tests to the main test suite (#4902)Sumant Tambe1-0/+4
* Add FlatBufferBuilder move semantics tests to main Do not eagerly delete/reset allocators in release and release_raw functions Update android, vs2010 build files New tests for various types of FlatBufferBuilders and move semantics * Improve test failure output with function names
2017-11-06Text files should not have executable bit set (#4480)Sergey Avseyev6-0/+0
2017-07-20C++98 (stlport) support for core FlatBuffers and FlexBuffers.Stewart Miles9-523/+378
* Added internal - limited - implementation of flatbuffers::unique_ptr for STLs that don't ship with std::unique_ptr. In C++11 and beyond this is just an alias for std::unique_ptr. * Aliased used type traits structs is_scalar is_floating_point is_unsigned into flatbuffers namespace so they can be replaced in C++98 implementations. Right now these point at stlport's TR1 implementations. * Wrapped vector::data() in vector_data(). * Wrapped vector::emplace_back() in vector_emplace_back(). * Wrapper string::back() in string_back(). * Added variants of FlatBufferBuilder::CreateVector() and FlatBufferBuilder::CreateVectorOfStructs() that allow the use of plain function pointers. Generated code has also been modified to use plain functions to build objects rather than std::function() so all generated code will work in C++98 applications. * Added flexbuffers::Builder::Vector(), flexbuffers::Builder::TypedVector() and flexbuffers::Builder::Map() methods that allow the use of plain function pointers. * Changed Parser to internally use plain function pointers when parsing table and vector delimiters. * Added specializations of NumToString() for 64-bit types that aren't supported by stringstream in stlport. * Overloaded numeric_limits for 64-bit types not supported by stlport. * Replaced build_apk.sh (which was broken by deprecation of the "android" tool in the Android SDK) with build.gradle and the appropriate gradle wrapper to build an APK. * Switched Android build to build against all STL variants. * Updated travis configuration to build Android test and sample. Tested: * Verified all tests continue to work on Linux, OSX and Android. * Verified Travis build is green. Change-Id: I9e634363793f85b9f141d21454b10686020a2065
2017-02-08Fixed the Android build.Wouter van Oortmerssen1-2/+5
Change-Id: Iabb9448b4f161bba465d455c28bb826529649d30 Tested: on Android.
2016-05-23Merge "Removed reference to deprecated NDK toolchain version." into ↵Stewart Miles1-1/+1
ub-games-master
2016-05-23Removed reference to deprecated NDK toolchain version.Stewart Miles1-1/+1
Change-Id: I8d39a66ca5642427619c60f349fa78917aec2455
2016-05-23Made .sh files all have same comment formatting.Wouter van Oortmerssen1-0/+1
Change-Id: Ie7cc268a8823aec1d06c8b7cbef54068d832de3a
2016-04-04add setloadfile and setfileexists functions to flatbuffersWouter van Oortmerssen1-1/+2
to allow for custom file loaders. The targeted use case is android runtime. (from CL 116980408) Change-Id: I8785c0acf714fab41d8f6fc9f1c52875423b8f5b
2016-01-06Added android static library target for text parsing/generation etc.Wouter van Oortmerssen1-7/+14
Change-Id: If24e3eea90cef2a0d6a9d98fb503d2e3ec34ceed Tested: on Linux.
2015-11-19Fixed typo in cmake build rule for Linux.Stewart Miles1-1/+1
Tested: Verified it's possible to build generated headers on Linux for Android. Change-Id: I82249a252cb851b978a177f4a4b92b527cc2bfd9
2015-11-19Workaround broken gnumake realpath on Windows.Stewart Miles5-29/+242
Also, added missing build scripts for flatc on Windows and fixed numerous issues in the flatbuffers/android/jni/include.mk makefile. Tested: Verified dependent project (motive) can generate flatbuffers headers with these changes on Android. Bug: 25780616 Change-Id: I73f0dec8f7a6a7eb4e71951a8f1cd3e0d343a9ff
2015-11-13Expand local file path to allow users to fix ndk-buildStewart Miles1-2/+9
local-source-file-path does not expand to correct file paths in some circumstances so some users override it. Therefore flatbuffers_header_build_rules has been modified to generate rules that expand LOCAL_SRC_FILES values with flatbuffers_header_build_rules. Also, this overrides local-source-file-path to allow nest projects to build when NDK_OUT is set. Tested: Verified a dependent project continues to build. Bug: 25673744 Change-Id: Ic90186fe96d6e4533f9f3b7ca9ef78084de08a7e
2015-11-12Pass job server arguments (-jX) to make.Stewart Miles1-2/+5
When $(MAKE) is expanded via a macro "make" doesn't know whether $(MAKE) refers to an instance of the make app and therefore doesn't pass job server arguments down. This change adds the + prefix to the command in the receipe in order to indicate $(MAKE) is another instance of make. Tested: Verified flatc builds in parallel from Android builds. Change-Id: I9f2f4f9680b818fdda7420a75a8bfa995b4644db
2015-10-22Improved build rule generation for Android flatbuffer headers.Stewart Miles1-6/+27
* Added the ability to create a build target for generated headers. * Made it possible for generated header targets to depend upon each other or arbitrary build targets. Tested: Verified some pretty complex libraries with numerous flatbuffer schema dependencies build using this macro on Linux with the NDK. Bug: 25188384 Change-Id: I846855a50808e58c34cdf7086e93e7ea0df69e0d
2015-09-11Fix Visual Studio 2012 build warning.Jason Sanmiya1-0/+0
Also, remove execute permissions on several source files. Tested: Builds on Visual Studio 2012, and Linux. Change-Id: Idaacb2ae8eba98ce2974218c2ab840e97a1d67e9
2015-08-28Fixed Android builds on Windows (generated schema rules).Wouter van Oortmerssen1-1/+9
include.mk causes absolute paths to be generated, which doesn't work on Windows (make doesn't like : in paths). Change-Id: Ib06c9581620bde1e8452e0dd887d3986d517c4f5 Tested: on Windows, Linux.
2015-08-05Clarified the use of the deprecated flatc --gen-includes flag.Stewart Miles1-1/+1
Also, removed the flag from the Android makefile. Tested: Verified flatc builds successfully on Linux and regenerated the docs. Change-Id: I7140daa10b7cb9a29b5ffd63c6b20489e72a5899
2015-08-03Reworked reflection.h to be more general.Wouter van Oortmerssen1-1/+3
e.g. support generic reading/writing from structs/vectors etc. Change-Id: I2eb6e24db088a72da444d5c8df7e506e53d5bc2d Tested: on Linux. Bug: 22660837
2015-07-01Allow customization of flatc cmdline arguments on Android.Jon Simantov1-1/+3
On Android builds, set FLATBUFFERS_FLATC_ARGS to change the arguments passed to the flatc cmdline. Do this in your Android makefile where you include the flatbuffers include.mk (before or after). For example FLATBUFFERS_FLATC_ARGS=--gen-mutable The default value is --gen-includes although since that is deprecated we could just make the default value blank. Change-Id: I79fb35f50c3e21bbef18ad40ad3559cb026ffe8e
2015-03-27Fix Mac ndk-build error on motive, pie_noon, pindrop.Jason Sanmiya1-3/+6
We were looking for 'flatc' in motive/bin/Debug/flatc, on Mac. It's actually built to flatbuffers/Debug/flatc. Tested: OS X Yosemite, ndk-r10d. Also tested on Linux. Change-Id: I9f1ecfe00c5f42fd9b6808b5a5da1c920487a4c2
2015-03-09Android build script works with pre-releases present.Wouter van Oortmerssen1-6/+2
build_apk.sh assumed pre-releases would be sorted towards the end, but instead they end up at the front (sort -n) causing the api selection loop to halt early. bug: 19213196 Change-Id: I210a18c16e81880229f154c4613f8b97d90ac9bd tested: on Linux.
2015-02-09Call $(strip) on parameters so newlines work.Alex Ames1-3/+5
Added a call to $(strip) to the parameters of `flatbuffers_header_build_rules` so that newlines can be used when passing arguments to it. Change-Id: Ie2149acebcef91d28ce2cb4bfd204a209b4c4e2f
2015-02-04Added new Android build target and makefile utils.Alex Ames3-10/+205
Previously Android.mk only had a rule for the Flatbuffers test. There is now an empty module definition so that flatbuffers can be included as an Android module in other projects. Additionally, android/jni/include.mk has been added which contains some utility functions that can be used by projects using Flatbuffers to generate header build rules and set up dependencies. A sample project has been added to the samples directory to demonstrate how to use flatbuffers with Android. Tested by compiling Android project on Linux. Change-Id: I25d6da40f6531777b22f7371187e0a2f4e903ad4
2014-11-19Fix FlatBuffersTest build on Android by adding missing file.Jon Simantov1-1/+1
Change-Id: I5333d45ac43cbba61473bd8ba5b44aedb696a25c Tested: FlatBuffersTest now builds on Android under Windows.
2014-06-10Initial commit of the FlatBuffers code.Wouter van Oortmerssen7-0/+669
Change-Id: I4c9f0f722490b374257adb3fec63e44ae93da920 Tested: using VS2010 / Xcode / gcc on Linux.