Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 0.3.2 #6

Merged
merged 6 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run detekt checks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build plugin
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
kotlin-version: [1.4.21, 1.5.30, 1.6.10]
kotlin-version: [1.8.21, 1.9.21]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests with Gradle
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.3.2

##### Add
* [issue#5](https://github.com/cianru/rustore-publish-gradle-plugin/issues/5) Support of serviceType plugin param.

# 0.3.1

##### Add
Expand Down
118 changes: 110 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
[//]: # (</p>)

<p align="center">
<img src="docs/screenshots/rustore_logo.png" width="128">
<img src="docs/screenshots/header_cian_rustore.png">
<h1 align="center">
RuStore Publishing
</h1>
</p>

![Version](https://img.shields.io/badge/GradlePortal-0.3.1-green.svg)
![Version](https://img.shields.io/badge/GradlePortal-0.3.2-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)

Expand All @@ -27,7 +27,6 @@ The plugin use [Rustore API](https://help.rustore.ru/rustore/for_developers/work
- [Using the `apply` method](#using-the-apply-method)
- [Configuring Plugin](#configuring-plugin)
- [Plugin usage](#plugin-usage)

<!-- /TOC -->

# Features
Expand Down Expand Up @@ -58,10 +57,10 @@ The following features are not available on Rustore API side yet:
The Android Gradle Plugin often changes the Variant API,
so a different version of AGP corresponds to a specific version of the current plugin

| AGP | Plugin |
|-----|--------|
| 7.+ | 0.2.2 |
| 8.+ | 0.3.1 |
| AGP | Plugin |
|-----|----------------------------------------------------------------------------|
| 7.+ | 0.2.2 |
| 8.+ | [latest](https://github.com/cianru/rustore-publish-gradle-plugin/releases) |

# Adding the plugin to your project

Expand All @@ -76,6 +75,39 @@ 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 @@ -93,7 +125,65 @@ apply plugin: 'com.android.application'
apply plugin: 'ru.cian.rustore-publish-gradle-plugin'
```

## Configuring 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
rustorePublish {
instances {
create("release") {
/**
* Path to json file with RuStore credentials params (`company_id` and `client_secret`).
* How to get credentials see [[RU] Rustore API Getting Started](https://help.rustore.ru/rustore/for_developers/work_with_RuStore_API/authorization_rustore_api_1).
* Plugin credential json example:
* {
* "company_id": "<COMPANY_ID>",
* "client_secret": "<CLIENT_SECRET>"
* }
*
* Type: String (Optional)
* Default value: `null` (but plugin wait that you provide credentials by CLI params)
* 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.
* Type: String (Optional)
* Default value: `null`
* CLI: `--buildFile`
*/
buildFile = "$rootDir/app/build/outputs/apk/release/app-release.apk"
}
}
}
```

## Full Plugin Configuration

<details open>
<summary>Kotlin</summary>
Expand Down Expand Up @@ -125,6 +215,16 @@ rustorePublish {
*/
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 " +
* 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`
*/
mobileServicesType = ru.cian.rustore.publish.MobileServicesType.UNKNOWN

/**
* Release Notes settings. For mote info see ReleaseNote param desc.
* Type: List<ReleaseNote> (Optional)
Expand Down Expand Up @@ -171,6 +271,7 @@ rustorePublish {
release {
credentialsPath = "$rootDir/rustore-credentials-release.json"
buildFile = "$rootDir/app/build/outputs/apk/release/app-release.apk"
mobileServicesType = "Unknown"
releaseNotes = [
new ru.cian.rustore.publish.ReleaseNote(
"ru-RU",
Expand All @@ -191,6 +292,7 @@ the same by CLI
./gradlew assembleRelease publishRustoreRelease \
--credentialsPath="/sample-kotlin/rustore-credentials.json" \
--buildFile="/sample-kotlin/app/build/outputs/apk/release/app-release.apk" \
--mobileServicesType="Unknown" \
--releaseNotes="ru_RU:/home/<USERNAME>/str/project/release_notes_ru.txt"
```
CLI params are more priority than Plugin configuration params.
Expand Down
82 changes: 41 additions & 41 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.benManesVersions)
alias(libs.plugins.gradleDoctor)
// alias(libs.plugins.gradleDoctor)
}

allprojects {
Expand All @@ -23,46 +23,46 @@ allprojects {
}
}

doctor {
/**
* Throw an exception when multiple Gradle Daemons are running.
*
* Windows is not supported yet, see https://github.com/runningcode/gradle-doctor/issues/84
*/
disallowMultipleDaemons.set(true)

/**
* Warn when not using parallel GC. Parallel GC is faster for build type tasks and is no longer the default in Java 9+.
*/
warnWhenNotUsingParallelGC.set(true)

/**
* Warn if using the Kotlin Compiler Daemon Fallback. The fallback is incredibly slow and should be avoided.
* https://youtrack.jetbrains.com/issue/KT-48843
*/
warnIfKotlinCompileDaemonFallback.set(true)

/** Configuration properties relating to JAVA_HOME */
javaHome {
/**
* Ensure that we are using JAVA_HOME to build with this Gradle.
*/
ensureJavaHomeMatches.set(true)
/**
* Ensure we have JAVA_HOME set.
*/
ensureJavaHomeIsSet.set(true)
/**
* Fail on any `JAVA_HOME` issues.
*/
failOnError.set(true)
/**
* Extra message text, if any, to show with the Gradle Doctor message. This is useful if you have a wiki page or
* other instructions that you want to link for developers on your team if they encounter an issue.
*/
extraMessage.set("Gradle Doctor Issue!")
}
}
//doctor {
// /**
// * Throw an exception when multiple Gradle Daemons are running.
// *
// * Windows is not supported yet, see https://github.com/runningcode/gradle-doctor/issues/84
// */
// disallowMultipleDaemons.set(true)
//
// /**
// * Warn when not using parallel GC. Parallel GC is faster for build type tasks and is no longer the default in Java 9+.
// */
// warnWhenNotUsingParallelGC.set(true)
//
// /**
// * Warn if using the Kotlin Compiler Daemon Fallback. The fallback is incredibly slow and should be avoided.
// * https://youtrack.jetbrains.com/issue/KT-48843
// */
// warnIfKotlinCompileDaemonFallback.set(true)
//
// /** Configuration properties relating to JAVA_HOME */
// javaHome {
// /**
// * Ensure that we are using JAVA_HOME to build with this Gradle.
// */
// ensureJavaHomeMatches.set(true)
// /**
// * Ensure we have JAVA_HOME set.
// */
// ensureJavaHomeIsSet.set(true)
// /**
// * Fail on any `JAVA_HOME` issues.
// */
// failOnError.set(true)
// /**
// * Extra message text, if any, to show with the Gradle Doctor message. This is useful if you have a wiki page or
// * other instructions that you want to link for developers on your team if they encounter an issue.
// */
// extraMessage.set("Gradle Doctor Issue!")
// }
//}

configurations.all {
resolutionStrategy {
Expand Down
Binary file added docs/screenshots/header_cian_rustore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,32 @@ minSdkVersion = "21"
jvm = "17"
kotlin = "1.9.21"
detekt = "1.23.4"
junitJupiter = "5.7.0"
junitJupiter = "5.9.3"
androidGradlePlugin = "8.0.2"
sampleRustorePlugin = "0.3.1-SNAPSHOT"
sampleRustorePlugin = "0.3.2-SNAPSHOT"

[libraries]
appcompat = "androidx.appcompat:appcompat:1.6.1"
kotlinBom = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlin" }
kotlinDateTime = "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0"
kotlinDateTime = "org.jetbrains.kotlinx:kotlinx-datetime:0.5.0"
gson = "com.google.code.gson:gson:2.8.6"
okHttp = "com.squareup.okhttp3:okhttp:4.9.1"
okHttp = "com.squareup.okhttp3:okhttp:4.12.0"
androidGradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }

detektFormating = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
detektRules = { module = "io.gitlab.arturbosch.detekt:detekt-rules-libraries", version.ref = "detekt" }

test-assertk = "com.willowtreeapps.assertk:assertk-jvm:0.23"
test-hamcreast = "org.hamcrest:hamcrest:2.1"
test-mockk = "io.mockk:mockk:1.10.3-jdk8"
test-hamcreast = "org.hamcrest:hamcrest:2.2"
test-mockk = "io.mockk:mockk:1.13.5"
test-mockito = "org.mockito:mockito-core:2.23.4"
test-mockitoKotlin = "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
test-junitJupiterApi = "org.junit.jupiter:junit-jupiter-api:5.7.0"
test-junitJupiterEngine = "org.junit.jupiter:junit-jupiter-engine:5.7.0"
test-junitJupiterParams = "org.junit.jupiter:junit-jupiter-params:5.7.0"
test-junitJupiterApi = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junitJupiter" }
test-junitJupiterEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junitJupiter" }
test-junitJupiterParams = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junitJupiter" }

[plugins]
dokka = { id = "org.jetbrains.dokka", version = "1.8.10" }
dcendents = { id = "com.github.dcendents", version = "plugin:2.1" }
bintray = { id = "com.jfrog.bintray", version = "1.8.5" }
pluginPublish = { id = "com.gradle.plugin-publish", version = "0.15.0" }
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
Expand Down
Loading
Loading