Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit ab3bdf8

Browse files
authored
Update README.md with deprecation notice
1 parent a1ee78c commit ab3bdf8

File tree

1 file changed

+109
-120
lines changed

1 file changed

+109
-120
lines changed

README.md

Lines changed: 109 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,127 @@
1-
# WordPress-FluxC-Android
1+
# 🚨 Repository Archived 🚨
2+
3+
> [!WARNING]
4+
> **This repository has been archived** because its functionality has been merged into the two clients that previously used it: the [WordPress/Jetpack app](https://github.com/wordpress-mobile/WordPress-Android) and the [WooCommerce app](https://github.com/woocommerce/woocommerce-ios). Future development will continue within those repositories.
5+
6+
---
7+
8+
<h1 align="center"><img src="docs/images/logo-woocommerce.svg" width="300"><br>for Android</h1>
9+
10+
<p align="center">A Jetpack-powered mobile app for WooCommerce.</p>
11+
12+
<p align="center">
13+
<a href="https://buildkite.com/automattic/woocommerce-android">
14+
<img src="https://badge.buildkite.com/3ac8789ce5bc81e2d078d32ee8e526efbdb7c1ef3b19c70be3.svg?branch=trunk">
15+
</a>
16+
<a href="https://github.com/woocommerce/woocommerce-android/releases">
17+
<img alt="Release" src="https://img.shields.io/github/v/tag/woocommerce/woocommerce-android?label=release&sort=semver">
18+
</a>
19+
<a href="https://github.com/woocommerce/woocommerce-android/blob/trunk/LICENSE.md">
20+
<img alt="License" src="https://img.shields.io/github/license/woocommerce/woocommerce-android">
21+
</a>
22+
</p>
223

3-
WordPress-FluxC-Android is a networking and persistence library that helps to connect and sync data from a WordPress site (self hosted, or wordpress.com site).
24+
<p align="center">
25+
<a href="#setup-instructions">Setup Instructions</a> •
26+
<a href="#build--test">Build & Test</a> •
27+
<a href="#-documentation">Documentation</a> •
28+
<a href="#-contributing">Contributing</a> •
29+
<a href="#-automation">Automation</a> •
30+
<a href="#-security">Security</a> •
31+
<a href="#-need-help">Need Help?</a> •
32+
<a href="#-resources">Resources</a> •
33+
<a href="#-license">License</a>
34+
</p>
435

5-
Based on the [Flux][1] pattern, we're using: [Dagger2][2] for dependency injection, [WellSql][3] for persistence.
36+
## 🎉 Setup Instructions
637

7-
FluxC is pronounced ‘fluxy’, and stands for ‘Flux Capacitor’. This makes a double reference to the architecture model (since a capacitor is a kind of storage unit, or ‘store’). More importantly, a flux capacitor is the core component of the DeLorean time machine in [Back to the Future](https://en.wikipedia.org/wiki/Back_to_the_Future), which ‘makes time travel possible.’
38+
1. Make sure you've installed [Android Studio](https://developer.android.com/studio).
39+
1. Clone this repository in the folder of your preference, and then enter that folder:
840

9-
**Most of our documentation for using and contributing to FluxC can be found in our [wiki](https://github.com/wordpress-mobile/WordPress-FluxC-Android/wiki).**
41+
```bash
42+
$ git clone https://github.com/woocommerce/woocommerce-android.git
43+
$ cd woocommerce-android
44+
```
1045

11-
## Using FluxC as a library
46+
1. Copy `defaults.properties` to the secrets directory: `cp defaults.properties ~/.configure/woocommerce-android/secrets/secrets.properties`. See the [Configuration Files](docs/project-overview.md#configuration-files) section for a breakdown of the properties.
47+
1. Generate the developer oauth2 tokens. These values get copied into the `~/.configure/woocommerce-android/secrets.properties` file in the next step. See the [OAuth2 Authentication](docs/project-overview.md#oauth2-authentication) section for details.
48+
1. In Android Studio, open the project from the local repository. This will auto-generate `local.properties` with the SDK location.
49+
1. Optional: Go to Tools → Device Manager and create an emulated device.
50+
1. Run. (Creates a default virtual device if you skipped the previous step)
1251

13-
Please see our [Using FluxC](https://github.com/wordpress-mobile/WordPress-FluxC-Android/wiki/Using-FluxC#initial-setup) wiki page for setup instructions.
52+
## Build & Test
1453

15-
## Building the library
54+
To build, install, and test the project from the command line:
1655

17-
The gradle build system will fetch all dependencies and generate
18-
files you need to build the project. You first need to generate the
19-
local.properties (replace YOUR_SDK_DIR with your actual android SDK directory)
20-
file and create the gradle.properties file. The easiest way is to copy
21-
our example:
56+
```bash
57+
$ ./gradlew assembleVanillaDebug # assemble the debug .apk
58+
$ ./gradlew installVanillaDebug # install the debug apk if you have an
59+
# emulator or a device connected
60+
$ ./gradlew :WooCommerce:testVanillaDebugUnitTest # assemble, install and run unit tests
61+
$ ./gradlew :WooCommerce:connectedVanillaDebugAndroidTest # assemble, install and run Android tests
62+
```
2263

23-
$ echo "sdk.dir=YOUR_SDK_DIR" > local.properties
24-
$ cp gradle.properties-example gradle.properties
25-
$ ./gradlew fluxc:build
64+
## 📚 Documentation
2665

27-
## Building and running tests and the example app
66+
- Project Overview
67+
- [OAuth2 Authentication](docs/project-overview.md#oauth2-authentication)
68+
- [Configuration Files](docs/project-overview.md#configuration-files)
69+
- [Using Detekt](docs/project-overview.md#using-detekt)
70+
- [Google Configuration](docs/project-overview.md#google-configuration)
71+
- Development Practices
72+
- [Coding Style Practices](docs/coding-style.md)
73+
- [Pull Request Guidelines](docs/pull-request-guidelines.md)
74+
- [Material Theme Designs](docs/material-theme-designs.md)
75+
- [Using Android Resources](docs/using-android-resources.md)
76+
- [Localization](docs/localization.md)
77+
- [Themes & Styling Practices](docs/theming-styling-best-practices.md)
78+
- [Optimising screens for tablets](docs/supporting-tablets.md)
79+
- Data
80+
- [Tracking Events](docs/tracking-events.md)
81+
- Accessibility
82+
- [Accessibility Guidelines](docs/accessibility-guidelines.md)
83+
- [Right to Left Layout Guidelines](docs/right-to-left-layout-guidelines.md)
84+
- Quality & Testing
85+
- [Beta Testing](https://woocommercehalo.wordpress.com/setup/join-android-beta/)
86+
- Features
87+
- [Feature Flags](docs/feature-flags.md)
2888

29-
$ cp -a example/properties-example/ example/properties/
30-
$ ./gradlew cAT # Regression tests
31-
$ ./gradlew testDebug # Unit tests
89+
## 👏 Contributing
3290

33-
Note: this uses the default `example/properties/api.properties` file. You'll have to get
34-
a [WordPress.com OAuth2 ID and secret](#oauth2-authentication).
91+
Read our [Contributing Guide](CONTRIBUTING.md) to learn about reporting issues, contributing code, and more ways to contribute.
3592

36-
We have some tests connecting to real HTTP servers, URL and credentials are defined in `example/properties/tests.properties`, you must edit it or obtain the real file to run the tests.
93+
## 🔐 Security
3794

38-
Please note that, unless using special credentials which cannot be shared publicly, some of the WordPress.com connected tests will not pass unless the OAuth2 ID and secret are registered to the account that the test is attempting to log into.
95+
If you happen to find a security vulnerability, we would appreciate you letting us know at https://hackerone.com/automattic and allowing us to respond before disclosing the issue publicly.
3996

40-
## OAuth2 Authentication
97+
## 🦮 Need Help?
4198

42-
To test with your own OAuth2 ID and Secret you will need to create an application or view the details for your existing application with our [WordPress.com applications manager][7].
99+
You can find the WooCommerce usage docs
100+
here: [woocommerce.com/documentation/woocommerce/](https://woocommerce.com/documentation/woocommerce/)
43101

44-
When creating your application, you should select "Native client" for the application type. The applications manager currently requires a "redirect URL", but this isn't used for mobile apps. Just use "https://localhost".
102+
General usage and development questions:
103+
104+
* [WooCommerce Slack Community](https://woocommerce.com/community-slack/)
105+
* [WordPress.org Forums](https://wordpress.org/support/plugin/woocommerce)
106+
* [The WooCommerce Help and Share Facebook group](https://www.facebook.com/groups/woohelp/)
107+
108+
## 🔗 Resources
109+
110+
- [Mobile blog](https://mobile.blog)
111+
- [WooCommerce API Documentation (currently v3)](https://woocommerce.github.io/woocommerce-rest-api-docs/#introduction)
112+
113+
## 📜 License
114+
115+
WooCommerce for Android is an Open Source project covered by the [GNU General Public License version 2](https://github.com/woocommerce/woocommerce-android/blob/trunk/LICENSE.md).
116+
117+
## 📚 Proprietary Libraries
118+
119+
In order to offer a great experience to our users, we use some proprietary libraries that are not open source. These libraries are:
120+
121+
- [ML Kit](https://developers.google.com/ml-kit) for barcode scanning and text recognition. You can find its Terms of Service [here](https://developers.google.com/ml-kit/terms).
45122

46-
Once you've created your application in the [applications manager][7], you'll need to edit the `example/properties/api.properties` file and change the `wp.OAUTH.APP.ID` and `wp.OAUTH.APP.SECRET` fields.
47-
48-
## Setting up Checkstyle
49-
50-
The FluxC project uses [Checkstyle](http://checkstyle.sourceforge.net/). You can run checkstyle using `./gradlew checkstyle`. You can also view errors and warnings in realtime with the Checkstyle plugin. When importing the project into Android Studio, Checkstyle should be set up automatically. If it is not, follow the steps below.
51-
52-
You can install the CheckStyle-IDEA plugin in Android Studio here:
53-
54-
`Android Studio > Preferences... > Plugins > CheckStyle-IDEA`
55-
56-
Once installed, you can configure the plugin here:
57-
58-
`Android Studio > Preferences... > Tools > Checkstyle`
59-
60-
From there, add and enable the configuration file for FluxC, located at [config/checkstyle.xml](https://github.com/wordpress-mobile/WordPress-FluxC-Android/blob/trunk/config/checkstyle.xml).
61-
62-
## Using Detekt
63-
64-
The FluxC project uses [detekt](https://github.com/detekt/detekt) for Kotlin linting and code style check.
65-
66-
You can run detekt using `./gradlew detekt`.
67-
68-
You can also view errors and warnings in realtime with the Detekt plugin.
69-
70-
You can install the detekt plugin in Android Studio here:
71-
72-
`Android Studio > Preferences... > Plugins > detekt`
73-
74-
Once installed, you can configure the plugin here:
75-
76-
`Android Studio > Preferences... > Tools > Detekt`
77-
78-
From there, add and enable the custom configuration file, located at [config/detekt/detekt.yml](https://github.com/wordpress-mobile/WordPress-FluxC-Android/blob/trunk/config/detekt/detekt.yml).
79-
80-
If you want to use the **AutoCorrect** feature of the plugin, make sure that the option `Enable formatting (ktlint) rules` is enabled in the above settings, then you will be able to reformat any file according to detekt's rules using the refactor menu `AutoCorrect by Detekt Rules`
81-
82-
## Contributing
83-
84-
### Actions
85-
86-
Each store should have a corresponding enum defining actions for that store. For example, [SiteStore][4]'s actions are defined in the [SiteAction][5] enum.
87-
88-
Action naming guide:
89-
90-
FETCH_X - request data from the server
91-
PUSH_X - send data to the server
92-
UPDATE_X - local change
93-
REMOVE_X - local remove
94-
DELETE_X - request deletion on the server
95-
96-
Each action enum should be annotated with `@ActionEnum`, with individual actions receiving an `@Action` annotation with an optional `payloadType` setting (see [SiteAction][5] for an example).
97-
98-
### Endpoints
99-
100-
Endpoints for each of the supported APIs are centralized in a generated endpoint file: `WPCOMREST.java` and `XMLRPC.java` (also `WPAPI.java`).
101-
102-
To add a new endpoint, first add it to the appropriate `fluxc-processor/src/main/resources/*.txt` file, and then rebuild the project to update the generated (Java) endpoint file.
103-
104-
Note that, for WordPress.com REST API endpoints, the final endpoint will be normalized to include a trailing slash.
105-
106-
107-
#### Response Models
108-
109-
Create a class implementing `Response` interface in a corresponding package in `org.wordpress.android.fluxc.network.rest` tree.
110-
111-
Prefer using nullable types in response models to prevent crashes when the API changes. Map nullable types to non-nullable types (if applicable) when mapping response models to domain models.
112-
113-
114-
### On Changed Events
115-
116-
All On Changed Events extend the OnChanged class. They encapsulate an `error`
117-
field. Events can be checked for an error by calling `event.isError()`.
118-
119-
On Changed Events naming guide:
120-
121-
onXChanged(int rowsAffected) - Keep X singular even if multiple X were changed
122-
onXRemoved(int rowsAffected) - Keep X singular even if multiple X were removed
123-
124-
## Need help to build or hack?
125-
126-
Say hello on our [Slack][6] channel: `#mobile`.
127-
128-
## LICENSE
129-
130-
WordPress-FluxC-Android is an Open Source project covered by the [GNU General Public License version 2](LICENSE.md).
131-
132-
[1]: https://facebook.github.io/flux/docs/overview/
133-
[2]: https://google.github.io/dagger/
134-
[3]: https://github.com/yarolegovich/wellsql
135-
[4]: https://github.com/wordpress-mobile/WordPress-FluxC-Android/blob/ba9dd84c54b12d53e01dfdb8efb4a18ed8343311/fluxc/src/main/java/org/wordpress/android/fluxc/store/SiteStore.java
136-
[5]: https://github.com/wordpress-mobile/WordPress-FluxC-Android/blob/ba9dd84c54b12d53e01dfdb8efb4a18ed8343311/fluxc/src/main/java/org/wordpress/android/fluxc/action/SiteAction.java
137-
[6]: https://make.wordpress.org/chat/
138-
[7]: https://developer.wordpress.com/apps/
123+
<p align="center">
124+
<br/><br/>
125+
Made with 💜 by <a href="https://woocommerce.com/">WooCommerce</a>.<br/>
126+
<a href="https://woocommerce.com/careers/">We're hiring</a>! Come work with us!
127+
</p>

0 commit comments

Comments
 (0)