Skip to content

Commit

Permalink
Merge branch 'develop' into rnmobile/refactor/gallery-as-nested-image…
Browse files Browse the repository at this point in the history
…-blocks
  • Loading branch information
mkevins committed Jul 7, 2021
2 parents 68dc7af + 886f6e9 commit 705588c
Show file tree
Hide file tree
Showing 331 changed files with 9,382 additions and 6,443 deletions.
43 changes: 43 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
docker-container: &docker-container
plugins:
- docker#v3.8.0:
image: "public.ecr.aws/m4u4m2y0/android-build-image:latest"
environment:
- "CI=true"

steps:
- label: "checkstyle"
<<: *docker-container
command: |
cp gradle.properties-example gradle.properties
./gradlew checkstyle
- label: "ktlint"
<<: *docker-container
command: |
cp gradle.properties-example gradle.properties
./gradlew ciktlint
- label: "detekt"
<<: *docker-container
command: |
cp gradle.properties-example gradle.properties
./gradlew WordPress:detekt
- label: "lint"
<<: *docker-container
command: |
cp gradle.properties-example gradle.properties
./gradlew lintWordpressVanillaRelease
- label: "Test WordPress"
<<: *docker-container
command: |
cp gradle.properties-example gradle.properties
./gradlew testWordpressVanillaRelease
- label: "Test WordPressProcessors"
<<: *docker-container
command: |
cp gradle.properties-example gradle.properties
./gradlew :libs:WordPressProcessors:test
- label: "Test ImageEditor"
<<: *docker-container
command: |
cp gradle.properties-example gradle.properties
./gradlew :libs:image-editor:ImageEditor:test
101 changes: 26 additions & 75 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ parameters:
release_build:
type: boolean
default: false
# Display name of the app and should match the usual public facing name (e.g. WordPress, Jetpack)
app_name:
type: string
default: "WordPress"
# The key used to reference the app in the Fastfile
product_key:
type: string
default: "wordpress"

commands:
copy-gradle-properties:
Expand All @@ -42,63 +50,6 @@ commands:

version: 2.1
jobs:
test:
executor:
name: android/default
api-version: "29"
steps:
- git/shallow-checkout:
init-submodules: true
- checkout-submodules
- android/restore-gradle-cache
- copy-gradle-properties
- update-gradle-memory
- run:
name: Test WordPress
command: ./gradlew testWordpressVanillaRelease --stacktrace --no-daemon
- run:
name: Test WordPressProcessors
command: ./gradlew :libs:WordPressProcessors:test --stacktrace
- run:
name: Test ImageEditor
command: ./gradlew :libs:image-editor:ImageEditor:test --stacktrace
- android/save-gradle-cache
- android/save-test-results
lint:
executor:
name: android/default
api-version: "29"
steps:
- git/shallow-checkout:
init-submodules: true
- checkout-submodules
- android/restore-gradle-cache
- copy-gradle-properties
- update-gradle-memory
- run:
name: Checkstyle
command: ./gradlew --stacktrace checkstyle
- run:
name: ktlint
command: ./gradlew --stacktrace ciktlint
- run:
name: Detekt
command: ./gradlew --stacktrace WordPress:detekt
- run:
name: Lint
command: ./gradlew --stacktrace lintWordpressVanillaRelease || (grep -A20 -B2 'severity="Error"' -r --include="*.xml" WordPress libs; exit 1)
no_output_timeout: 40m
- run:
name: Violations
when: on_fail
command: |
if [ -n "$GITHUB_API_TOKEN" ]; then
./gradlew --stacktrace violationCommentsToGitHub -DGITHUB_PULLREQUESTID=${CIRCLE_PULL_REQUEST##*/} -DGITHUB_OAUTH2TOKEN=$GHHELPER_ACCESS
else
echo "Not posting lint errors to Github because \$GITHUB_API_TOKEN is not found"
fi
- android/save-gradle-cache
- android/save-lint-results
Installable Build:
executor:
name: android/default
Expand All @@ -115,7 +66,7 @@ jobs:
- update-gradle-memory
- android/restore-gradle-cache
- run:
name: Build APK
name: Set version environment variable
command: |
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
PR_NUMBER=$(basename $CIRCLE_PULL_REQUEST)
Expand All @@ -126,14 +77,19 @@ jobs:
VERSION_NAME="${PREFIX}-build-${CIRCLE_BUILD_NUM}"
echo "export VERSION_NAME=$VERSION_NAME" >> $BASH_ENV
./gradlew --stacktrace assembleWordpressJalapenoDebug -PversionName="$VERSION_NAME"
- run:
name: Build WordPress APK
command: ./gradlew --stacktrace assembleWordpressJalapenoDebug -PversionName="$VERSION_NAME"
- run:
name: Build Jetpack APK
command: ./gradlew --stacktrace assembleJetpackJalapenoDebug -PversionName="$VERSION_NAME"
- android/save-gradle-cache
- run:
name: Prepare APK
command: |
mkdir -p Artifacts
mv WordPress/build/outputs/apk/wordpressJalapeno/debug/org.wordpress.android-wordpress-jalapeno-debug.apk "Artifacts/WordPress-${VERSION_NAME}.apk"
mv WordPress/build/outputs/apk/jetpackJalapeno/debug/org.wordpress.android-jetpack-jalapeno-debug.apk "Artifacts/Jetpack-${VERSION_NAME}.apk"
- store_artifacts:
path: Artifacts
destination: Artifacts
Expand All @@ -147,7 +103,7 @@ jobs:
- run:
name: Init messages
command: |
echo "export SLACK_FAILURE_MESSAGE=':red_circle: Build for WordPress Android failed!'" >> $BASH_ENV
echo "export SLACK_FAILURE_MESSAGE=':red_circle: Build for << pipeline.parameters.app_name >> Android failed!'" >> $BASH_ENV
- git/shallow-checkout:
init-submodules: true
- checkout-submodules
Expand All @@ -161,27 +117,27 @@ jobs:
- run:
name: Prepare build
command: |
echo "export APP_VERSION=$(./gradlew -q printVersionName | tail -1)" >> $BASH_ENV
SLACK_MESSAGE_VERSION=$(./gradlew -q printVersionName | tail -1)
echo "export SLACK_FAILURE_MESSAGE=':red_circle: Build for WordPress Android $SLACK_MESSAGE_VERSION failed!'" >> $BASH_ENV
echo "export SLACK_SUCCESS_MESSAGE=':tada: WordPress Android $SLACK_MESSAGE_VERSION has been deployed!'" >> $BASH_ENV
echo "export APP_VERSION=$(./gradlew -q printVersionName -PproductKey='<< pipeline.parameters.product_key >>' | tail -1)" >> $BASH_ENV
SLACK_MESSAGE_VERSION=$(./gradlew -q printVersionName -PproductKey="<< pipeline.parameters.product_key >>" | tail -1)
echo "export SLACK_FAILURE_MESSAGE=':red_circle: Build for << pipeline.parameters.app_name >> Android $SLACK_MESSAGE_VERSION failed!'" >> $BASH_ENV
echo "export SLACK_SUCCESS_MESSAGE=':tada: << pipeline.parameters.app_name >> Android $SLACK_MESSAGE_VERSION has been deployed!'" >> $BASH_ENV
# Prevent fastlane from checking for updates, also removing the verbose fastlane changelog at the end of each invocation.
echo "export FASTLANE_SKIP_UPDATE_CHECK=1" >> $BASH_ENV
bundle check
- run:
name: Build Zalpha
command: |
if [[ ${APP_VERSION} == *"-rc-"* ]]; then
bundle exec fastlane build_alpha skip_confirm:true skip_prechecks:true create_release:true upload_to_play_store:true
bundle exec fastlane build_alpha app:"<< pipeline.parameters.product_key >>" skip_confirm:true skip_prechecks:true create_release:true upload_to_play_store:true
fi
no_output_timeout: 15m
- run:
name: Build Vanilla
command: |
if [[ ${APP_VERSION} == *"-rc-"* ]]; then
bundle exec fastlane build_beta skip_confirm:true skip_prechecks:true create_release:true upload_to_play_store:true
bundle exec fastlane build_beta app:"<< pipeline.parameters.product_key >>" skip_confirm:true skip_prechecks:true create_release:true upload_to_play_store:true
else
bundle exec fastlane build_and_upload_release skip_confirm:true skip_prechecks:true create_release:true upload_to_play_store:true
bundle exec fastlane build_and_upload_release app:"<< pipeline.parameters.product_key >>" skip_confirm:true skip_prechecks:true create_release:true upload_to_play_store:true
fi
no_output_timeout: 15m
- android/save-gradle-cache
Expand Down Expand Up @@ -212,7 +168,7 @@ jobs:
- android/restore-gradle-cache
- copy-gradle-properties
- update-gradle-memory:
jvmargs: "Xmx1024m"
jvmargs: "Xmx1536m"
- run:
name: Build
command: ./gradlew WordPress:assembleWordPressVanillaDebug --stacktrace
Expand Down Expand Up @@ -441,8 +397,6 @@ workflows:
- << pipeline.parameters.release_build >>
jobs:
- submodules-strings-check
- test
- lint
- Installable Build:
filters:
branches:
Expand Down Expand Up @@ -486,8 +440,5 @@ workflows:
Release Build:
when: << pipeline.parameters.release_build >>
jobs:
- lint
- Release Build:
requires:
- lint
- Release Build

2 changes: 1 addition & 1 deletion .configure
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"project_name": "WordPress-Android",
"branch": "trunk",
"pinned_hash": "92cde8f76c2a77791f8e5164f1e5b287d9cb6f1e",
"pinned_hash": "08dfbcacef71687eebd0febaf97258e4f708ea54",
"files_to_copy": [
{
"file": "android/WPAndroid/gradle.properties",
Expand Down
Binary file modified .configure-files/google-services.json.enc
Binary file not shown.
36 changes: 21 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
GIT
remote: git@github.com:wordpress-mobile/release-toolkit.git
revision: 262e6800830abc75c7d9b6817537b4c099588634
branch: jetpack/fix-crashes
specs:
fastlane-plugin-wpmreleasetoolkit (1.3.0)
activesupport (~> 5)
bigdecimal (~> 1.4)
chroma (= 0.2.0)
diffy (~> 3.3)
git (~> 1.3)
jsonlint (~> 0.3)
nokogiri (~> 1.11)
octokit (~> 4.18)
parallel (~> 1.14)
progress_bar (~> 1.3)
rake (~> 12.3)
rake-compiler (~> 1.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -101,19 +120,6 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-wpmreleasetoolkit (1.2.0)
activesupport (~> 5)
bigdecimal (~> 1.4)
chroma (= 0.2.0)
diffy (~> 3.3)
git (~> 1.3)
jsonlint (~> 0.3)
nokogiri (~> 1.11)
octokit (~> 4.18)
parallel (~> 1.14)
progress_bar (~> 1.3)
rake (~> 12.3)
rake-compiler (~> 1.0)
gh_inspector (1.1.3)
git (1.8.1)
rchardet (~> 1.8)
Expand Down Expand Up @@ -187,7 +193,7 @@ GEM
octokit (4.21.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
oj (3.11.5)
oj (3.11.7)
optimist (3.0.1)
options (2.3.2)
os (1.1.1)
Expand Down Expand Up @@ -258,7 +264,7 @@ PLATFORMS

DEPENDENCIES
fastlane (~> 2)
fastlane-plugin-wpmreleasetoolkit (~> 1.1)
fastlane-plugin-wpmreleasetoolkit!
nokogiri
rmagick (~> 4.1)

Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,32 @@ Once you've created your application in the [applications manager][5], you'll
need to edit the `./gradle.properties` file and change the
`wp.oauth.app_id` and `wp.oauth.app_secret` fields. Then you can compile and
run the app on a device or an emulator and try to login with a WordPress.com
account. Note that authenticating to WordPress.com via Google is not supported
account. Note that authenticating to WordPress.com via Google is not supported
in development builds of the app, only in the official release.

Note that credentials created with our [WordPress.com applications manager][5]
allow login only and not signup. New accounts must be created using the [official app][1]
or [on the web](https://wordpress.com/start). Login is restricted to the WordPress.com
account with which the credentials were created. In other words, if the credentials
were created with foo@email.com, you will only be able to login with foo@email.com.
Using another account like bar@email.com will cause the `Client cannot use "password" grant_type` error.
Note that credentials created with our [WordPress.com applications manager][5]
allow login only and not signup. New accounts must be created using the [official app][1]
or [on the web](https://wordpress.com/start). Login is restricted to the WordPress.com
account with which the credentials were created. In other words, if the credentials
were created with foo@email.com, you will only be able to login with foo@email.com.
Using another account like bar@email.com will cause the `Client cannot use "password" grant_type` error.

For security reasons, some account-related actions aren't supported for development
For security reasons, some account-related actions aren't supported for development
builds when using a WordPress.com account with 2-factor authentication enabled.

Read more about [OAuth2][6] and the [WordPress.com REST endpoint][7].

## Build and Test ##
## Build and Test ##

To build, install, and test the project from the command line:

$ ./gradlew assembleVanillaDebug # assemble the debug .apk
$ ./gradlew installVanillaDebug # install the debug .apk if you have an
# emulator or an Android device connected
$ ./gradlew :WordPress:testVanillaDebugUnitTest # assemble, install and run unit tests
$ ./gradlew :WordPress:connectedVanillaDebugAndroidTest # assemble, install and run Android tests
$ ./gradlew assembleWordPressVanillaDebug # assemble the debug .apk
$ ./gradlew installWordPressVanillaDebug # install the debug .apk if you have an
# emulator or an Android device connected
$ ./gradlew :WordPress:testWordPressVanillaDebugUnitTest # assemble, install and run unit tests
$ ./gradlew :WordPress:connectedWordPressVanillaDebugAndroidTest # assemble, install and run Android tests

## Directory structure ##
## Directory structure ##
.
├── libs # dependencies used to build debug variants
├── tools # script collection
Expand Down Expand Up @@ -114,7 +114,7 @@ If you have questions or just want to say hi, join the [WordPress Slack](https:/
- [Pull Request Guidelines](docs/pull-request-guidelines.md) - branch naming and how to write good pull requests
- [Subtree'd Library Projects](docs/subtreed-library-projects.md) - how to deal with subtree dependencies

Please read the [docs](docs/) for more.
Please read the [docs](docs/) for more.

## Resources

Expand Down
13 changes: 12 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
*** PLEASE FOLLOW THIS FORMAT: [<priority indicator, more stars = higher priority>] <description> [<PR URL>]

17.7
17.8
-----
* [*] Fixed a bug where the web version of the editor did not load when using an account created before December 2018. [#14762]

17.7
-----
* [*] Block editor: Tablet view fixes for inserter button. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3602]
* [**] Block editor: Fixed an issue where pressing enter inside a text-based block was not creating a new block when using Gboard [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3590]
* [*] Block editor: Tweaks to the badge component's styling, including change of background color and reduced padding. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3642]
* [***] Block editor: New block Layout grid. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3513]
* [***] Added blogging reminders to site settings and after a new post has been created
* [*] Fixed Reader duplicate post issue [https://github.com/wordpress-mobile/WordPress-Android/issues/12938]

17.6
-----
* [*] Disables the ability to open the editor for Post Pages [#14523]
* [*] Block Editor: "Set as featured" button within image block settings. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3116]
* [***] Block Editor: Audio block now available on WP.com sites on the free plan. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3523]
* [*] Block Editor: Improve unsupported block message for reusable block. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3621]
* [**] Block Editor: Fix incorrect block insertion point after blurring the post title field. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3640]

17.5
-----
Expand Down
Loading

0 comments on commit 705588c

Please sign in to comment.