Skip to content

Commit

Permalink
Merge pull request #12 from cianru/snapshot-0.5.0
Browse files Browse the repository at this point in the history
Snapshot 0.5.0
  • Loading branch information
cosic authored Sep 13, 2024
2 parents 08e836a + fe0f99c commit 29e805f
Show file tree
Hide file tree
Showing 39 changed files with 1,445 additions and 461 deletions.
983 changes: 983 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
# 0.5.0

##### Add
* [issue#9](https://github.com/cianru/rustore-publish-gradle-plugin/issues/9) Support of AAB files. Now you can publish AAB files to Rustore.
Just use a new parameter `buildFormat` in your configuration:
```kotlin
configure<ru.cian.rustore.publish.RustorePublishExtension> {
instances {
register("release") {
buildFormat = ru.cian.rustore.publish.BuildFormat.AAB
}
}
}
```
if your file is large, you can increase the timeout by a new parameter `requestTimeout` in seconds:
```kotlin
configure<ru.cian.rustore.publish.RustorePublishExtension> {
instances {
register("release") {
...
buildFormat = ru.cian.rustore.publish.BuildFormat.AAB
requestTimeout = 1800 // seconds;
....
}
}
}
```

##### Breaking Changes
* Remove support of Sonatype. It means that you can't use the plugin from Maven Central. You must to use the Gradle Portal.
To do this, you need to add the following code to your `settings.gradle.kts`:
```kotlin
pluginManagement {
repositories {
gradlePluginPortal()
}
}
```


# 0.4.0

##### Breaking Changes
Expand Down
137 changes: 64 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
</h1>
</p>

![Version](https://img.shields.io/badge/GradlePortal-0.4.0-green.svg)
![Version](https://img.shields.io/badge/GradlePortal-0.5.0-green.svg)
![Version](https://img.shields.io/badge/Gradle-8.*-pink.svg)
[![License](https://img.shields.io/github/license/srs/gradle-node-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)

The plugin use [Rustore API](https://help.rustore.ru/rustore/for_developers/work_with_RuStore_API/publish_RuStore_API) to publish Android *.apk build file to the [RuStore](https://rustore.ru).
The plugin use [Rustore API](https://help.rustore.ru/rustore/for_developers/work_with_RuStore_API/publish_RuStore_API) to publish Android build file to the [RuStore](https://rustore.ru).

:construction: _That's unofficial plugin. We made it for ourselves and are sharing it for you._

Expand All @@ -39,19 +39,18 @@ The plugin use [Rustore API](https://help.rustore.ru/rustore/for_developers/work

The following features are available:

- :white_check_mark: Publish APK build file in RuStore
- :white_check_mark: Publish APK and AAB build file in RuStore
- :white_check_mark: Submit the build on all users after getting store approve
- :white_check_mark: Update Release Notes for publishing build (Release Notes)
- :white_check_mark: Separated settings for different configurations build types and flavors
- :white_check_mark: Support of Gradle Portal and Gradle DSL
- :white_check_mark: Support of Gradle 8.+
- :white_check_mark: Support of Configuration Cache
- :white_check_mark: Support of Gradle 8.+

The following features are missing:

- :children_crossing: Change App Store Information: description, app icon, screenshots and etc.
- :children_crossing: Publish the build on a part of users (Release Phases)
- :children_crossing: Support of AppBundle

The following features are not available on Rustore API side yet:

Expand Down Expand Up @@ -79,39 +78,6 @@ plugins {
}
```

<details>
<summary>Snapshot builds are also available</summary>
___

You'll need to add the Sonatype snapshots repository.
Look for the actual version of the snapshot in the name of the opened `snapshot-<VERSION>` repository branch.

For general integration add next snippet in `./settings.gradle`

```kotlin
pluginManagement {

resolutionStrategy {
eachPlugin {
if(requested.id.namespace == "ru.cian") {
useModule("ru.cian.rustore-plugin:rustore-publish-gradle-plugin:<SNAPSHOT-VERSION>")
}
}
}

plugins {
id("ru.cian.rustore-publish-gradle-plugin") version rustorePublish apply false
}

repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
}
```
___

</details>

## Using the `apply` method

```groovy
Expand All @@ -129,31 +95,6 @@ apply plugin: 'com.android.application'
apply plugin: 'ru.cian.rustore-publish-gradle-plugin'
```

<details>
<summary>Snapshot builds are also available</summary>
___

You'll need to add the Sonatype snapshots repository.
Look for the actual version of the snapshot in the name of the opened `snapshot-<VERSION>` repository branch.

```groovy
buildscript {
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
classpath "ru.cian.rustore-plugin:rustore-publish-gradle-plugin:<VERSION>-SNAPSHOT"
}
}
apply plugin: 'com.android.application'
apply plugin: "ru.cian.rustore-publish-gradle-plugin"
```
___

</details>

## Quickstart Plugin Configuration

```kotlin
Expand All @@ -173,7 +114,21 @@ rustorePublish {
* Default value: `null` (but plugin wait that you provide credentials by CLI params)
* CLI: `--credentialsPath`
*/
credentialsPath = "$rootDir/rustore-credentials-release.json"
credentialsPath = "$rootDir/rustore-credentials-release.json"

/**
* Build file format.
* See https://www.rustore.ru/help/developers/publishing-and-verifying-apps/app-publication/upload-aab how to prepare project for loading of aab files.
* Type: String (Optional)
* CLI: `--buildFormat`, available values:
* ----| 'apk'
* ----| 'aab'
* Gradle Extention DSL, available values:
* ----| ru.cian.rustore.publish.BuildFormat.APK
* ----| ru.cian.rustore.publish.BuildFormat.AAB
* Default value: `apk`
*/
buildFormat = ru.cian.rustore.publish.BuildFormat.APK
}
}
}
Expand All @@ -187,6 +142,7 @@ rustorePublish {
instances {
release {
credentialsPath = "$rootDir/rustore-credentials-release.json"
buildFormat = "apk"
}
}
}
Expand All @@ -203,6 +159,7 @@ rustorePublish {
instances {
create("release") {
/**
* (Required)
* Path to json file with RuStore credentials params (`key_id` and `client_secret`).
* How to get credentials see [[RU] Rustore API Getting Started](https://www.rustore.ru/help/work-with-rustore-api/api-authorization-process/).
* Plugin credential json example:
Expand All @@ -216,26 +173,57 @@ rustorePublish {
* CLI: `--credentialsPath`
*/
credentialsPath = "$rootDir/rustore-credentials-release.json"

/**
* Path to build file if you would like to change default path. "null" means use standard path for "apk" and "aab" files.
* (Required)
* Build file format.
* See https://www.rustore.ru/help/developers/publishing-and-verifying-apps/app-publication/upload-aab how to prepare project for loading of aab files.
* Type: String (Optional)
* Default value: `null`
* CLI: `--buildFile`
* CLI: `--buildFormat`, available values:
* ----| 'apk'
* ----| 'aab'
* Gradle Extention DSL, available values:
* ----| ru.cian.rustore.publish.BuildFormat.APK
* ----| ru.cian.rustore.publish.BuildFormat.AAB
* Default value: `apk`
*/
buildFile = "$rootDir/app/build/outputs/apk/release/app-release.apk"
buildFormat = ru.cian.rustore.publish.BuildFormat.APK

/**
* (Optional)
* Path to build file if you would like to change default path. "null" means use standard path for "apk" and "aab" files.
* Type: String (Optional)
* Default value: `null`
* CLI: `--buildFile`
*/
buildFile = "$rootDir/app/build/outputs/apk/release/app-release.apk"

/**
* Type of mobile services used in application. Available values: [\"Unknown\", \"HMS\"].
* For more details see param `servicesType` in documentation " +
* (Optional)
* The time in seconds to wait for the publication to complete. Increase it if you build is large.
* Type: Long (Optional)
* Default value: `300` // (5min)
* CLI: `--publishTimeoutMs`
*/
requestTimeout = 300

/**
* (Optional)
* Type of mobile services used in application.
* For more details see param `servicesType` in documentation:
* https://www.rustore.ru/help/work-with-rustore-api/api-upload-publication-app/apk-file-upload/file-upload-apk/
* Type: ru.cian.rustore.publish.MobileServicesType (Optional)
* Default value: UNKNOWN
* CLI: `--mobileServicesType`
* ----| 'Unknown'
* ----| 'HMS'
* Gradle Extention DSL, available values:
* ----| ru.cian.rustore.publish.MobileServicesType.UNKNOWN
* ----| ru.cian.rustore.publish.MobileServicesType.HMS
* Default value: `Unknown`
*/
mobileServicesType = ru.cian.rustore.publish.MobileServicesType.UNKNOWN

/**
* (Optional)
* Release Notes settings. For mote info see ReleaseNote param desc.
* Type: List<ReleaseNote> (Optional)
* Default value: `null`
Expand Down Expand Up @@ -280,7 +268,9 @@ rustorePublish {
instances {
release {
credentialsPath = "$rootDir/rustore-credentials-release.json"
buildFormat = "apk"
buildFile = "$rootDir/app/build/outputs/apk/release/app-release.apk"
requestTimeout = 60
mobileServicesType = "Unknown"
releaseNotes = [
new ru.cian.rustore.publish.ReleaseNote(
Expand Down Expand Up @@ -342,6 +332,7 @@ CLI params are more priority than gradle configuration params.
```bash
./gradlew assembleRelease publishRustoreRelease \
--credentialsPath="/sample-kotlin/rustore-credentials.json" \
--buildFormat=apk \
--buildFile="/sample-kotlin/app/build/outputs/apk/release/app-release.apk" \
--mobileServicesType="Unknown" \
--releaseNotes="ru_RU:/home/<USERNAME>/str/project/release_notes_ru.txt"
Expand Down
15 changes: 3 additions & 12 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
How To Release
==============

Due to Maven Central's very particular requirements, the release process is a bit
elaborate and requires a good deal of local configuration. This guide should walk
you through it. It won't do anyone outside of KeepSafe any good, but the workflow
is representative of just about any project deploying via Sonatype.

We currently deploy to both Maven Central (via Sonatype's OSS Nexus instance) and to
plugins.gradle.org.
We currently deploy the plugin only to the Gradle Portal plugins.gradle.org.

## Prerequisites

1. A *published* GPG code-signing key
1. A Sonatype Nexus OSS account with permission to publish in ru.cian
1. A plugins.gradle.org account with permission to publish in ru.cian
1. Permission to push directly to https://github.com/cianru/rustore-publish-gradle-plugin

## Contents page

1. [Setup](docs/releasing/01-setup.md)
2. [Pushing a SNAPSHOT build to local repository](docs/releasing/02-publish-a-snapshot-to-local-repository.md)
3. [Pushing a SNAPSHOT build to Sonatype](docs/releasing/03-publish-a-snapshot-to-sonatype.md)
4. [Pushing a release build to Sonatype](docs/releasing/04-publish-a-release-build-to-sonatype.md)
2. [Pushing a build to local repository](docs/releasing/02-publish-a-build-to-local-repository)
5. [Pushing a release build to Gradle Plugin Portal](docs/releasing/06-publish-a-release-build-to-gradle-plugin-portal.md)
6. [Prepare Release Commit](docs/releasing/07-prepare-release-commit.md)
7. [Prepare Next Snapshot Version Commit](docs/releasing/08-prepare-next-snapshot-version-commit.md)
7. [Prepare Next Alpha Version Commit](docs/releasing/08-prepare-alpha-version-commit)
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,4 @@ configurations.all {

dependencies {
implementation(platform(libs.kotlinBom))
implementation(libs.gson)
implementation(libs.okHttp)
}
11 changes: 0 additions & 11 deletions docs/releasing/01-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@

1. Add your GPG key to your github profile - this is required
for github to know that your commits and tags are "verified".
1. Configure your code-signing key in ~/.gradle.properties:
```gradle
signing.keyId=<key ID of your GPG signing key>
signing.password=<your key's passphrase>
signing.secretKeyRingFile=/path/to/your/secring.gpg
```
1. Configure your Sonatype credentials in ~/.gradle/gradle.properties:
```gradle
SONATYPE_NEXUS_USERNAME=<nexus username>
SONATYPE_NEXUS_PASSWORD=<nexus password>
```
1. Configure git with your codesigning key; make sure it's the same as the one
you use to sign binaries (i.e. it's the same one you adaded to gradle.properties):
```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
```
cd ./plugin
```
2. Edit the `gradle.properties` file:
```bash
IS_SNAPSHOT=true
```
3. Publish to local repository
2. Publish to local repository
```bash
./gradlew :plugin:publishToMavenLocal
```
4. Remove local repository to apply remote build repository
3. Remove local repository to apply remote build repository
```bash
rm -rv ~/.m2/repository/ru/cian/rustore-publish-gradle-plugin/
```
15 changes: 0 additions & 15 deletions docs/releasing/03-publish-a-snapshot-to-sonatype.md

This file was deleted.

32 changes: 0 additions & 32 deletions docs/releasing/04-publish-a-release-build-to-sonatype.md

This file was deleted.

Loading

0 comments on commit 29e805f

Please sign in to comment.