Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add channel flavor for publishing variant for Google Play #3861

Merged
merged 13 commits into from
Dec 18, 2023

Conversation

Goooler
Copy link
Collaborator

@Goooler Goooler commented Dec 16, 2023

Description

Type of change

✅ General change (non-breaking change that doesn't fit the below categories like copyediting)
❌ Bug fix (non-breaking change which fixes an issue)
❌ New feature (non-breaking change which adds functionality)
❌ Breaking change (fix or feature that would cause existing functionality to not work as expected)

@Goooler Goooler force-pushed the add-google-play-flavor branch from 5fef223 to edb1034 Compare December 16, 2023 08:27
@SuperDragonXD
Copy link
Collaborator

I wouldn't recommend removing unused variants, because it might make rebasing Launcher3 more difficult.

Also, changing the CI to use a different app package name is probably not the best idea. For release update, I'd recommend building both foss and market build types.

@Goooler
Copy link
Collaborator Author

Goooler commented Dec 16, 2023

I wouldn't recommend removing unused variants, because it might make rebasing Launcher3 more difficult.

Still need to rename some of them if we don't remove them, there are still some conflicts.

Sure, we can build both of them on CI.

@Goooler Goooler changed the title Add google play flavor Add channel flavor for publishing variant for Google Play Dec 16, 2023
@yasanglass
Copy link
Member

Other than what @SuperDragonXD said, I dong think Foss and market are proper names for these. The app is Foss no matter where it's published. The new variant is just for playstore specifically and the only other place we publish is GitHub.

Maybe it should just be play store and git flavors.

@Goooler
Copy link
Collaborator Author

Goooler commented Dec 16, 2023

I see it was published at F-Droid, so just call it market.

@yasanglass
Copy link
Member

I think the market name is okay but the foss one can cause confusion. Maybe it can just be named git or github.

@yasanglass yasanglass requested a review from suphon-t December 16, 2023 21:22
Copy link
Collaborator

@SuperDragonXD SuperDragonXD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also use default as well.

@Goooler Goooler changed the base branch from 13-dev to 14-dev December 17, 2023 11:07
@Goooler
Copy link
Collaborator Author

Goooler commented Dec 17, 2023

OLD: Lawnchair 14 Dev (faa5bdd) github release.apk (signature: V2)
NEW: Lawnchair 14 Dev (faa5bdd) market release.apk (signature: V2)

          │           compressed           │          uncompressed
          ├───────────┬───────────┬────────┼───────────┬───────────┬────────
 APK      │ old       │ new       │ diff   │ old       │ new       │ diff
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
      dex │   5.7 MiB │   5.7 MiB │ -165 B │  14.2 MiB │  14.2 MiB │ +316 B
     arsc │   4.4 MiB │   4.4 MiB │    0 B │   4.4 MiB │   4.4 MiB │    0 B
 manifest │   5.8 KiB │   5.9 KiB │  +34 B │  26.2 KiB │  26.5 KiB │ +384 B
      res │   2.6 MiB │   2.6 MiB │   -4 B │   7.6 MiB │   7.6 MiB │    0 B
   native │ 998.4 KiB │ 998.8 KiB │ +338 B │ 980.4 KiB │ 980.4 KiB │    0 B
    asset │  25.2 KiB │  25.2 KiB │   -6 B │ 152.8 KiB │ 152.7 KiB │   -2 B
    other │     933 B │     933 B │    0 B │     690 B │     690 B │    0 B
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
    total │  13.8 MiB │  13.8 MiB │ +197 B │  27.4 MiB │  27.4 MiB │ +698 B


         │          raw           │            unique
         ├────────┬────────┬──────┼────────┬────────┬─────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff
─────────┼────────┼────────┼──────┼────────┼────────┼─────────────
   files │      2 │      2 │    0 │        │        │
 strings │  92166 │  92167 │   +1 │  82629 │  82629 │ 0 (+20 -20)
   types │  22932 │  22932 │    0 │  20985 │  20985 │ 0 (+0 -0)
 classes │  18849 │  18849 │    0 │  18849 │  18849 │ 0 (+0 -0)
 methods │ 127951 │ 127951 │    0 │ 121643 │ 121643 │ 0 (+4 -4)
  fields │  66694 │  66694 │    0 │  64859 │  64859 │ 0 (+0 -0)


 ARSC    │ old  │ new  │ diff
─────────┼──────┼──────┼──────
 configs │  368 │  368 │  0
 entries │ 9114 │ 9114 │  0


=================
====   APK   ====
=================

     compressed     │    uncompressed    │
───────────┬────────┼───────────┬────────┤
 size      │ diff   │ size      │ diff   │ path
───────────┼────────┼───────────┼────────┼────────────────────────────────
 280.3 KiB │ +338 B │ 274.3 KiB │    0 B │ ∆ lib/arm64-v8a/libnrb.so
   2.7 MiB │  -92 B │   6.8 MiB │  +64 B │ ∆ classes2.dex
     3 MiB │  -73 B │   7.3 MiB │ +252 B │ ∆ classes.dex
   5.9 KiB │  +34 B │  26.5 KiB │ +384 B │ ∆ AndroidManifest.xml
     976 B │   -4 B │     844 B │    0 B │ ∆ assets/dexopt/baseline.profm
     454 B │   -4 B │     358 B │    0 B │ ∆ res/-9.png
   9.5 KiB │   -2 B │   9.3 KiB │   -2 B │ ∆ assets/dexopt/baseline.prof
───────────┼────────┼───────────┼────────┼────────────────────────────────
     6 MiB │ +197 B │  14.5 MiB │ +698 B │ (total)



======================
====   MANIFEST   ====
======================

              │ old              │ new
──────────────┼──────────────────┼───────────────────────────────
 package      │ app.lawnchair    │ ch.deletescape.lawnchair.plah
 version code │ 13               │ 13
 version name │ 14 Dev (faa5bdd) │ 14 Dev (faa5bdd)


@@ -5,3 +5,3 @@
     android:versionName="14 Dev (faa5bdd)"
-    package="app.lawnchair"
+    package="ch.deletescape.lawnchair.plah"
     platformBuildVersionCode="34"
@@ -132,9 +132,9 @@
   <uses-permission
-      android:name="app.lawnchair.permission.READ_SETTINGS"
+      android:name="ch.deletescape.lawnchair.plah.permission.READ_SETTINGS"
       />
   <uses-permission
-      android:name="app.lawnchair.permission.WRITE_SETTINGS"
+      android:name="ch.deletescape.lawnchair.plah.permission.WRITE_SETTINGS"
       />
   <permission
-      android:name="app.lawnchair.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
+      android:name="ch.deletescape.lawnchair.plah.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
       android:protectionLevel="0x2"
@@ -142,3 +142,3 @@
   <uses-permission
-      android:name="app.lawnchair.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
+      android:name="ch.deletescape.lawnchair.plah.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
       />
@@ -199,3 +199,3 @@
           android:name="com.android.launcher3.grid.control"
-          android:value="app.lawnchair.grid_control"
+          android:value="ch.deletescape.lawnchair.plah.grid_control"
           />
@@ -264,3 +264,3 @@
     <provider
-        android:authorities="app.lawnchair.fileprovider"
+        android:authorities="ch.deletescape.lawnchair.plah.fileprovider"
         android:exported="false"
@@ -286,9 +286,9 @@
         <action
-            android:name="app.lawnchair.bugreport.COPY"
+            android:name="ch.deletescape.lawnchair.plah.bugreport.COPY"
             />
         <action
-            android:name="app.lawnchair.bugreport.UPLOAD"
+            android:name="ch.deletescape.lawnchair.plah.bugreport.UPLOAD"
             />
         <action
-            android:name="app.lawnchair.bugreport.UPLOAD_COMPLETE"
+            android:name="ch.deletescape.lawnchair.plah.bugreport.UPLOAD_COMPLETE"
             />
@@ -350,3 +350,3 @@
     <provider
-        android:authorities="app.lawnchair"
+        android:authorities="ch.deletescape.lawnchair.plah"
         android:exported="true"
@@ -364,3 +364,3 @@
     <provider
-        android:authorities="app.lawnchair.overview.fileprovider"
+        android:authorities="ch.deletescape.lawnchair.plah.overview.fileprovider"
         android:exported="false"
@@ -469,10 +469,10 @@
     <provider
-        android:authorities="app.lawnchair.settings"
+        android:authorities="ch.deletescape.lawnchair.plah.settings"
         android:exported="true"
         android:name="com.android.launcher3.LauncherProvider"
-        android:readPermission="app.lawnchair.permission.READ_SETTINGS"
-        android:writePermission="app.lawnchair.permission.WRITE_SETTINGS"
+        android:readPermission="ch.deletescape.lawnchair.plah.permission.READ_SETTINGS"
+        android:writePermission="ch.deletescape.lawnchair.plah.permission.WRITE_SETTINGS"
         />
     <provider
-        android:authorities="app.lawnchair.grid_control"
+        android:authorities="ch.deletescape.lawnchair.plah.grid_control"
         android:exported="true"
@@ -499,3 +499,3 @@
     <provider
-        android:authorities="app.lawnchair.TestInfo"
+        android:authorities="ch.deletescape.lawnchair.plah.TestInfo"
         android:enabled="false"



=================
====   DEX   ====
=================

STRINGS:

   old   │ new   │ diff
  ───────┼───────┼─────────────
   82629 │ 82629 │ 0 (+20 -20)

  + cancelAnimations$lawnchair_lawnWithQuickstepMarketRelease
  + cancelInternal$lawnchair_lawnWithQuickstepMarketRelease(Ljava/util/Set;)V
  + ch.deletescape.lawnchair.plah
  + ch.deletescape.lawnchair.plah.BugReport
  + ch.deletescape.lawnchair.plah.bugreport.COPY
  + ch.deletescape.lawnchair.plah.bugreport.UPLOAD
  + ch.deletescape.lawnchair.plah.bugreport.UPLOAD_COMPLETE
  + ch.deletescape.lawnchair.plah.crashes
  + ch.deletescape.lawnchair.plah.fileprovider
  + ch.deletescape.lawnchair.plah.settings
  + ch.deletescape.lawnchair.plah.status
  + getAccessibilityService$lawnchair_lawnWithQuickstepMarketRelease
  + lawnWithQuickstepMarket
  + setAccessibilityService$lawnchair_lawnWithQuickstepMarketRelease
  + startInternal$lawnchair_lawnWithQuickstepMarketRelease()V
  + updateTargetViews$lawnchair_lawnWithQuickstepMarketRelease
  + ~~R8{"backend":"dex","compilation-mode":"release","desugared-library-identifiers":["com.tools.android:desugar_jdk_libs_configuration:2.0.4"],"has-checksums":false,"min-api":26,"pg-map-id":"6859410","r8-mode":"full","version":"8.2.33"}
  + Disabling ch.deletescape.lawnchair.plah, unable to run in a managed profile
  + ch.deletescape.lawnchair.plah.overview.fileprovider
  + ch.deletescape.lawnchair.plahImageActionsApi

  - app.lawnchair
  - app.lawnchair.BugReport
  - app.lawnchair.bugreport.COPY
  - app.lawnchair.bugreport.UPLOAD
  - app.lawnchair.bugreport.UPLOAD_COMPLETE
  - app.lawnchair.crashes
  - app.lawnchair.fileprovider
  - app.lawnchair.settings
  - app.lawnchair.status
  - cancelAnimations$lawnchair_lawnWithQuickstepGithubRelease
  - cancelInternal$lawnchair_lawnWithQuickstepGithubRelease(Ljava/util/Set;)V
  - getAccessibilityService$lawnchair_lawnWithQuickstepGithubRelease
  - lawnWithQuickstepGithub
  - setAccessibilityService$lawnchair_lawnWithQuickstepGithubRelease
  - startInternal$lawnchair_lawnWithQuickstepGithubRelease()V
  - updateTargetViews$lawnchair_lawnWithQuickstepGithubRelease
  - ~~R8{"backend":"dex","compilation-mode":"release","desugared-library-identifiers":["com.tools.android:desugar_jdk_libs_configuration:2.0.4"],"has-checksums":false,"min-api":26,"pg-map-id":"3bf3848","r8-mode":"full","version":"8.2.33"}
  - Disabling app.lawnchair, unable to run in a managed profile
  - app.lawnchair.overview.fileprovider
  - app.lawnchairImageActionsApi


METHODS:

   old    │ new    │ diff
  ────────┼────────┼───────────
   121643 │ 121643 │ 0 (+4 -4)

  + app.lawnchair.LawnchairApp getAccessibilityService$lawnchair_lawnWithQuickstepMarketRelease() → LawnchairAccessibilityService
  + app.lawnchair.LawnchairApp setAccessibilityService$lawnchair_lawnWithQuickstepMarketRelease(LawnchairAccessibilityService)
  + c5.a cancelAnimations$lawnchair_lawnWithQuickstepMarketRelease()
  + c5.a updateTargetViews$lawnchair_lawnWithQuickstepMarketRelease()

  - app.lawnchair.LawnchairApp getAccessibilityService$lawnchair_lawnWithQuickstepGithubRelease() → LawnchairAccessibilityService
  - app.lawnchair.LawnchairApp setAccessibilityService$lawnchair_lawnWithQuickstepGithubRelease(LawnchairAccessibilityService)
  - c5.a cancelAnimations$lawnchair_lawnWithQuickstepGithubRelease()
  - c5.a updateTargetViews$lawnchair_lawnWithQuickstepGithubRelease()

@Goooler
Copy link
Collaborator Author

Goooler commented Dec 17, 2023

@SuperDragonXD And we need to update the python script, it's your show time.

@SuperDragonXD
Copy link
Collaborator

Done. Should just work now.

@Goooler
Copy link
Collaborator Author

Goooler commented Dec 17, 2023

Traceback (most recent call last):
  File "/home/runner/work/lawnchair/lawnchair/ci.py", line 74, in <module>
    send_internal_notifications()
  File "/home/runner/work/lawnchair/lawnchair/ci.py", line 64, in send_internal_notifications
    send_artifact_to_telegram_chat(chat_id=telegram_ci_channel_id)
  File "/home/runner/work/lawnchair/lawnchair/ci.py", line 42, in send_artifact_to_telegram_chat
    with open(f"{full_path}/{os.listdir(full_path)[0]}", "rb") as artifact:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IsADirectoryError: [Errno [21](https://github.com/LawnchairLauncher/lawnchair/actions/runs/7238929319/job/19720305670?pr=3861#step:6:22)] Is a directory: 'artifacts/debug-apk/lawnWithQuickstepGithub/debug'

@SuperDragonXD
Copy link
Collaborator

Actually fixed it now.

@Goooler
Copy link
Collaborator Author

Goooler commented Dec 17, 2023

Good to merge?

Copy link
Collaborator

@SuperDragonXD SuperDragonXD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me, although you should probably wait for other reviews to see if they have more suggestions.

Copy link
Member

@yasanglass yasanglass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but I am not sure if it's okay to remove those flavors or not, I have never used them myself. @suphon-t probably knows more about their use.

@Goooler
Copy link
Collaborator Author

Goooler commented Dec 18, 2023

Fixin authority in d506f23, cause

adb install Lawnchair\ 14\ Dev\ \(\#143\)\ market\ debug.apk
Performing Streamed Install
adb: failed to install Lawnchair 14 Dev (#143) market debug.apk: Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Scanning Failed.: Can't install because provider name app.lawnchair.search.LawnchairRecentSuggestionProvider (in package ch.deletescape.lawnchair.plah.debug) is already used by app.lawnchair]

@Goooler Goooler merged commit c2d59a6 into 14-dev Dec 18, 2023
4 checks passed
@Goooler Goooler deleted the add-google-play-flavor branch December 18, 2023 03:33
nulldrf added a commit to nulldrf/lawnchair that referenced this pull request Dec 19, 2023
nulldrf added a commit to nulldrf/lawnchair that referenced this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants