appkode / build-publish-plugin Goto Github PK
View Code? Open in Web Editor NEWAndroid plugin to publish bundles and apks to Firebase App Distribution with changelogs
License: MIT License
Android plugin to publish bundles and apks to Firebase App Distribution with changelogs
License: MIT License
I have these tags:
v1.0.1-internal
v1.0.2-internal
...
v1.0.8-internal
v1.0.9-internal
v1.0.10-internal
And the build for v1.0.10-internal
tag results in the changelog between v1.0.8-internal
and v1.0.9-internal
tags, and version code of the resulting apk is 9
which is incorrect too.
This happens because tags are not sorted by the build number and are used as is from git:
and git produces them like this:
v1.0.1-internal
v1.0.10-internal
v1.0.2-internal
...
v1.0.7-internal
v1.0.8-internal
v1.0.9-internal
Solution:
Insert a code to sort tags by build number which can be obtained by using this regex: ".+\.(\d+)-${variant}"
gradle plugin: 1.7.4
gradle: 7.5
kotlin: 1.8.10
Now we can configure only one Telegram and Slack channel, but it would be useful to extend logic to support list.
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.
Some tasks can be successful executed, but they haven't any necessary valid outputs. For example, one of the basis task, which must generate tag-build-<build_name>.json. It doesn't just do it sometimes (f.e., in case of invalid tag names or empty changelog) and doesn't print any warning and reason.
Gradle provides api for end-to-end testing. I propose to add and use it.
https://docs.gradle.org/current/userguide/test_kit.html#test_kit
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.
For example,
if we add tags:
v1.0.0-release
v1.0.1-release
v1.0.1-release-androidAuto
Then last tag v1.0.0-release-androidAuto will generate wrong changelog and get wrong versionCode/versionName from tag v1.0.0-release
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.
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
.
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
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.
Library version:
ru.kode.android:build-publish:1.1.0-alpha14
Example of a message:
CHANGELOG: [TBIG-1195] [authorization] Add "invalid_user_credentials" processing error
Steps to reproduce:
Add a tag to gitlab to start the build.
Actual result:
A label with the build number is not added to the Jira task with number "TBIG-1195".
Expected result:
A label with the build number is added to the Jira task with number "TBIG-1195".
If the second pair of square quotes is removed, then a label with the build number is added to the Jira task.
CHANGELOG: [TBIG-1195] authorization Add "invalid_user_credentials" processing error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.