Skip to content

Commit 232140c

Browse files
sergeysozinovenotniy
authored andcommitted
Merge pull request #380 from mindbox-cloud/release/2.6.3
Release/2.6.3
2 parents 81b78c5 + 70e80ef commit 232140c

File tree

79 files changed

+1715
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1715
-284
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,38 @@ jobs:
1212
lint:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616

17-
- name: Set up JDK 11
18-
uses: actions/setup-java@v1
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v3
1919
with:
20-
java-version: 11
20+
distribution: 'temurin'
21+
java-version: '17'
22+
cache: 'gradle'
2123

2224
- name: Setup Android SDK
2325
uses: android-actions/setup-android@v2
2426

2527
- name: lint check
26-
uses: eskatos/gradle-command-action@v1
27-
with:
28-
gradle-version: 6.8
29-
arguments: lintDebug
28+
run: ./gradlew --no-daemon lintDebug
3029

3130
unit:
3231
runs-on: ubuntu-latest
3332
steps:
34-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v3
3534

36-
- name: Set up JDK 11
37-
uses: actions/setup-java@v1
35+
- name: Set up JDK 17
36+
uses: actions/setup-java@v3
3837
with:
39-
java-version: 11
38+
distribution: 'temurin'
39+
java-version: '17'
40+
cache: 'gradle'
4041

4142
- name: Setup Android SDK
4243
uses: android-actions/setup-android@v2
4344

4445
- name: unit tests
45-
uses: eskatos/gradle-command-action@v1
46-
with:
47-
gradle-version: 6.8
48-
arguments: testDebugUnitTest --stacktrace
46+
run: ./gradlew --no-daemon --stacktrace testDebugUnitTest
4947

5048
- name: test report
5149
uses: asadmansr/[email protected]
@@ -54,15 +52,14 @@ jobs:
5452
build:
5553
runs-on: ubuntu-latest
5654
steps:
57-
- uses: actions/checkout@v2
55+
- uses: actions/checkout@v3
5856

59-
- name: Set up JDK 11
60-
uses: actions/setup-java@v1
57+
- name: Set up JDK 17
58+
uses: actions/setup-java@v3
6159
with:
62-
java-version: 11
60+
distribution: 'temurin'
61+
java-version: '17'
62+
cache: 'gradle'
6363

6464
- name: build project
65-
uses: eskatos/gradle-command-action@v1
66-
with:
67-
gradle-version: 6.8
68-
arguments: assembleDebug
65+
run: ./gradlew --no-daemon assembleDebug

.github/workflows/deploy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: SDK Distribute
2+
3+
on:
4+
pull_request:
5+
types: [ closed ]
6+
branches:
7+
- develop
8+
9+
jobs:
10+
update:
11+
if: github.event.pull_request.merged == true
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: trigger build & send to FAD
15+
uses: benc-uk/workflow-dispatch@v1
16+
with:
17+
workflow: 61033697
18+
repo: mindbox-cloud/android-app
19+
ref: develop
20+
token: ${{ secrets.GITHUBACCESSTOKEN }}
21+

.github/workflows/publish.yml

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,67 +14,66 @@ jobs:
1414
lint:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818

19-
- name: Set up JDK 11
20-
uses: actions/setup-java@v1
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v3
2121
with:
22-
java-version: 11
22+
distribution: 'temurin'
23+
java-version: '17'
24+
cache: 'gradle'
2325

2426
- name: Setup Android SDK
2527
uses: android-actions/setup-android@v2
2628

2729
- name: lint check
28-
uses: eskatos/gradle-command-action@v1
29-
with:
30-
gradle-version: 6.8
31-
arguments: check
30+
run: ./gradlew --no-daemon check
3231

3332
unit:
3433
runs-on: ubuntu-latest
3534
steps:
36-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v3
3736

38-
- name: Set up JDK 11
39-
uses: actions/setup-java@v1
37+
- name: Set up JDK 17
38+
uses: actions/setup-java@v3
4039
with:
41-
java-version: 11
40+
distribution: 'temurin'
41+
java-version: '17'
42+
cache: 'gradle'
4243

4344
- name: Setup Android SDK
4445
uses: android-actions/setup-android@v2
4546

4647
- name: unit tests
47-
uses: eskatos/gradle-command-action@v1
48-
with:
49-
gradle-version: 6.8
50-
arguments: test testDebugUnitTest
48+
run: ./gradlew --no-daemon testDebugUnitTest
5149

5250
build:
5351
needs: [unit, lint]
5452
runs-on: ubuntu-latest
5553
steps:
56-
- uses: actions/checkout@v2
54+
- uses: actions/checkout@v3
5755

58-
- name: Set up JDK 11
59-
uses: actions/setup-java@v1
56+
- name: Set up JDK 17
57+
uses: actions/setup-java@v3
6058
with:
61-
java-version: 11
59+
distribution: 'temurin'
60+
java-version: '17'
61+
cache: 'gradle'
6262

6363
- name: build project
64-
uses: eskatos/gradle-command-action@v1
65-
with:
66-
gradle-version: 6.8
67-
arguments: build assembleDebug
64+
run: ./gradlew --no-daemon assembleDebug
6865

6966
publish:
7067
needs: [build]
7168
runs-on: ubuntu-latest
7269
steps:
7370
- uses: actions/checkout@v1
74-
- name: Set up JDK 11
75-
uses: actions/setup-java@v1
71+
- name: Set up JDK 17
72+
uses: actions/setup-java@v3
7673
with:
77-
java-version: 11
74+
distribution: 'temurin'
75+
java-version: '17'
76+
cache: 'gradle'
7877

