summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-01-10 16:04:06 -0800
committerKonstantin Käfer <mail@kkaefer.com>2018-01-23 17:10:58 -0800
commitc5016bfa9152edc80b60c52a0376686d55650771 (patch)
tree767bc9786adbf94fa8a9f809ce54e65cb14468d8
parentd4ed8d1a4474e43241e42610001403261353466f (diff)
downloadqtlocation-mapboxgl-c5016bfa9152edc80b60c52a0376686d55650771.tar.gz
[build] Add temporary modifications to style spec + shaders
This ensures that the generated code matches what is checked in. Remove those temporary modifications once we add the features to master.
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java1
-rw-r--r--platform/android/scripts/generate-style-code.js2
-rw-r--r--platform/darwin/scripts/generate-style-code.js2
-rwxr-xr-xscripts/generate-shaders.js8
-rw-r--r--scripts/generate-style-code.js2
-rw-r--r--scripts/style-spec.js5
6 files changed, 16 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
index 1b9106afaf..6e644c5591 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
@@ -3592,6 +3592,7 @@ public class PropertyFactory {
return new LayoutPropertyValue<>("text-optional", value);
}
+
/**
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
*
diff --git a/platform/android/scripts/generate-style-code.js b/platform/android/scripts/generate-style-code.js
index abc0796bc1..6c1b050b59 100644
--- a/platform/android/scripts/generate-style-code.js
+++ b/platform/android/scripts/generate-style-code.js
@@ -2,7 +2,7 @@
const fs = require('fs');
const ejs = require('ejs');
-const spec = require('../../../mapbox-gl-js/src/style-spec/reference/v8');
+const spec = require('../../../scripts/style-spec');
const _ = require('lodash');
require('../../../scripts/style-code');
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index 51a5052110..dca88f041b 100644
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -11,7 +11,7 @@ const cocoaConventions = require('./style-spec-cocoa-conventions-v8.json');
const prefix = 'MGL';
const suffix = 'StyleLayer';
-let spec = _.merge(require('../../../mapbox-gl-js/src/style-spec/reference/v8'), require('./style-spec-overrides-v8.json'));
+let spec = _.merge(require('../../../scripts/style-spec'), require('./style-spec-overrides-v8.json'));
// Rename properties and keep `original` for use with setters and getters
_.forOwn(cocoaConventions, function (properties, kind) {
diff --git a/scripts/generate-shaders.js b/scripts/generate-shaders.js
index cf54b1b100..b4d1033d45 100755
--- a/scripts/generate-shaders.js
+++ b/scripts/generate-shaders.js
@@ -3,9 +3,15 @@
require('flow-remove-types/register');
const path = require('path');
-const shaders = require('../mapbox-gl-js/src/shaders');
const outputPath = 'src/mbgl/shaders';
+var shaders = require('../mapbox-gl-js/src/shaders');
+
+delete shaders.hillshade;
+delete shaders.hillshadePrepare;
+delete shaders.heatmap;
+delete shaders.heatmapTexture;
+
require('./style-code');
writeIfModified(path.join(outputPath, 'preludes.hpp'), `// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js
index dbca4216ad..3d805b058a 100644
--- a/scripts/generate-style-code.js
+++ b/scripts/generate-style-code.js
@@ -2,7 +2,7 @@
const fs = require('fs');
const ejs = require('ejs');
-const spec = require('../mapbox-gl-js/src/style-spec/reference/v8');
+const spec = require('./style-spec');
const colorParser = require('csscolorparser');
require('./style-code');
diff --git a/scripts/style-spec.js b/scripts/style-spec.js
new file mode 100644
index 0000000000..00daee70d0
--- /dev/null
+++ b/scripts/style-spec.js
@@ -0,0 +1,5 @@
+var spec = module.exports = require('../mapbox-gl-js/src/style-spec/reference/v8');
+
+// Make temporary modifications here when Native doesn't have all features that JS has.
+
+delete spec.layer.type.values.heatmap;