Skip to content

Commit 3757530

Browse files
jkmasselclaude
andauthored
Remove wasabi, jalapeno, and the buildType flavor dimension (#22651)
* Remove wasabi, jalapeno, and the buildType flavor dimension The three buildType flavors (vanilla, wasabi, jalapeno) existed only for cosmetic differences (app name, icon) and side-by-side installation via applicationIdSuffix. They caused Gradle cache fragmentation across CI jobs since each job compiled a different variant independently. This removes the entire buildType flavor dimension, simplifying variant names from e.g. wordpressVanillaDebug to wordpressDebug. All CI jobs now share the same variant, maximizing Gradle remote cache reuse. - Remove vanilla, wasabi, jalapeno flavor definitions from build.gradle - Remove the buildType flavor dimension (keep only app dimension) - Move ENABLE_DEBUG_SETTINGS to release buildType (false) vs default (true) - Delete wasabi, jalapeno, jetpackWasabi, jetpackJalapeno source sets - Simplify WordPressPublicData and JetpackPublicData - Update all CI scripts, Fastlane lanes, and documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add soft_fail to diff report jobs for variant name transition The diff tools compare against the base branch (trunk), which still uses the old variant names (wordpressVanillaRelease). Until this PR merges, these jobs will fail when checking out trunk. soft_fail prevents them from blocking the build. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add applicationIdSuffix for debug builds to match Firebase config Prototype builds upload to Firebase App Distribution, which expects the .prealpha package suffix (from the old jalapeno flavor). Adding applicationIdSuffix ".prealpha" to the debug buildType preserves this and also maintains side-by-side installation with production apps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix BuildConfig.FLAVOR_app references in e2e test flows FLAVOR_app only exists with multi-dimension flavors. With the buildType dimension removed, use BuildConfig.FLAVOR instead (which now contains "wordpress" or "jetpack" directly). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add distinct prealpha icons for debug builds Move the jalapeno/jetpackJalapeno debug icon resources into debug and jetpackDebug source sets so debug builds retain a visually distinct app icon and "Pre-Alpha" app name. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Address Petros’ feedback --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5004b8a commit 3757530

55 files changed

Lines changed: 90 additions & 411 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.buildkite/commands/gradle-cache-build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ bundle exec fastlane run configure_apply
1414

1515
echo "--- :hammer_and_wrench: Building"
1616
if [ "$1" = "wordpress" ]; then
17-
./gradlew assembleWordpressWasabiDebug
17+
./gradlew assembleWordpressDebug
1818
fi
1919

2020
if [ "$1" = "jetpack" ]; then
21-
./gradlew assembleJetpackWasabiDebug
21+
./gradlew assembleJetpackDebug
2222
fi

.buildkite/commands/lint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ bundle exec fastlane check_declared_locales_consistency app:"$1"
1515
echo "--- :microscope: Linting"
1616

1717
if [ "$1" = "wordpress" ]; then
18-
./gradlew lintWordpressVanillaRelease
18+
./gradlew lintWordpressRelease
1919
exit 0
2020
fi
2121

2222
if [ "$1" = "jetpack" ]; then
2323
set +e
24-
./gradlew lintJetpackVanillaRelease
24+
./gradlew lintJetpackRelease
2525
lint_exit_code=$?
2626
set -e
2727

28-
upload_sarif_to_github "WordPress/build/reports/lint-results-jetpackVanillaRelease.sarif"
28+
upload_sarif_to_github "WordPress/build/reports/lint-results-jetpackRelease.sarif"
2929
exit $lint_exit_code
3030
fi
3131

.buildkite/commands/run-unit-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ fi
1010
echo "+++ 🧪 Testing"
1111
set +e
1212
./gradlew \
13-
testWordpressWasabiDebugUnitTest \
13+
testWordpressDebugUnitTest \
1414
:libs:processors:test \
1515
:libs:image-editor:testDebugUnitTest \
1616
:libs:fluxc:testDebugUnitTest \
1717
:libs:login:testDebugUnitTest \
18-
koverXmlReportWordpressWasabiDebug \
18+
koverXmlReportWordpressDebug \
1919
:libs:processors:koverXmlReportJvm \
2020
:libs:image-editor:koverXmlReportDebug \
2121
:libs:fluxc:koverXmlReportDebug \
@@ -45,7 +45,7 @@ echo "--- 🚦 Collecting Test Results"
4545

4646
# Define test result directories for each module
4747
declare -A TEST_RESULT_DIRS=(
48-
["WordPress:wordpress"]="WordPress/build/test-results/testWordpressWasabiDebugUnitTest"
48+
["WordPress:wordpress"]="WordPress/build/test-results/testWordpressDebugUnitTest"
4949
["processors"]="libs/processors/build/test-results/test"
5050
["image-editor"]="libs/image-editor/build/test-results/testDebugUnitTest"
5151
["fluxc"]="libs/fluxc/build/test-results/testDebugUnitTest"

.buildkite/pipeline.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,30 @@ steps:
7878
steps:
7979
- label: "Dependency Tree Diff"
8080
command: |
81-
comment_with_dependency_diff 'WordPress' 'wordpressVanillaReleaseRuntimeClasspath'
81+
comment_with_dependency_diff 'WordPress' 'wordpressReleaseRuntimeClasspath'
8282
if: build.pull_request.id != null
8383
plugins: [$CI_TOOLKIT]
8484
artifact_paths:
8585
- "**/build/reports/diff/*"
86+
# TODO: Remove soft_fail after this PR merges and trunk
87+
# uses the new variant names (without buildType flavors)
88+
soft_fail: true
8689

8790
- label: "Merged Manifest Diff WordPress"
88-
command: ".buildkite/commands/diff-merged-manifest.sh wordpressVanillaRelease"
91+
command: ".buildkite/commands/diff-merged-manifest.sh wordpressRelease"
8992
if: build.pull_request.id != null
9093
plugins: [$CI_TOOLKIT]
9194
artifact_paths:
9295
- "**/build/reports/diff_manifest/**/**/*"
96+
soft_fail: true
9397

9498
- label: "Merged Manifest Diff Jetpack"
95-
command: ".buildkite/commands/diff-merged-manifest.sh jetpackVanillaRelease"
99+
command: ".buildkite/commands/diff-merged-manifest.sh jetpackRelease"
96100
if: build.pull_request.id != null
97101
plugins: [$CI_TOOLKIT]
98102
artifact_paths:
99103
- "**/build/reports/diff_manifest/**/**/*"
104+
soft_fail: true
100105

101106
#################
102107
# Unit Tests

.claude/skills/run-app/SKILL.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: >
88

99
# Run App
1010

11-
Build and run the Jetpack wasabi debug variant on a connected Android
11+
Build and run the Jetpack debug variant on a connected Android
1212
device or emulator. By default this skill builds and runs the
1313
**Jetpack** app. Only build the WordPress app if the user explicitly
1414
asks for it.
@@ -17,16 +17,16 @@ asks for it.
1717

1818
### 1. Build the app
1919

20-
By default, build the Jetpack wasabi debug variant:
20+
By default, build the Jetpack debug variant:
2121

2222
```bash
23-
./gradlew assembleJetpackWasabiDebug
23+
./gradlew assembleJetpackDebug
2424
```
2525

2626
If the user explicitly asks for the WordPress app instead, run:
2727

2828
```bash
29-
./gradlew assembleWordPressWasabiDebug
29+
./gradlew assembleWordPressDebug
3030
```
3131

3232
### 2. Check for connected devices
@@ -89,14 +89,14 @@ Gradle versions):
8989
**Jetpack (default):**
9090

9191
```bash
92-
APK=$(find WordPress/build/outputs/apk/jetpackWasabi/debug \
92+
APK=$(find WordPress/build/outputs/apk/jetpack/debug \
9393
-name '*.apk' ! -name '*androidTest*' | head -1)
9494
```
9595

9696
**WordPress (only if the user explicitly requested it):**
9797

9898
```bash
99-
APK=$(find WordPress/build/outputs/apk/wordpressWasabi/debug \
99+
APK=$(find WordPress/build/outputs/apk/wordpress/debug \
100100
-name '*.apk' ! -name '*androidTest*' | head -1)
101101
```
102102

@@ -109,8 +109,8 @@ adb [-s <serial>] install -r "$APK"
109109

110110
Then launch the app:
111111

112-
- **Jetpack**: `adb [-s <serial>] shell am start -n com.jetpack.android.beta/org.wordpress.android.ui.WPLaunchActivity`
113-
- **WordPress**: `adb [-s <serial>] shell am start -n org.wordpress.android.beta/org.wordpress.android.ui.WPLaunchActivity`
112+
- **Jetpack**: `adb [-s <serial>] shell am start -n com.jetpack.android/org.wordpress.android.ui.WPLaunchActivity`
113+
- **WordPress**: `adb [-s <serial>] shell am start -n org.wordpress.android/org.wordpress.android.ui.WPLaunchActivity`
114114

115115
### 6. Report the result
116116

CLAUDE.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
55
## Build and Test Commands
66

77
### Main Build Commands
8-
- `./gradlew assembleWordPressVanillaDebug` - Build debug APK for WordPress app
9-
- `./gradlew assembleJetpackVanillaDebug` - Build debug APK for Jetpack app
10-
- `./gradlew installWordPressVanillaDebug` - Install debug APK to connected device
11-
- `./gradlew installJetpackVanillaDebug` - Install debug APK for Jetpack to device
8+
- `./gradlew assembleWordPressDebug` - Build debug APK for WordPress app
9+
- `./gradlew assembleJetpackDebug` - Build debug APK for Jetpack app
10+
- `./gradlew installWordPressDebug` - Install debug APK to connected device
11+
- `./gradlew installJetpackDebug` - Install debug APK for Jetpack to device
1212

1313
### Testing Commands
14-
- `./gradlew :WordPress:testWordPressVanillaDebugUnitTest` - Run unit tests for WordPress app
15-
- `./gradlew :WordPress:connectedWordPressVanillaDebugAndroidTest` - Run instrumented tests for WordPress app
14+
- `./gradlew :WordPress:testWordPressDebugUnitTest` - Run unit tests for WordPress app
15+
- `./gradlew :WordPress:connectedWordPressDebugAndroidTest` - Run instrumented tests for WordPress app
1616
- `bundle exec fastlane build_and_run_instrumented_test app:wordpress` - Build and run WordPress instrumented tests in Firebase Test Lab
1717
- `bundle exec fastlane build_and_run_instrumented_test app:jetpack` - Build and run Jetpack instrumented tests in Firebase Test Lab
1818

1919
### Code Quality Commands
2020
- `./gradlew checkstyle` - Run Checkstyle linter (generates report in `WordPress/build/reports/checkstyle/checkstyle.html`)
2121
- `./gradlew detekt` - Run Detekt linter for Kotlin (generates report in `WordPress/build/reports/detekt/detekt.html`)
22-
- `./gradlew lintWordPressVanillaRelease` - Run Android lint on WordPress release variant
22+
- `./gradlew lintWordPressRelease` - Run Android lint on WordPress release variant
2323

2424
## Architecture Overview
2525

@@ -30,8 +30,8 @@ This repository builds two apps from shared codebase:
3030

3131
### Product Flavors and Build Types
3232
- **App Flavors**: `wordpress`, `jetpack`
33-
- **Build Type Flavors**: `vanilla` (release/beta), `wasabi` (development), `jalapeno` (CI/prototype)
34-
- Common development variant: `jetpackWasabiDebug`
33+
- **Build Types**: `debug`, `release`
34+
- Common development variant: `jetpackDebug`
3535

3636
### Module Architecture
3737
```
@@ -121,7 +121,7 @@ WordPress/src/main/java/org/wordpress/android/
121121
other members (properties, init blocks, constructors, functions)
122122

123123
### Development Workflow
124-
- Default development flavor: `jetpackWasabi` (Jetpack app with beta suffix)
124+
- Default development variant: `jetpackDebug`
125125
- Remote build cache available for faster builds (requires setup)
126126
- Fastlane used for release automation and testing
127127
- Secrets managed via `secrets.properties` file (not in repo)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Notes:
2121

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

24-
$ ./gradlew assembleWordPressVanillaDebug # assemble the debug .apk
25-
$ ./gradlew installWordPressVanillaDebug # install the debug .apk if you have an
24+
$ ./gradlew assembleWordPressDebug # assemble the debug .apk
25+
$ ./gradlew installWordPressDebug # install the debug .apk if you have an
2626
# emulator or an Android device connected
27-
$ ./gradlew :WordPress:testWordPressVanillaDebugUnitTest # assemble, install and run unit tests
28-
$ ./gradlew :WordPress:connectedWordPressVanillaDebugAndroidTest # assemble, install and run Android tests
27+
$ ./gradlew :WordPress:testWordPressDebugUnitTest # assemble, install and run unit tests
28+
$ ./gradlew :WordPress:connectedWordPressDebugAndroidTest # assemble, install and run Android tests
2929

3030
## Running the app ##
3131

@@ -49,7 +49,7 @@ Note: Access to WordPress.com features is temporarily disabled in the developmen
4949
│   │   ├── java # main project java code
5050
│   │   └── res # main project resources
5151
│   ├── debug # debug variant
52-
│   └── wasabi # wasabi variant specific resources and manifest
52+
│   └── release # release variant
5353

5454
## Google Configuration ##
5555

WordPress/build.gradle

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ fladle {
5454
}
5555

5656
String appPathForVariant(String app) {
57-
String path = "outputs/apk/${app}Vanilla/debug"
57+
String path = "outputs/apk/${app}/debug"
5858
return new File(layout.buildDirectory.dir(path).get().asFile, '*.apk').absolutePath
5959
}
6060
String testPathForVariant(String app) {
61-
String path = "outputs/apk/androidTest/${app}Vanilla/debug"
61+
String path = "outputs/apk/androidTest/${app}/debug"
6262
return new File(layout.buildDirectory.dir(path).get().asFile, '*.apk').absolutePath
6363
}
6464

@@ -195,7 +195,7 @@ android {
195195
targetCompatibility JvmTarget.fromTarget(libs.versions.java.get()).target
196196
}
197197

198-
flavorDimensions = ['app', 'buildType']
198+
flavorDimensions = ['app']
199199

200200

201201
productFlavors {
@@ -242,29 +242,6 @@ android {
242242
resourceConfigurations += ["in", "iw"]
243243
}
244244

245-
// Used for release/beta testing builds. Usually shouldn't be build locally.
246-
// AppName: WordPress/Jetpack
247-
vanilla {
248-
dimension "buildType"
249-
250-
buildConfigField "boolean", "ENABLE_DEBUG_SETTINGS", "false"
251-
}
252-
253-
// Used for local development - preferred variant for developers.
254-
// AppName: WordPress Beta/Jetpack Beta
255-
wasabi {
256-
isDefault true
257-
applicationIdSuffix ".beta"
258-
dimension "buildType"
259-
}
260-
261-
// Used for CI builds on PRs (aka "Prototype Builds"). Can be used locally when a developer needs to install multiple versions of the app on the same device.
262-
// AppName: WordPress Pre-Alpha/Jetpack Pre-Alpha
263-
jalapeno {
264-
applicationIdSuffix ".prealpha"
265-
dimension "buildType"
266-
}
267-
268245
// Also dynamically add additional `buildConfigFields` to our app flavors from any `wp.`/`jp.`-prefixed property in `secrets.properties`
269246
addBuildConfigFieldsFromPrefixedProperties(wordpress, gradle.ext.secretProperties, ['wp'])
270247
addBuildConfigFieldsFromPrefixedProperties(jetpack, gradle.ext.secretProperties, ['wp', 'jp']) // Inherit same properties used from WP first then overwrite with JP-specific ones
@@ -276,9 +253,11 @@ android {
276253
// but we don't obfuscate the bytecode.
277254
minifyEnabled true
278255
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
256+
buildConfigField "boolean", "ENABLE_DEBUG_SETTINGS", "false"
279257
}
280258

281259
debug {
260+
applicationIdSuffix ".prealpha"
282261
minifyEnabled false
283262
pseudoLocalesEnabled true
284263
}

WordPress/google-services.json-example

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -88,48 +88,6 @@
8888
}
8989
}
9090
},
91-
{
92-
"client_info": {
93-
"mobilesdk_app_id": "1:123:android:abc",
94-
"android_client_info": {
95-
"package_name": "org.wordpress.android.beta"
96-
}
97-
},
98-
"oauth_client": [
99-
{
100-
"client_id": "123-abc.apps.googleusercontent.com",
101-
"client_type": 3
102-
},
103-
{
104-
"client_id": "",
105-
"client_type": 1,
106-
"android_info": {
107-
"package_name": "org.wordpress.android.beta",
108-
"certificate_hash": ""
109-
}
110-
}
111-
],
112-
"api_key": [
113-
{
114-
"current_key": ""
115-
}
116-
],
117-
"services": {
118-
"analytics_service": {
119-
"status": 2,
120-
"analytics_property": {
121-
"tracking_id": ""
122-
}
123-
},
124-
"appinvite_service": {
125-
"status": 1,
126-
"other_platform_oauth_client": []
127-
},
128-
"ads_service": {
129-
"status": 1
130-
}
131-
}
132-
},
13391
{
13492
"client_info": {
13593
"mobilesdk_app_id": "1:123:android:abc",
@@ -213,48 +171,6 @@
213171
"status": 1
214172
}
215173
}
216-
},
217-
{
218-
"client_info": {
219-
"mobilesdk_app_id": "1:123:android:abc",
220-
"android_client_info": {
221-
"package_name": "com.jetpack.android.beta"
222-
}
223-
},
224-
"oauth_client": [
225-
{
226-
"client_id": "123-abc.apps.googleusercontent.com",
227-
"client_type": 3
228-
},
229-
{
230-
"client_id": "",
231-
"client_type": 1,
232-
"android_info": {
233-
"package_name": "com.jetpack.android.beta",
234-
"certificate_hash": ""
235-
}
236-
}
237-
],
238-
"api_key": [
239-
{
240-
"current_key": ""
241-
}
242-
],
243-
"services": {
244-
"analytics_service": {
245-
"status": 2,
246-
"analytics_property": {
247-
"tracking_id": ""
248-
}
249-
},
250-
"appinvite_service": {
251-
"status": 1,
252-
"other_platform_oauth_client": []
253-
},
254-
"ads_service": {
255-
"status": 1
256-
}
257-
}
258174
}
259175
],
260176
"configuration_version": "1"

WordPress/src/androidTest/java/org/wordpress/android/e2e/flows/LoginFlow.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class LoginFlow {
5757

5858
// Follow the magic link to continue login
5959
// Intent is invoked directly rather than through a browser as WireMock is unavailable once in the background
60-
val appVariant = BuildConfig.FLAVOR_app
60+
val appVariant = BuildConfig.FLAVOR
6161
val intent =
6262
Intent(Intent.ACTION_VIEW, Uri.parse("$appVariant://magic-login?token=valid_token"))
6363
.setPackage(ApplicationProvider.getApplicationContext<Context>().packageName)

0 commit comments

Comments
 (0)