The text below contains Avito specific details
We publish releases to Maven Central: com.avito.android.
Publishing a new release#
- Check if diff against the last release contains any changes for users. If not, then probably there are no reasons to make a release.
- Check the current status of Nightly Avito integration build.
If it is
Failedyou could release from previous
Succeedcommits or fix problems.
- Checkout a
release branchwith a name equals to
projectVersion. For example,
This branch must be persistent. It is used for automation.
- Manually run Integration build on the
- Manually run Github publish configuration on the
release branch. It will upload artifacts to a staging repository in Sonatype. So you can upload it in advance at any previous step and drop in case of problems.
- Release staging repository
- Make a PR to an internal avito repository with the new version of infrastructure.
- Checkout a new branch and make a PR to github repository:
infraVersionproperty in the
./gradle.propertiesto the new version
- Bump up a
projectVersionproperty in the
./gradle.propertiesto the next version
- Publish a release in Github:
You need to have the
make draft_release version=<current release version> prev_version=<last release version>
See also more details about Managing releases in a repository.
Getting access to Sonatype#
- Create an account
- Create an issue referencing original one, asking for
- Wait for confirmation
- Login to nexus to validate staging profile access
Some additional info:
Making a release in Sonatype#
We publish a release through a temporary staging repository. If something goes wrong you can drop the repository to cancel the publication process.
- Open Staging repositories In a Content tab you can see uploaded artifacts.
- Close the repository:
You don’t need to provide a description here. In an Activity tab you can track progress.
- Release the repository. It will publish the contents to Maven Central
- Wait till new packages appear on Maven Central. It takes usually about 15-30 min. You can see them earlier in a repository manager or in public search before all of them will be available for download.
Some additional info:
Can't find an artifact in an internal Artifactory#
How it looks:
- Maven central has expected artifacts: pom, jar/aar, sources.jar
- Gradle can't find it in Artifactory Proxy
> Could not resolve all artifacts for configuration ':classpath'. > Could not find com.avito.android:runner-shared:2020.16. Searched in the following locations: - file:/home/user/.m2/repository/ - http://<artifactory>/
- The file is not downloaded by Artifactory yet.
Such files look in web UI like empty references:
runner-shared-2020.16.jar-> - - - -(empty size)
- When you use a partially uploaded release, Artifactory might cache the wrong state. It seems that Artifactory caches it for some time, but we don't know exactly and how to invalidate it.
- Download this file manually in the browser or CLI.
If the file downloaded successfully, refresh a local cache via
- If it didn't help, bump up a minor release version and make a new release.
Local integration tests against Avito#
make publish_to_maven_localin github repository.
- Run integration tests of your choice in avito with specified test version
Run from Avito project directory
./gradlew <task> -Pavito.useCompositeBuild=true -Pavito.compositeBuildPath=<avito-android-infra/subprojects dir on your local machine>
CI integration tests against Avito#
- Choose configuration from existed
- Run build.
If you need to test unmerged code, select a custom build branch.
You will see branches from both repositories:
- By default, build uses develop from github against develop from avito
- If you pick a branch from avito, it will run against develop on github
- If you pick a branch from github, it will run against develop on avito
- To build both projects of special branch, they should have the same name
CI integration configurations#
- fast check configuration (internal) - pull request's builds
- integration check - currently, contains the biggest amount of integration checks
- nightly integration check - the same as
integration checkbut uses more Android emulators
- Gradle configuration compatibility check - checks the configuration compatibility of our Gradle plugins with Avito repo