diff --git a/.circleci/config.yml b/.circleci/config.yml
index d0bfb9884066..25d91ec3a4f5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -11,22 +11,107 @@ commands:
- run:
name: Setup gradle.properties
command: cp gradle.properties-example gradle.properties
+ yarn-install:
+ steps:
+ - restore_cache:
+ name: Restore Yarn Cache
+ keys:
+ - yarn-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "libs/gutenberg-mobile/yarn.lock" }}
+ - run:
+ name: Yarn Install
+ working_directory: libs/gutenberg-mobile
+ command: yarn install --frozen-lockfile --prefer-offline --network-concurrency 1
+ - save_cache:
+ name: Save Yarn Cache
+ key: yarn-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "libs/gutenberg-mobile/yarn.lock" }}
+ paths:
+ - libs/gutenberg-mobile/node_modules
+ - libs/gutenberg-mobile/i18n-cache/data
+ checkout-submodules:
+ steps:
+ - run:
+ name: Checkout submodules
+ command: git submodule update --init --recursive
+ checkout-gutenberg-mobile-submodule-only:
+ steps:
+ - run:
+ name: Checkout gutenberg-mobile submodule (no recursive)
+ command: git submodule update --init
+ yarn-bundle-android:
+ steps:
+ - run:
+ name: Yarn bundle Android
+ working_directory: libs/gutenberg-mobile
+ command: yarn bundle:android
+ save-gutenberg-bundle-cache:
+ steps:
+ - run:
+ name: Save Gutenberg-Mobile Submodule Hash
+ command: |
+ git rev-parse @:./libs/gutenberg-mobile > gutenberg_submodule_hash
+ cat gutenberg_submodule_hash
+ - save_cache:
+ name: Cache JS Bundle
+ key: android-js-bundle-{{ checksum "gutenberg_submodule_hash" }}
+ paths:
+ - libs/gutenberg-mobile/react-native-gutenberg-bridge/android/build/assets/index.android.bundle
+ restore-gutenberg-bundle-cache:
+ steps:
+ - run:
+ name: Save Gutenberg-Mobile Submodule Hash
+ command: |
+ git rev-parse @:./libs/gutenberg-mobile > gutenberg_submodule_hash
+ cat gutenberg_submodule_hash
+ - restore_cache:
+ name: Restore JS Bundle From Cache
+ key: android-js-bundle-{{ checksum "gutenberg_submodule_hash" }}
version: 2.1
jobs:
+ gutenberg-bundle-build:
+ docker:
+ - image: circleci/node:10
+ steps:
+ - git/shallow-checkout
+ - restore-gutenberg-bundle-cache
+ - run:
+ name: Abort If JS Bundle Exists
+ command: |
+ if [ -f "libs/gutenberg-mobile/react-native-gutenberg-bridge/android/build/assets/index.android.bundle" ]; then
+ echo "Gutenberg-Mobile bundle already in cache, no need to create a new one."
+ circleci-agent step halt
+ else
+ echo "Gutenberg-Mobile bundle not found in cache. Proceeding to generate new bundle"
+ fi
+ - checkout-submodules
+ - yarn-install
+ - yarn-bundle-android
+ - run:
+ name: Ensure assets folder exists
+ command: mkdir -p libs/gutenberg-mobile/react-native-gutenberg-bridge/android/build/assets
+ - run:
+ name: Move bundle to assets folder
+ command: mv libs/gutenberg-mobile/bundle/android/App.js libs/gutenberg-mobile/react-native-gutenberg-bridge/android/build/assets/index.android.bundle
+ - save-gutenberg-bundle-cache
test:
executor:
name: android/default
api-version: "28"
steps:
- git/shallow-checkout
+ - checkout-gutenberg-mobile-submodule-only
- android/restore-gradle-cache
- copy-gradle-properties
+ - restore-gutenberg-bundle-cache
- run:
name: Test WordPress
- command: ./gradlew --stacktrace testVanillaRelease
+ environment:
+ SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD: 1
+ command: SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD=1 ./gradlew testVanillaRelease --stacktrace --no-daemon
- run:
name: Test WordPressUtils
+ environment:
+ SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD: 1
command: cd libs/utils && ./gradlew --stacktrace testReleaseUnitTest
- android/save-gradle-cache
- android/save-test-results
@@ -36,20 +121,30 @@ jobs:
api-version: "28"
steps:
- git/shallow-checkout
+ - checkout-gutenberg-mobile-submodule-only
- android/restore-gradle-cache
- copy-gradle-properties
+ - restore-gutenberg-bundle-cache
- run:
name: Checkstyle
+ environment:
+ SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD: 1
command: ./gradlew --stacktrace checkstyle
- run:
name: ktlint
+ environment:
+ SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD: 1
command: ./gradlew --stacktrace ciktlint
- run:
name: Lint
+ environment:
+ SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD: 1
command: ./gradlew --stacktrace lintVanillaRelease || (grep -A20 -B2 'severity="Error"' -r --include="*.xml" WordPress libs; exit 1)
- run:
name: Violations
when: on_fail
+ environment:
+ SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD: 1
command: |
if [ -n "$GITHUB_API_TOKEN" ]; then
./gradlew --stacktrace violationCommentsToGitHub -DGITHUB_PULLREQUESTID=${CIRCLE_PULL_REQUEST##*/} -DGITHUB_OAUTH2TOKEN=$GITHUB_API_TOKEN
@@ -64,14 +159,18 @@ jobs:
api-version: "28"
steps:
- git/shallow-checkout
+ - checkout-gutenberg-mobile-submodule-only
- bundle-install/bundle-install:
cache_key_prefix: installable-build
- run:
name: Copy Secrets
command: bundle exec fastlane run configure_apply
- android/restore-gradle-cache
+ - restore-gutenberg-bundle-cache
- run:
name: Build APK
+ environment:
+ SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD: 1
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
PR_NUMBER=$(basename $CIRCLE_PULL_REQUEST)
@@ -104,10 +203,14 @@ jobs:
api-version: "28"
steps:
- git/shallow-checkout
+ - checkout-gutenberg-mobile-submodule-only
- android/restore-gradle-cache
- copy-gradle-properties
+ - restore-gutenberg-bundle-cache
- run:
name: Build
+ environment:
+ SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD: 1
command: ./gradlew WordPress:assembleVanillaDebug WordPress:assembleVanillaDebugAndroidTest --stacktrace
- run:
name: Decrypt credentials
@@ -138,10 +241,14 @@ jobs:
api-version: "28"
steps:
- git/shallow-checkout
+ - checkout-gutenberg-mobile-submodule-only
- android/restore-gradle-cache
- copy-gradle-properties
+ - restore-gutenberg-bundle-cache
- run:
name: Build
+ environment:
+ SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD: 1
command: ./gradlew WordPress:assembleVanillaDebug && cd libs/utils && ./gradlew assembleAndroidTest --stacktrace
- run:
name: Decrypt credentials
@@ -161,6 +268,7 @@ jobs:
- image: circleci/ruby:2.6.4
steps:
- git/shallow-checkout
+ - checkout-gutenberg-mobile-submodule-only
- run:
name: Install bundler
command: gem install bundler --version 2.0.2
@@ -173,18 +281,29 @@ jobs:
workflows:
wordpress_android:
jobs:
+ - gutenberg-bundle-build
- strings-check
- - test
- - lint
+ - test:
+ requires:
+ - gutenberg-bundle-build
+ - lint:
+ requires:
+ - gutenberg-bundle-build
- Installable Build:
+ requires:
+ - gutenberg-bundle-build
filters:
branches:
ignore: /pull\/[0-9]+/
- WordPressUtils Connected Tests:
+ requires:
+ - gutenberg-bundle-build
filters:
branches:
ignore: /pull\/[0-9]+/
- Connected Tests:
+ requires:
+ - gutenberg-bundle-build
post-to-slack: true
# Always run connected tests on develop and release branches
filters:
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 0c92c9074e35..99b5f6f5d5b9 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,6 +1,11 @@
14.9
-----
-* Fix issue with Preview post not working after switching to classic editor from inside the post
+* [*] Fix issue with Preview post not working after switching to classic editor from inside the post
+* [***] Block Editor: New block: Pullquote
+* [**] Block Editor: Add support for changing background and text color in Buttons block
+* [*] Block Editor: Fix the icons and buttons in Gallery, Paragraph, List and MediaText block on RTL mode
+* [**] Block Editor: Remove Subscription Button from the Blog template since it didn't have an initial functionality and it is hard to configure for users.
+* [**] Block Editor: Update page templates to use recently added blocks
* [**] Block editor: Fix bug in Free Photo Library which allowed selecting multiple images but only inserted one
14.8
diff --git a/WordPress/lint-baseline.xml b/WordPress/lint-baseline.xml
index 6e14796f1ffa..42c2fd629297 100644
--- a/WordPress/lint-baseline.xml
+++ b/WordPress/lint-baseline.xml
@@ -46,6 +46,22 @@
column="20"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Annotations Sidebar
Blog
- Border Radius
- Border Settings
- Button color settings are coming soon.
- Button Link URL
Choose from device
City, 10100
Clear All Settings
- Color settings are coming soon.
Columns Settings
Content…
@@ -2824,12 +2819,13 @@
Double tap to change the value using slider
Double tap to edit this value
+
+ Double tap to go to color settings
Double tap to move the block down
Double tap to move the block to the left
Double tap to move the block to the right
Double tap to move the block up
Double tap to redo last change
- Double tap to remove the block
Double tap to select
Double tap to select a video
Double tap to select an image
@@ -2845,8 +2841,6 @@
Email me: <a href=\"mailto:mail@example.com\">mail@example.com</a>
Excerpt length (words)
Failed to insert media.\nPlease tap for options.
-
- Follow our Blog
Gallery caption. %s
J.K. Rowling
Juan Pérez
-
- Latest Blog Posts
Let’s build something together
@@ -2881,7 +2873,6 @@ translators: sample content for "Services" page template -->
Let\'s talk 👋 Don\'t hesitate to reach out with the contact information below, or send a message using the form.
Link inserted
- Link Settings
Link text
Link To
Move block down
@@ -2925,8 +2916,6 @@ translators: sample content for "Services" page template -->
Project Name
Remove annotations
-
- Remove block at row %s
Remove Image
Replace Current Block
Reset Block
@@ -2942,6 +2931,7 @@ translators: sample content for "Services" page template -->
Sally Smith
Samuel the Dog
+ Select a color
Services
Show post content
@@ -2952,8 +2942,6 @@ translators: sample content for "Services" page template -->
Start writing…
Strategy
-
- Subscribe
Success Message
Take a Photo
Take a Photo or Video
@@ -2986,6 +2974,8 @@ translators: sample content for "Services" page template -->
We are working hard to add more blocks with each release. In the meantime, you can also edit this post on the web.
We offer a range of services to help you achieve the results you\'re after. Not sure what you need, or what it costs? We can explain what services are right for you and tell you more about our fees. Get in touch below.
+
+ Welcome to our new blog
What People Say
WordPress Media Library
diff --git a/build.gradle b/build.gradle
index 9d0a682d2ba9..89908d08b20c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -23,6 +23,18 @@ plugins {
apply plugin: 'com.automattic.android.fetchstyle'
project.ext.buildGutenbergFromSource = project.properties.getOrDefault('wp.BUILD_GUTENBERG_FROM_SOURCE', false).toBoolean()
+def suppressJSBundle = System.getenv('SUPPRESS_GUTENBERG_MOBILE_JS_BUNDLE_BUILD').asBoolean()
+project.ext.buildGutenbergMobileJSBundle = !(suppressJSBundle || project.ext.buildGutenbergFromSource)
+
+if (project.ext.buildGutenbergFromSource) {
+ def nodeModulesDir = new File('libs/gutenberg-mobile/node_modules')
+ if (!nodeModulesDir.exists()) {
+ def message = "Attempting to build Gutenberg from source without a libs/gutenberg-mobile/node_modules directory. \
+Either run `yarn install` manually within libs/gutenberg-mobile or disable building Gutenberg from source by \
+setting wp.BUILD_GUTENBERG_FROM_SOURCE to false."
+ throw new GradleException(message)
+ }
+}
allprojects {
apply plugin: 'checkstyle'
diff --git a/config/checkstyle.xml b/config/checkstyle.xml
index 7e0f4d19236a..f518797e5215 100644
--- a/config/checkstyle.xml
+++ b/config/checkstyle.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/libs/editor/WordPressEditor/build.gradle b/libs/editor/WordPressEditor/build.gradle
index fec439925a2d..758761e072b5 100644
--- a/libs/editor/WordPressEditor/build.gradle
+++ b/libs/editor/WordPressEditor/build.gradle
@@ -28,9 +28,6 @@ apply plugin: 'signing'
// import the `submoduleGitHash()` function
apply from: 'https://gist.githubusercontent.com/hypest/e06f6097065728b6db7b7c462f8fef1a/raw/3b91756fca76e4c2a9b573313e186c47842e1f7d/submoduleGitHash.gradle'
-// import the `waitJitpack()` function
-apply from: 'https://gist.githubusercontent.com/hypest/f526fe0775dedce0ce0133f1400d22a4/raw/0008b271a0d28fc79957fd3c2a027f57e98f796a/wait-jitpack.gradle'
-
android {
compileSdkVersion 28
@@ -78,23 +75,10 @@ dependencies {
api ("com.github.wordpress-mobile.WordPress-Aztec-Android:wordpress-shortcodes:$aztecVersion")
api ("com.github.wordpress-mobile.WordPress-Aztec-Android:wordpress-comments:$aztecVersion")
- debugImplementation files("./libs/hermes-debug.aar")
- releaseImplementation files("./libs/hermes-release.aar")
-
- if (rootProject.ext.has("buildGutenbergFromSource") && rootProject.ext.buildGutenbergFromSource) {
- implementation (project(':react-native-gutenberg-bridge')) {
- exclude group: 'com.squareup.okhttp3'
- exclude group: "com.android.volley"
- exclude group: 'com.google.code.findbugs'
- }
- } else {
- implementation (waitJitpack('com.github.wordpress-mobile', 'gutenberg-mobile', submoduleGitHash('../../../', 'libs/gutenberg-mobile'))) {
- // Inheriting RN's okhttp version can interfere with FluxC SSL handling
- // See https://github.com/wordpress-mobile/WordPress-Android/issues/9032 and https://github.com/wordpress-mobile/WordPress-FluxC-Android/issues/919
- exclude group: 'com.squareup.okhttp3'
- exclude group: "com.android.volley"
- exclude group: 'com.google.code.findbugs'
- }
+ implementation (project(':react-native-gutenberg-bridge')) {
+ exclude group: 'com.squareup.okhttp3'
+ exclude group: "com.android.volley"
+ exclude group: 'com.google.code.findbugs'
}
// Required Aztec dependencies (they should be included but Jitpack seems to be stripping these out)
diff --git a/libs/editor/WordPressEditor/libs/hermes-debug.aar b/libs/editor/WordPressEditor/libs/hermes-debug.aar
deleted file mode 100644
index 74bd4ae5cba7..000000000000
Binary files a/libs/editor/WordPressEditor/libs/hermes-debug.aar and /dev/null differ
diff --git a/libs/editor/WordPressEditor/libs/hermes-release.aar b/libs/editor/WordPressEditor/libs/hermes-release.aar
deleted file mode 100644
index cc208310ea2d..000000000000
Binary files a/libs/editor/WordPressEditor/libs/hermes-release.aar and /dev/null differ
diff --git a/libs/gutenberg-mobile b/libs/gutenberg-mobile
index bffe9d267809..fe0b27e85f1d 160000
--- a/libs/gutenberg-mobile
+++ b/libs/gutenberg-mobile
@@ -1 +1 @@
-Subproject commit bffe9d267809f1e336527ca20d805c2207751300
+Subproject commit fe0b27e85f1d8f460c2a36d88f8b6aa248f88c13
diff --git a/settings.gradle b/settings.gradle
index 519d72b1874e..c93240da283e 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -9,6 +9,12 @@ include ':libs:login:WordPressLoginFlow'
include ':WordPressMocks'
project(':WordPressMocks').projectDir = new File(rootProject.projectDir, properties.getOrDefault('wp.wordpress_mocks_path', 'libs/mocks') + '/WordPressMocks')
+include ':react-native-aztec'
+project(':react-native-aztec').projectDir = new File(rootProject.projectDir, 'libs/gutenberg-mobile/react-native-aztec/android')
+
+include ':react-native-gutenberg-bridge'
+project(':react-native-gutenberg-bridge').projectDir = new File(rootProject.projectDir, 'libs/gutenberg-mobile/react-native-gutenberg-bridge/android')
+
if (properties.getOrDefault('wp.BUILD_GUTENBERG_FROM_SOURCE', false).toBoolean()) {
include ':react-native-linear-gradient'
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, 'libs/gutenberg-mobile/node_modules/react-native-linear-gradient/android')