Android plugin to publish bundles and apks to Firebase App Distribution with changelogs

Overview

build-publish-plugin

A configurable plugin to generate changelogs from tags and publish results into Firebase App Distribution and send changelog to Telegram or/and Slack (on your choice)

Plugin will create full set gradle tasks and preconfigure versionName and versionCode according to last tag. Tags should be in format v<minor_version>.<major_version>.<version_code>-<build_type>, for example v1.0.666-debug or v1.0.666-release or something else

There will be some different tasks for all build types and flavors. But the main ones are:

  1. processBuildPublish<build_type> (for example, processBuildPublishDebug) - prepare changelog between 2 last tags, send apk to Firebase App Distribution and send changelog into Slack and/or Telegram (if configured)
  2. sendChangelog<build_type> (for example, sendChangelogDebug) - just prepare changelog between 2 last tags and send it into Slack and/or Telegram (if configured)

How apply

Using the plugins DSL:

   plugins {
        id "ru.kode.android.build-publish" version "1.0.0"
   }

Using legacy plugin application:

   buildscript {
      repositories {
         maven {
            url "https://plugins.gradle.org/m2/"
         }
      }
      dependencies {
        classpath "ru.kode.android:build-publish:1.0.0"
      }
   }
   apply plugin: "ru.kode.android.build-publish"

Using jar:

   // Add plugin to classpath in the root gradle project
   dependencies {
    //...
    classpath files('plugin/build-publish-plugin-1.0.0.jar')
    //...
   }
    
   // Apply required plugins (com.android.application, com.google.firebase.appdistribution)
   // and this plugin (ru.kode.android.build-publish)
   plugins {
      id("com.android.application")
      id("com.google.firebase.appdistribution")
      id("ru.kode.android.build-publish")
   }

How configure

buildPublish {
    /**
     * Message key to collect interested commits
     * For exmaple: CHANGELOG
     */
    commitMessageKey.set("CHANGELOG")

    /**
     * The path to your service account private key JSON file for Firebase App Distribution
     */
    distributionServiceCredentialsFilePath.set("test-test")
    /**
     * Test groups for app distribution
     *
     * For example: [android-testers]
     */
    distributionTesterGroups.set(setOf("android-testers"))
    /**
     * Artifact type for app distribution (optional)
     * Values: APK, AAB
     */
    distributionArtifactType.set("APK")
    /**
     * Custom app id for Firebase App Distribution to override google-services.json
     */
    distributionAppId.set("ru.kode.test.app")

    /**
     * Application bundle name for changelog
     * For example: example-base-project-android
     */
    baseOutputFileName.set("example-base-project-android")

    /**
     * Address of task tracker
     * For example: "https://jira.example.ru/browse/"
     */
    issueUrlPrefix.set("https://jira.exmaple.ru/browse/")

    /**
     * How task number formatted
     * For example:  "BASE-\\d+"
     */
    issueNumberPattern.set("BASE-\\d+")

    /**
     * Config for Telegram changelog sender
     *
     * For example:
     *  webhook_url: "https://api.telegram.org/%s/sendMessage?chat_id=%s&text=%s&parse_mode=MarkdownV2"
     *  bot_id: "TELEGRAM_BUILD_BOT_ID"
     *  chat_id: "CHAT_ID"
     */
    tgConfig.set(
        mapOf(
            "webhook_url" to "https://api.telegram.org/%s/sendMessage?chat_id=%s&text=%s&parse_mode=MarkdownV2",
            "bot_id" to "TELEGRAM_BUILD_BOT_ID",
            "chat_id" to "CHAT_ID"
        )
    )

    /**
     * List of mentioning users for Telegram, can be empty or null
     * For example: ["@serega", "@valisily"]
     */
    tgUserMentions.set(
        setOf(
            "@ivan",
            "@roman",
            "@serega",
        )
    )

    /**
     * Config for Slack changelog sender
     *
     * For example:
     *  webhook_url: "https://hooks.slack.com/services/111111111/AAAAAAA/DDDDDDD"
     *  icon_url: "https://i.imgur.com/HQTF5FK.png"
     */
    slackConfig.set(
        mapOf(
            "webhook_url" to "https://hooks.slack.com/services/111111111/AAAAAAA/DDDDDDD",
            "icon_url" to "https://i.imgur.com/HQTF5FK.png",
        )
    )

    /**
     * List of mentioning users for Slack, can be empty or null
     * For example: ["@aa", "@bb", "@ccc"]
     */
    slackUserMentions.set(
        setOf(
            "@aa",
            "@bb",
            "@cc"
        )
    )
}

