From 02bfb3466547e8a931b44b401c1d789efd893ce0 Mon Sep 17 00:00:00 2001 From: Grishka Date: Thu, 29 Feb 2024 10:04:15 +0300 Subject: [PATCH 01/12] Android Gradle Plugin can't JUST WORK, can it?! --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- mastodon/build.gradle | 2 ++ .../joinmastodon/android/fragments/HomeFragment.java | 10 +++++----- .../android/fragments/ProfileAboutFragment.java | 2 +- .../android/fragments/ProfileFragment.java | 2 +- .../android/fragments/discover/DiscoverFragment.java | 4 ++-- .../fragments/discover/SearchQueryFragment.java | 2 +- .../android/ui/photoviewer/PhotoViewerInfoSheet.java | 2 +- .../ui/viewcontrollers/DropdownSubmenuController.java | 2 +- .../android/ui/views/ReorderableLinearLayout.java | 2 +- 11 files changed, 17 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index c4715843..1f5a65bd 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:7.4.2" + classpath "com.android.tools.build:gradle:8.2.2" classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e9cd6f21..adb8ebf8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sat Jun 03 23:40:27 MSK 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/mastodon/build.gradle b/mastodon/build.gradle index 4939669e..755a67d9 100644 --- a/mastodon/build.gradle +++ b/mastodon/build.gradle @@ -66,6 +66,7 @@ android { } buildFeatures{ aidl true + buildConfig true } dependenciesInfo{ // Disables dependency metadata when building APKs. @@ -73,6 +74,7 @@ android { // Disables dependency metadata when building Android App Bundles. includeInBundle false } + namespace 'org.joinmastodon.android' } dependencies { diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java index ed01e888..f40283f0 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java @@ -112,7 +112,7 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene content.setOrientation(LinearLayout.VERTICAL); FrameLayout fragmentContainer=new FrameLayout(getActivity()); - fragmentContainer.setId(R.id.fragment_wrap); + fragmentContainer.setId(me.grishka.appkit.R.id.fragment_wrap); content.addView(fragmentContainer, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0, 1f)); inflater.inflate(R.layout.tab_bar, content); @@ -131,10 +131,10 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene if(savedInstanceState==null){ getChildFragmentManager().beginTransaction() - .add(R.id.fragment_wrap, homeTimelineFragment) - .add(R.id.fragment_wrap, searchFragment).hide(searchFragment) - .add(R.id.fragment_wrap, notificationsFragment).hide(notificationsFragment) - .add(R.id.fragment_wrap, profileFragment).hide(profileFragment) + .add(me.grishka.appkit.R.id.fragment_wrap, homeTimelineFragment) + .add(me.grishka.appkit.R.id.fragment_wrap, searchFragment).hide(searchFragment) + .add(me.grishka.appkit.R.id.fragment_wrap, notificationsFragment).hide(notificationsFragment) + .add(me.grishka.appkit.R.id.fragment_wrap, profileFragment).hide(profileFragment) .commit(); String defaultTab=getArguments().getString("tab"); diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileAboutFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileAboutFragment.java index 061e981c..a5678804 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileAboutFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileAboutFragment.java @@ -310,7 +310,7 @@ public class ProfileAboutFragment extends Fragment implements WindowInsetsAwareF public void onSelectedChanged(@Nullable RecyclerView.ViewHolder viewHolder, int actionState){ super.onSelectedChanged(viewHolder, actionState); if(actionState==ItemTouchHelper.ACTION_STATE_DRAG){ - viewHolder.itemView.setTag(R.id.item_touch_helper_previous_elevation, viewHolder.itemView.getElevation()); // prevents the default behavior of changing elevation in onDraw() + viewHolder.itemView.setTag(me.grishka.appkit.R.id.item_touch_helper_previous_elevation, viewHolder.itemView.getElevation()); // prevents the default behavior of changing elevation in onDraw() viewHolder.itemView.animate().translationZ(V.dp(1)).setDuration(200).setInterpolator(CubicBezierInterpolator.DEFAULT).start(); } } diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java index 3d68461d..700548b3 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -930,7 +930,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList Toolbar toolbar=getToolbar(); if(canGoBack()){ - Drawable back=getToolbarContext().getDrawable(R.drawable.ic_arrow_back).mutate(); + Drawable back=getToolbarContext().getDrawable(me.grishka.appkit.R.drawable.ic_arrow_back).mutate(); back.setTint(UiUtils.getThemeColor(getToolbarContext(), R.attr.colorM3OnSurfaceVariant)); toolbar.setNavigationIcon(back); toolbar.setNavigationContentDescription(0); diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverFragment.java index cb53a04e..a1934c14 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverFragment.java @@ -180,7 +180,7 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop, searchBack.setImportantForAccessibility(searchActive ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO); searchBack.setOnClickListener(v->exitSearch()); if(searchActive){ - searchBack.setImageResource(R.drawable.ic_arrow_back); + searchBack.setImageResource(me.grishka.appkit.R.drawable.ic_arrow_back); pager.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE); searchView.setVisibility(View.VISIBLE); @@ -228,7 +228,7 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop, pager.setVisibility(View.GONE); tabLayout.setVisibility(View.GONE); searchView.setVisibility(View.VISIBLE); - searchBack.setImageResource(R.drawable.ic_arrow_back); + searchBack.setImageResource(me.grishka.appkit.R.drawable.ic_arrow_back); searchBack.setEnabled(true); searchBack.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); tabsDivider.setVisibility(View.GONE); diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchQueryFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchQueryFragment.java index 2712ee97..3ff7fc79 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchQueryFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/SearchQueryFragment.java @@ -166,7 +166,7 @@ public class SearchQueryFragment extends MastodonRecyclerFragmentdropdownController.popSubmenuController()); backItem.setAccessibilityDelegate(new View.AccessibilityDelegate(){ diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/views/ReorderableLinearLayout.java b/mastodon/src/main/java/org/joinmastodon/android/ui/views/ReorderableLinearLayout.java index 4c071f60..46c33d66 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/views/ReorderableLinearLayout.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/views/ReorderableLinearLayout.java @@ -284,7 +284,7 @@ public class ReorderableLinearLayout extends LinearLayout implements CustomViewH private int getMaxDragScroll(){ if(cachedMaxScrollSpeed==-1){ - cachedMaxScrollSpeed=getResources().getDimensionPixelSize(R.dimen.item_touch_helper_max_drag_scroll_per_frame); + cachedMaxScrollSpeed=getResources().getDimensionPixelSize(me.grishka.appkit.R.dimen.item_touch_helper_max_drag_scroll_per_frame); } return cachedMaxScrollSpeed; } From 3cebc78443421ce2960c2a1d2fb02a0e33cc686e Mon Sep 17 00:00:00 2001 From: Grishka Date: Fri, 1 Mar 2024 08:09:15 +0300 Subject: [PATCH 02/12] Add Fastlane --- Gemfile | 3 +++ fastlane/Appfile | 2 ++ fastlane/Fastfile | 40 ++++++++++++++++++++++++++++++++++++++++ fastlane/README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 Gemfile create mode 100644 fastlane/Appfile create mode 100644 fastlane/Fastfile create mode 100644 fastlane/README.md diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..7a118b49 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "fastlane" diff --git a/fastlane/Appfile b/fastlane/Appfile new file mode 100644 index 00000000..549a499f --- /dev/null +++ b/fastlane/Appfile @@ -0,0 +1,2 @@ +json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one +package_name("org.joinmastodon.android") # e.g. com.krausefx.app diff --git a/fastlane/Fastfile b/fastlane/Fastfile new file mode 100644 index 00000000..61513fcf --- /dev/null +++ b/fastlane/Fastfile @@ -0,0 +1,40 @@ +# This file contains the fastlane.tools configuration +# You can find the documentation at https://docs.fastlane.tools +# +# For a list of all available actions, check out +# +# https://docs.fastlane.tools/actions +# +# For a list of all available plugins, check out +# +# https://docs.fastlane.tools/plugins/available-plugins +# + +# Uncomment the line if you want fastlane to automatically update itself +# update_fastlane + +default_platform(:android) + +platform :android do + desc "Runs all the tests" + lane :test do + gradle(task: "test") + end + + desc "Deploy a new version to the Google Play" + lane :deploy do + gradle( + task: "bundle", + build_type: "release", + properties: { + "android.injected.signing.store.file" => ENV["KEYSTORE_FILE"], + "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"], + "android.injected.signing.key.alias" => "key0", + "android.injected.signing.key.password" => ENV["KEYSTORE_PASSWORD"], + } + ) + upload_to_play_store( + changes_not_sent_for_review: true + ) + end +end diff --git a/fastlane/README.md b/fastlane/README.md new file mode 100644 index 00000000..5649d3a4 --- /dev/null +++ b/fastlane/README.md @@ -0,0 +1,40 @@ +fastlane documentation +---- + +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +```sh +xcode-select --install +``` + +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) + +# Available Actions + +## Android + +### android test + +```sh +[bundle exec] fastlane android test +``` + +Runs all the tests + +### android deploy + +```sh +[bundle exec] fastlane android deploy +``` + +Deploy a new version to the Google Play + +---- + +This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. + +More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). + +The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). From f128556a49eac4fd6f69e2207a4069ebd5f2ce0d Mon Sep 17 00:00:00 2001 From: Grishka Date: Fri, 1 Mar 2024 09:38:31 +0300 Subject: [PATCH 03/12] Add github action --- .github/workflows/build_and_deploy.yml | 56 +++++++++++++++++++ fastlane/Fastfile | 6 -- .../metadata/android/en-US/changelogs/86.txt | 3 + mastodon/ci_signing.gradle | 20 +++++++ 4 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build_and_deploy.yml create mode 100644 fastlane/metadata/android/en-US/changelogs/86.txt create mode 100644 mastodon/ci_signing.gradle diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml new file mode 100644 index 00000000..1697342e --- /dev/null +++ b/.github/workflows/build_and_deploy.yml @@ -0,0 +1,56 @@ +name: Build and deploy + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 21 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.2 + bundler-cache: true + + - name: Decode keystore + uses: timheuer/base64-to-file@v1 + id: android_keystore + with: + fileName: "release.jks" + encodedString: ${{ secrets.KEYSTORE_FILE }} + + - name: Add signing configs to build.gradle + run: echo "apply from: 'ci_signing.gradle'" >> mastodon/build.gradle + + - name: Build and deploy to Google Play + run: bundle exec fastlane deploy + env: + KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }} + KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + SUPPLY_JSON_KEY_DATA: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} + + - name: Build release apk + run: ./gradlew assembleRelease + env: + KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }} + KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + + - name: Build githubRelease apk + run: ./gradlew assembleGithubRelease + env: + KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }} + KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + + - uses: actions/upload-artifact@v4 + with: + path: | + mastodon/build/outputs/apk/*/*.apk + mastodon/build/outputs/mapping/*/mapping.txt \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 61513fcf..0538f8db 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -26,12 +26,6 @@ platform :android do gradle( task: "bundle", build_type: "release", - properties: { - "android.injected.signing.store.file" => ENV["KEYSTORE_FILE"], - "android.injected.signing.store.password" => ENV["KEYSTORE_PASSWORD"], - "android.injected.signing.key.alias" => "key0", - "android.injected.signing.key.password" => ENV["KEYSTORE_PASSWORD"], - } ) upload_to_play_store( changes_not_sent_for_review: true diff --git a/fastlane/metadata/android/en-US/changelogs/86.txt b/fastlane/metadata/android/en-US/changelogs/86.txt new file mode 100644 index 00000000..4be56205 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/86.txt @@ -0,0 +1,3 @@ +- You can now easily share and scan QR codes to quickly find each other +- We've updated the look of the tab bar to better match current platform guidelines +- Various minor usability improvements \ No newline at end of file diff --git a/mastodon/ci_signing.gradle b/mastodon/ci_signing.gradle new file mode 100644 index 00000000..bddf4ff0 --- /dev/null +++ b/mastodon/ci_signing.gradle @@ -0,0 +1,20 @@ +// Included into build.gradle when running in a CI pipeline + +android{ + signingConfigs{ + release{ + keyAlias "key0" + keyPassword System.getenv("KEYSTORE_PASSWORD") + storeFile file(System.getenv("KEYSTORE_FILE")) + storePassword System.getenv("KEYSTORE_PASSWORD") + } + } + buildTypes{ + release{ + signingConfig signingConfigs.release + } + githubRelease{ + signingConfig signingConfigs.release + } + } +} \ No newline at end of file From c242c7ec827c535dcaaa93c08b5d63878947abda Mon Sep 17 00:00:00 2001 From: Grishka Date: Fri, 1 Mar 2024 09:41:36 +0300 Subject: [PATCH 04/12] please work --- .github/workflows/build_and_deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 1697342e..acd74a08 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -28,7 +28,8 @@ jobs: encodedString: ${{ secrets.KEYSTORE_FILE }} - name: Add signing configs to build.gradle - run: echo "apply from: 'ci_signing.gradle'" >> mastodon/build.gradle + run: > + echo "apply from: 'ci_signing.gradle'" >> mastodon/build.gradle - name: Build and deploy to Google Play run: bundle exec fastlane deploy From b30ce8446855391441917dddceea944a0099a712 Mon Sep 17 00:00:00 2001 From: Grishka Date: Fri, 1 Mar 2024 09:48:01 +0300 Subject: [PATCH 05/12] Maybe it will run this time? --- .github/workflows/build_and_deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index acd74a08..9a433ac8 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -1,7 +1,10 @@ name: Build and deploy on: - workflow_dispatch: + push: + branches: + - 'ci_setup' + workflow_dispatch: jobs: deploy: From 11be65c6fe4d762156d66e969f42468b163807ae Mon Sep 17 00:00:00 2001 From: Grishka Date: Fri, 1 Mar 2024 10:23:45 +0300 Subject: [PATCH 06/12] Unsurprisingly, you need Android SDK to build an Android app --- .github/workflows/build_and_deploy.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 9a433ac8..fa765f11 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -23,6 +23,9 @@ jobs: ruby-version: 2.7.2 bundler-cache: true + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + - name: Decode keystore uses: timheuer/base64-to-file@v1 id: android_keystore @@ -53,7 +56,8 @@ jobs: KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }} KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} - - uses: actions/upload-artifact@v4 + - name: Upload artifacts + uses: actions/upload-artifact@v4 with: path: | mastodon/build/outputs/apk/*/*.apk From 19950e511544c529c1ea595f09f604ceb2135963 Mon Sep 17 00:00:00 2001 From: Grishka Date: Fri, 1 Mar 2024 10:29:12 +0300 Subject: [PATCH 07/12] And Gradle needs to know where it is --- .github/workflows/build_and_deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index fa765f11..fe83023a 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -33,9 +33,10 @@ jobs: fileName: "release.jks" encodedString: ${{ secrets.KEYSTORE_FILE }} - - name: Add signing configs to build.gradle + - name: Prepare Gradle environment run: > echo "apply from: 'ci_signing.gradle'" >> mastodon/build.gradle + echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties - name: Build and deploy to Google Play run: bundle exec fastlane deploy From a7b83bc0582985d17c931a97304367c111a53a11 Mon Sep 17 00:00:00 2001 From: Grishka Date: Fri, 1 Mar 2024 10:35:14 +0300 Subject: [PATCH 08/12] Yaml is hard --- .github/workflows/build_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index fe83023a..de3f629e 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -34,7 +34,7 @@ jobs: encodedString: ${{ secrets.KEYSTORE_FILE }} - name: Prepare Gradle environment - run: > + run: | echo "apply from: 'ci_signing.gradle'" >> mastodon/build.gradle echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties From 11bda2fe07ff4d5b03e443287efde9bf88f13b3d Mon Sep 17 00:00:00 2001 From: Grishka Date: Fri, 1 Mar 2024 10:43:48 +0300 Subject: [PATCH 09/12] Skip metadata for now --- .github/workflows/build_and_deploy.yml | 2 ++ fastlane/Fastfile | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index de3f629e..8a6e7d2d 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -44,6 +44,8 @@ jobs: KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }} KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} SUPPLY_JSON_KEY_DATA: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} + SUPPLY_VALIDATE_ONLY: true + SUPPLY_SKIP_UPLOAD_METADATA: true - name: Build release apk run: ./gradlew assembleRelease diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0538f8db..9cbe7f69 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -28,7 +28,9 @@ platform :android do build_type: "release", ) upload_to_play_store( - changes_not_sent_for_review: true + changes_not_sent_for_review: true, + skip_upload_images: true, + skip_upload_screenshots: true ) end end From bcdce2a8802e405a14744ba873dd828d323d4f93 Mon Sep 17 00:00:00 2001 From: Grishka Date: Sat, 2 Mar 2024 01:16:32 +0300 Subject: [PATCH 10/12] Skip changelogs too (fastlane/fastlane#21905) --- .github/workflows/build_and_deploy.yml | 1 + .gitignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 8a6e7d2d..b1976381 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -46,6 +46,7 @@ jobs: SUPPLY_JSON_KEY_DATA: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} SUPPLY_VALIDATE_ONLY: true SUPPLY_SKIP_UPLOAD_METADATA: true + SUPPLY_SKIP_UPLOAD_CHANGELOGS: true - name: Build release apk run: ./gradlew assembleRelease diff --git a/.gitignore b/.gitignore index 593af090..151ef3a2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ .cxx local.properties *.jks +/fastlane/report.xml From e892eaa3d522b49b4a3d2b45cdad4fde35e2c371 Mon Sep 17 00:00:00 2001 From: Grishka Date: Sat, 2 Mar 2024 01:28:53 +0300 Subject: [PATCH 11/12] Update action versions & separate artifacts --- .github/workflows/build_and_deploy.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index b1976381..e6946b88 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -10,10 +10,10 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: java-version: 21 @@ -54,15 +54,26 @@ jobs: KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }} KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + - name: Upload release apk + uses: actions/upload-artifact@v4 + with: + name: mastodon-release.apk + path: mastodon/build/outputs/apk/release/mastodon-release.apk + - name: Build githubRelease apk run: ./gradlew assembleGithubRelease env: KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }} KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} - - name: Upload artifacts + - name: Upload githubRelease apk uses: actions/upload-artifact@v4 with: - path: | - mastodon/build/outputs/apk/*/*.apk - mastodon/build/outputs/mapping/*/mapping.txt \ No newline at end of file + name: mastodon-githubRelease.apk + path: mastodon/build/outputs/apk/githubRelease/mastodon-githubRelease.apk + + - name: Upload mappings + uses: actions/upload-artifact@v4 + with: + name: mappings + path: mastodon/build/outputs/mapping/*/mapping.txt \ No newline at end of file From 0cc55891c1c7925872aee860eb8f00ae4ba50295 Mon Sep 17 00:00:00 2001 From: Grishka Date: Sat, 2 Mar 2024 01:30:12 +0300 Subject: [PATCH 12/12] Specify Java distribution --- .github/workflows/build_and_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index e6946b88..d9be5dcd 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -16,6 +16,7 @@ jobs: uses: actions/setup-java@v2 with: java-version: 21 + distribution: temurin - name: Set up Ruby uses: ruby/setup-ruby@v1