7978
- name: Prepare to publish
8079
run: |
@@ -96,10 +95,7 @@ jobs:
9695
run: ./git-release.sh "${{secrets.GITHUBACCESSTOKEN}}" "${{secrets.GITHUBUSER}}"
9796

9897
- name: Publish to Sonatype
99-
uses: eskatos/gradle-command-action@v1
100-
with:
101-
gradle-version: 6.8
102-
arguments: test publish -PsonatypeUsername=${{secrets.OSSRHUSERNAME}} -PsonatypePassword=${{secrets.OSSRHPASSWORD}}
98+
run: ./gradlew --no-daemon publish -PsonatypeUsername=${{secrets.OSSRHUSERNAME}} -PsonatypePassword=${{secrets.OSSRHPASSWORD}}
10399

104100
- name: Job status notification
105101
uses: rtCamp/action-slack-notify@v2

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = "1.6.21"
3+
ext.kotlin_version = "1.8.21"
44
repositories {
55
google()
66
mavenCentral()
77
maven { url("https://plugins.gradle.org/m2/") }
88
maven { url("https://developer.huawei.com/repo/") }
99
}
1010
dependencies {
11-
classpath "com.android.tools.build:gradle:4.2.2"
11+
classpath "com.android.tools.build:gradle:7.4.2"
1212
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1313
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.10.1"
1414
classpath 'com.google.gms:google-services:4.3.10'

dependencies.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ ext {
1313
kotlinx_coroutines_android: 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0',
1414
volley: 'com.android.volley:volley:1.2.1',
1515
gson: 'com.google.code.gson:gson:2.8.7',
16-
room: 'androidx.room:room-runtime:2.4.1',
17-
room_ktx: 'androidx.room:room-ktx:2.4.1',
18-
room_compiler: 'androidx.room:room-compiler:2.4.1',
16+
room: 'androidx.room:room-runtime:2.5.1',
17+
room_ktx: 'androidx.room:room-ktx:2.5.1',
18+
room_compiler: 'androidx.room:room-compiler:2.5.1',
1919
work_manager: 'androidx.work:work-runtime-ktx:2.7.1',
2020
androidx_lifecycle: 'androidx.lifecycle:lifecycle-process:2.3.1',
2121
hms_push: 'com.huawei.hms:push:6.5.0.300',
@@ -24,7 +24,7 @@ ext {
2424
koin_test: 'io.insert-koin:koin-test:3.2.2',
2525
koin_junit4: 'io.insert-koin:koin-test-junit4:3.2.2',
2626
constraint_layout: 'androidx.constraintlayout:constraintlayout:2.1.4',
27-
jdk_libs: 'com.android.tools:desugar_jdk_libs:1.2.2'
27+
threetenapb: 'com.jakewharton.threetenabp:threetenabp:1.4.6'
2828
]
2929

3030
testDependencies = [
@@ -35,7 +35,9 @@ ext {
3535
turbine: 'app.cash.turbine:turbine:0.12.1',
3636
mockk: 'io.mockk:mockk:1.13.3',
3737
mockk_android: 'io.mockk:mockk-android:1.13.3',
38-
mockk_agent: 'io.mockk:mockk-agent:1.13.3'
38+
mockk_agent: 'io.mockk:mockk-agent:1.13.3',
39+
robolectric: 'org.robolectric:robolectric:4.9',
40+
test_core: 'androidx.test:core:1.5.0'
3941
]
4042

4143
}

git-release-branch.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
# Check if the parameter is provided
4+
if [ $# -eq 0 ]; then
5+
echo "Please provide the release version number as a parameter."
6+
exit 1
7+
fi
8+
9+
# Check if the version number matches the semver format
10+
if ! [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+(-rc)?$ ]]; then
11+
echo "The release version number does not match the semver format (X.Y.Z or X.Y.Z-rc)."
12+
exit 1
13+
fi
14+
15+
# Check the current Git branch
16+
current_branch=$(git symbolic-ref --short HEAD)
17+
18+
if [[ $current_branch != "develop" && ! $current_branch =~ ^release/[0-9]+\.[0-9]+\.[0-9]+(-rc)?$ ]]; then
19+
echo "The current Git branch ($current_branch) is not 'develop' or in the format 'release/X.Y.Z' or 'release/X.Y.Z-rc'."
20+
exit 1
21+
fi
22+
23+
# Create a branch with the version name
24+
version=$1
25+
branch_name="release/$version"
26+
git branch $branch_name
27+
git checkout $branch_name
28+
29+
# Add changelog to the index and create a commit
30+
properties_file="gradle.properties"
31+
current_version=$(grep -E '^SDK_VERSION_NAME=' gradle.properties | cut -d'=' -f2)
32+
sed -i '' "s/^SDK_VERSION_NAME=.*/SDK_VERSION_NAME=$version/" $properties_file
33+
34+
echo "Bump SDK version from $current_version to $version."
35+
36+
git add $properties_file
37+
git commit -m "Bump SDK version to $version"
38+
39+
echo "Branch $branch_name has been created."

git-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ prepare-release-data() {
3737
}
3838

3939
set-local-tag() {
40-
echo "Setting local tag"
40+
echo "Setting local tag $version"
4141
git tag -f "$version"
4242
}
4343
set-remote-tag() {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ android.enableJetifier=true
2121
kotlin.code.style=official
2222

2323
# SDK version property
24-
SDK_VERSION_NAME=2.6.2
24+
SDK_VERSION_NAME=2.6.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon Nov 07 16:21:11 YEKT 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

mindbox-firebase/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dependencies {
1414

1515
implementation sdkDependencies.androidx_core_ktx
1616
implementation sdkDependencies.kotlinx_coroutines_core
17-
coreLibraryDesugaring sdkDependencies.jdk_libs
1817

1918
implementation sdkDependencies.gson
2019

0 commit comments

Comments
 (0)