In the output plugin will set versionName and versionCode and create tasks to publish and send changelogs

Comments
  • Replace shell commands with Okhttp and Retrofit

    Replace shell commands with Okhttp and Retrofit

    💡 Describe the solution you'd like

    Now plugin uses shell commands to push changelogs, but it's solution tided to linux, but we want to use this plugin correctly on all operation systems. And port this logic to OkHttp and Retrofit can be good solution.

    🤚 Do you want to develop this feature yourself?

    • [ ] Yes
    • [x] No
    opened by rinekri 2
  • Change logic to send apk to AppCenter

    Change logic to send apk to AppCenter

    Now we use specific parameters to set timeout and requests count, but it's not so well, because apk can be increased time to time and we should update this parameters in code.

    To fix this issue we can calculate timeout and requests count depending on apk size, and make parameters optionals to use it if auto calculation won't work.

    opened by kode-android 2
  • Set custom AppCenter names

    Set custom AppCenter names

    ISSUE: https://github.com/appKODE/build-publish-plugin/issues/13

    🚀 Description

    In AppCenterDistributionConfig added appName property instead of appNamePrefix. Using appName developers can upload builds with different flavors and build types into single AppCenter application

    opened by kabak89 2
  • Set custom AppCenter names

    Set custom AppCenter names

    ⚠ī¸ Is your feature request related to a problem? Please describe

    Now to upload app to AppCenter, we should create apps which correspond to pattern <appNamePrefix>-<variantName>. For example TestProject-debug, TestProject-release.

    It can be useful to add possibility to set custom names for each variant. For example, instead of appNamePrefix we can add appName property. But if appName isn't set we can use <baseFileName>-<variantName>, for example example-base-project-android-debug, example-base-project-android-internal.

    opened by kode-android 1
  • Add ShellExecutor for Windows or replace shell with grgit

    Add ShellExecutor for Windows or replace shell with grgit

    ⚠ī¸ Is your feature request related to a problem? Please describe

    Now we can collect changelog correctly only in Linux or MacOS, because we use shell to collect git diff between tags and search last tag.

    We should add ShellExecutor analog for Windows or replace shell with grgit plugin to support all OS.

    opened by kode-android 1
  • Add flavor dimensions support

    Add flavor dimensions support

    Base on dimension priority(order) generate set of build variants.

    Test results: Without flavors: image

    Flavors without dimension: imageimage

    Flavors in one dimension: imageimage

    Flavors with dimension and without it: imageimage

    Flavors in several dimensions: imageimage

    opened by mattstabs 1
  • 1.1.0 alpha

    1.1.0 alpha

    🚀 Description

    • Replace logic to create tasks
    • Split sendChangelog task to generateChangelog and sendChangelog
    • Replace logic to get changelog from firebase (now its a file)
    • Add worker api for tasks
    • Add logic to send apk to AppCenter
    opened by rinekri 0
  • FIx bug with errors from JIra automation

    FIx bug with errors from JIra automation

    ⚠ī¸ Is your feature request related to a problem? Please describe

    Now we get strange errors from Jira if status isn't correct and in this cases errors can stop ci/cd process. We can change logic to handle errors and, for example, ignore it or translate as not fatal errors.

    opened by kode-android 0
  • Fix logic to attach hypertexts for Telegram

    Fix logic to attach hypertexts for Telegram

    ⚠ī¸ Is your feature request related to a problem? Please describe

    In previous version of Telegram we had text like this

    [TASK-111] Changelog

    Now we have text like this [[TASK-111] (https://jira.com)] Changelog

    Previous version is more correct

    opened by kode-android 1
Owner
KODE
KODE LLC
KODE
⚡ī¸ Firebase plugins for Capacitor. Supports Android, iOS and the web

Capacitor Firebase ⚡ī¸ Firebase plugins for Capacitor. Supports Android, iOS and the web. Maintainers Maintainer GitHub Social Robin Genz robingenz @ro

Robin Genz 179 Dec 30, 2022
gradle-android-scala-plugin adds scala language support to official gradle android plugin

gradle-android-scala-plugin gradle-android-scala-plugin adds scala language support to official gradle android plugin. See also sample projects at htt

saturday06 345 Dec 10, 2022
eventbus-intellij-plugin 3.8 0.0 L1 Java Plugin to navigate between events posted by EventBus.

eventbus-intellij-plugin Plugin to navigate between events posted by EventBus. Post to onEvent and onEvent to Post Install There are two ways. Prefere

Shinnosuke Kugimiya 315 Aug 8, 2022
IntelliJ Idea Astor Plugin is a plugin that integrates Astor in Intellij Idea

IntelliJ Idea Astor Plugin IntelliJ Idea Astor Plugin is a plugin that integrates Astor in Intellij Idea. It communicates with a local/remote program

null 4 Aug 28, 2021
Intellij-platform-plugin-template - IntelliJ Platform Plugin Template

IntelliJ Platform Plugin Template TL;DR: Click the Use this template button and

null 0 Jan 1, 2022
BuildPlots-Plugin - PaperMC-Plugin for build contests written in Kotlin.

BuildPlotsPlugin PaperMC-Plugin for build contests. This is my first time using Kotlin and the first plugin I've written after a long time. It is stil

Lukas Heinzl 0 Jan 1, 2022
K6-intellij-plugin - IntelliJ-based Plugin to run k6 tests locally or in the k6 Cloud from your IntelliJ IDE

IntelliJ-based Plugin to run k6 tests locally or in the k6 Cloud from your Intel

Mikhail Bolotov 8 Jan 2, 2023
Ownership-gradle-plugin - Gradle code ownership verification plugin

Gradle code ownership verification plugin A gradle plugin that will verify owner

null 4 Dec 15, 2022
GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.

Gradle Play Publisher Gradle Play Publisher is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and

null 3.9k Dec 30, 2022
ADB WIFI Android Studio plugin for debug android app over Wi-Fi.

ADB WIFI ADB WIFI Android Studio plugin for debug android app over Wi-Fi. How to install in Android Studio: go to Preferences

Sutachad Wichai 298 Jan 3, 2023
Add a different ribbon to each of your Android app variants using this gradle plugin. Of course, configure it as you will

Easylauncher gradle plugin for Android Modify the launcher icon of each of your app-variants using simple gradle rules. Add ribbons of any color, over

Mikel 960 Dec 18, 2022
A powerful Gradle Plugin to help you demonstrate your android app

English | įŽ€äŊ“中文 sample-gradle-plugin ?? A powerful Gradle Plugin to help you demonstrate your android app. We often write demo applications that contai

Yoo Zhou 12 Nov 5, 2022
A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.

ADB Idea A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development. The following commands are provided: Uninst

Philippe Breault 2k Dec 28, 2022
Maven Plugin for Android Application development and more

ANDROID MAVEN PLUGIN A plugin for Android application development with Apache Maven 3.0.5+ and the Android SDK. Please check out our website for furth

simpligility 1k Jan 4, 2023
Gradle plugin which downloads and manages your Android SDK.

DEPRECATED This plugin is deprecated and is no longer being developed. Tools and dependencies are automatically downloaded using version 2.2.0 of the

Jake Wharton 1.4k Dec 29, 2022
This is an android studio plugin that allows you to creates new color in hex format based on a percentage (0-100) and a base color you specify.

alpha-color Description This is an android studio plugin that allows you to creates new color in hex format based on a percentage (0-100) and a base c

null 1 Nov 12, 2021
🌏 Android/IDEA localization plugin. supports multiple languages and multiple translators.

English | įŽ€äŊ“中文 AndroidLocalizePlugin ?? Android/IDEA localization plugin. supports multiple languages and multiple translators. Features Multiple tran

Airsaid 465 Dec 28, 2022
IntelliJ plugin that provides a modern and powerful byte code analyzer tool window.

IntelliJ Byte Code Analyzer Plugin This IntelliJ plugin provides a modern and powerful byte code analyzer tool window. Its supports Java, Kotlin, Groo

Marcel Kliemannel 29 Nov 9, 2022