Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Use vendored version of <experimental/optional> #13049

Merged
merged 5 commits into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.9)
project(mbgl LANGUAGES CXX C)

set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo Sanitize)
Expand Down
8 changes: 6 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ workflows:
- android-arm-v7-template:
name: android-gnustl-arm-v7
stl: gnustl_shared
image: android-ndk-r17c:1d5db0eb34
- android-release:
filters:
tags:
Expand Down Expand Up @@ -519,8 +520,11 @@ jobs:
stl:
type: string
default: "c++_static"
image:
type: string
default: android-ndk-r19:8e91a7ebab
docker:
- image: mbgl/android-ndk-r17c:dd161efed6
- image: mbgl/<< parameters.image >>
resource_class: large
working_directory: /src
environment:
Expand Down Expand Up @@ -582,7 +586,7 @@ jobs:
# ------------------------------------------------------------------------------
android-release:
docker:
- image: mbgl/android-ndk-r17c:dd161efed6
- image: mbgl/android-ndk-r19:8e91a7ebab
resource_class: large
working_directory: /src
environment:
Expand Down
2 changes: 1 addition & 1 deletion platform/android/MapboxGLAndroidSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies {

android {
compileSdkVersion androidVersions.compileSdkVersion
buildToolsVersion androidVersions.buildToolsVersion

defaultConfig {
minSdkVersion androidVersions.minSdkVersion
Expand Down Expand Up @@ -56,6 +55,7 @@ android {
externalNativeBuild {
cmake {
path "../../../CMakeLists.txt"
version "3.10.2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.mapbox.mapboxsdk.style.expressions;

import android.annotation.SuppressLint;
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
Expand Down Expand Up @@ -1826,6 +1827,7 @@ public static Expression sum(@Size(min = 2) Expression... numbers) {
* @return expression
* @see <a href="https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-+">Style specification</a>
*/
@SuppressLint("Range")
public static Expression sum(@Size(min = 2) Number... numbers) {
Expression[] numberExpression = new Expression[numbers.length];
for (int i = 0; i < numbers.length; i++) {
Expand Down Expand Up @@ -1874,6 +1876,7 @@ public static Expression product(@Size(min = 2) Expression... numbers) {
* @return expression
* @see <a href="https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-*">Style specification</a>
*/
@SuppressLint("Range")
public static Expression product(@Size(min = 2) Number... numbers) {
Expression[] numberExpression = new Expression[numbers.length];
for (int i = 0; i < numbers.length; i++) {
Expand Down Expand Up @@ -2590,6 +2593,7 @@ public static Expression min(@Size(min = 1) Expression... numbers) {
* @return expression
* @see <a href="https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-min">Style specification</a>
*/
@SuppressLint("Range")
public static Expression min(@Size(min = 1) Number... numbers) {
Expression[] numberExpression = new Expression[numbers.length];
for (int i = 0; i < numbers.length; i++) {
Expand Down Expand Up @@ -2638,6 +2642,7 @@ public static Expression max(@Size(min = 1) Expression... numbers) {
* @return expression
* @see <a href="https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-max">Style specification</a>
*/
@SuppressLint("Range")
public static Expression max(@Size(min = 1) Number... numbers) {
Expression[] numberExpression = new Expression[numbers.length];
for (int i = 0; i < numbers.length; i++) {
Expand Down
1 change: 0 additions & 1 deletion platform/android/MapboxGLAndroidSDKTestApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion androidVersions.compileSdkVersion
buildToolsVersion androidVersions.buildToolsVersion

defaultConfig {
applicationId "com.mapbox.mapboxsdk.testapp"
Expand Down
2 changes: 1 addition & 1 deletion platform/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.android.tools.build:gradle:3.3.0'
classpath dependenciesList.licensesPlugin
classpath dependenciesList.kotlinPlugin
}
Expand Down
3 changes: 1 addition & 2 deletions platform/android/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ macro(mbgl_platform_core)
PUBLIC -ljnigraphics
PUBLIC -lEGL
PUBLIC -lGLESv2
PUBLIC -lstdc++
PUBLIC -latomic
PUBLIC -lz
)
Expand All @@ -65,7 +64,6 @@ macro(mbgl_filesource)
PUBLIC jni.hpp
PUBLIC -llog
PUBLIC -landroid
PUBLIC -lstdc++
PUBLIC -latomic
)
endmacro()
Expand Down Expand Up @@ -139,6 +137,7 @@ target_include_directories(example-custom-layer
)

target_link_libraries(example-custom-layer
PRIVATE optional
PRIVATE -llog
PRIVATE -lGLESv2
)
3 changes: 1 addition & 2 deletions platform/android/gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ext {
minSdkVersion : 14,
targetSdkVersion : 27,
compileSdkVersion: 27,
buildToolsVersion: '27.0.3'
]

versions = [
Expand All @@ -19,7 +18,7 @@ ext {
robolectric : '3.8',
timber : '4.7.1',
okhttp : '3.11.0',
kotlin : '1.2.51',
kotlin : '1.3.11',
licenses : '0.8.41',
lint : '26.1.3',
gms : '16.0.0'
Expand Down
4 changes: 2 additions & 2 deletions platform/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon May 14 12:12:39 CEST 2018
#Sun Jan 20 13:53:14 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 changes: 3 additions & 4 deletions vendor/optional.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
add_library(optional INTERFACE)

# This polyfill is really only needed for
# Windows. We need to be careful to not leak
# it into any of our public interfaces.
if(WIN32)
# This polyfill is needed for Windows and Android since these standard libraries don't ship with
# usable versions of <experimental/optional>
if(WIN32 OR MBGL_PLATFORM STREQUAL "android")
target_include_directories(optional SYSTEM INTERFACE
${CMAKE_SOURCE_DIR}/vendor/optional/include
)
Expand Down