wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.99k stars 1.33k forks source link

Introduce `secrets.properties`. Use `gradle.properties` only for build configuration. #21442

Closed wzieba closed 1 week ago

wzieba commented 1 week ago

Description

This PR introduces a split of gradle.properties into two files: secrets.properties to contain only sensitive data and gradle.properties to contain only build configuration. More details internally: pbArwn-6R4-p2


dependency-tree-diff step won't succeed because we changed the build steps comparing to trunk (removed copying gradle.properties-example)

To Test:

Signing configuration

  1. Checkout trunk and setup all secrets bundle exec fastlane run configure_apply.
  2. Run :WordPress:signingReport task, copy the content
  3. Checkout this branch, run :WordPress:signingReport again
  4. Compare outputs of both executions. They should be the same.

App secrets

Open generated BuildConfig.kt file. Make sure it contains valid secrets. You can compare content of BuildConfig.kt from build from trunk, but be aware they'll be different: unused secrets have been removed from mobile secrets.

Measure builds

Apply secrets bundle exec fastlane run configure_apply and assert, that at the end of the task Build time report of Xm Ys has been received by Apps Metrics. is printed to the console.

wpmobilebot commented 1 week ago
WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21442-f366ab5
Commitf366ab563c0a72d376fd340c143ed73bdef35f3e
Direct Downloadwordpress-prototype-build-pr21442-f366ab5.apk
Note: Google Login is not supported on these builds.
wpmobilebot commented 1 week ago
Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21442-f366ab5
Commitf366ab563c0a72d376fd340c143ed73bdef35f3e
Direct Downloadjetpack-prototype-build-pr21442-f366ab5.apk
Note: Google Login is not supported on these builds.
wzieba commented 1 week ago

Thanks for the review @ParaskP7 ! I applied your suggestions. During the work, I also realized that measureBuilds stopped working, so I made some improvements in last commits (654b6b4, f21f8d9) to make it work again. I've also added another test case in PR description.

ParaskP7 commented 1 week ago

Thanks for the review @ParaskP7 ! I applied your suggestions. During the work, I also realized that measureBuilds stopped working, so I made some improvements in last commits (https://github.com/wordpress-mobile/WordPress-Android/commit/654b6b461539084675870814e075bc63351da14d, https://github.com/wordpress-mobile/WordPress-Android/commit/f21f8d9c4f5fee404b389885ed70cd4e560581cc) to make it work again. I've also added another test case in PR description.

Awesome, thanks @wzieba , I am currently on it, taking another look at and testing your changes! 🥇

dangermattic commented 1 week ago
2 Warnings
:warning: This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
:warning: This PR is assigned to the milestone 25.8. This milestone is due in less than 4 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by :no_entry_sign: Danger

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud