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 - 3.26.0 #566

Closed
wants to merge 12 commits into from
Closed
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
35 changes: 35 additions & 0 deletions .cicdtemplate/.github/workflows/config/changelog-release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"categories": [
{
"title": "## ✨ Features",
"labels": [
"type : feature"
],
"empty_content": "N/A"
},
{
"title": "## 🐛 Bug fixes",
"labels": [
"type : bug"
],
"empty_content": "N/A"
},
{
"title": "## 🧹 Chores",
"labels": [
"type : chore"
],
"empty_content": "N/A"
},
{
"title": "## Others",
"exclude_labels": [
"type : feature",
"type : bug",
"type : chore",
"type : release"
]
}
],
"max_pull_requests": 200
}
25 changes: 25 additions & 0 deletions .cicdtemplate/.github/workflows/create_release_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Create the Release pull request

on:
workflow_dispatch:

jobs:
create_release_pr:
name: Create the Release pull request
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout the latest code
uses: actions/checkout@v3

- name: Read the current version
id: version
run: echo "version=$(perl -nle 'print $1 if /ANDROID_VERSION_NAME = \"(.*)\"$/' buildSrc/src/main/java/Versions.kt)" >> $GITHUB_OUTPUT

- uses: nimblehq/github-actions-workflows/[email protected]
with:
version: ${{ steps.version.outputs.version }}
changelogConfiguration: ".github/workflows/config/changelog-release.json"
assignee: bot-nimble
35 changes: 35 additions & 0 deletions .github/workflows/config/changelog-release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"categories": [
{
"title": "## ✨ Features",
"labels": [
"type : feature"
],
"empty_content": "N/A"
},
{
"title": "## 🐛 Bug fixes",
"labels": [
"type : bug"
],
"empty_content": "N/A"
},
{
"title": "## 🧹 Chores",
"labels": [
"type : chore"
],
"empty_content": "N/A"
},
{
"title": "## Others",
"exclude_labels": [
"type : feature",
"type : bug",
"type : chore",
"type : release"
]
}
],
"max_pull_requests": 200
}
28 changes: 28 additions & 0 deletions .github/workflows/create_release_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Create the Release pull request

on:
workflow_dispatch:

jobs:
create_release_pr:
name: Create the Release pull request
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout the latest code
uses: actions/checkout@v3

- name: Read the current version
id: version
uses: christian-draeger/[email protected]
with:
path: "version.properties"
properties: "templateScriptVersion"

- uses: nimblehq/github-actions-workflows/[email protected]
with:
version: ${{ steps.version.outputs.templateScriptVersion }}
changelogConfiguration: ".github/workflows/config/changelog-release.json"
assignee: bot-nimble
4 changes: 2 additions & 2 deletions sample-compose/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
#-renamesourcefileattribute SourceFile

# Data class
-keepclassmembers class co.nimblehq.sample.compose.data.request.** { *; }
-keepclassmembers class co.nimblehq.sample.compose.data.response.** { *; }
-keepclassmembers class co.nimblehq.sample.compose.data.remote.models.requests.** { *; }
-keepclassmembers class co.nimblehq.sample.compose.data.remote.models.responses.** { *; }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package co.nimblehq.sample.compose.di.modules

import co.nimblehq.sample.compose.data.service.providers.MoshiBuilderProvider
import co.nimblehq.sample.compose.data.remote.providers.MoshiBuilderProvider
import com.squareup.moshi.Moshi
import dagger.Module
import dagger.Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import androidx.datastore.core.DataStore
import androidx.datastore.preferences.core.PreferenceDataStoreFactory
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.preferencesDataStoreFile
import co.nimblehq.sample.compose.data.repository.AppPreferencesRepositoryImpl
import co.nimblehq.sample.compose.domain.repository.AppPreferencesRepository
import co.nimblehq.sample.compose.data.repositories.AppPreferencesRepositoryImpl
import co.nimblehq.sample.compose.domain.repositories.AppPreferencesRepository
import dagger.*
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package co.nimblehq.sample.compose.di.modules

import co.nimblehq.sample.compose.data.repository.RepositoryImpl
import co.nimblehq.sample.compose.data.service.ApiService
import co.nimblehq.sample.compose.domain.repository.Repository
import co.nimblehq.sample.compose.data.remote.services.ApiService
import co.nimblehq.sample.compose.data.repositories.RepositoryImpl
import co.nimblehq.sample.compose.domain.repositories.Repository
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package co.nimblehq.sample.compose.di.modules

import co.nimblehq.sample.compose.BuildConfig
import co.nimblehq.sample.compose.data.service.ApiService
import co.nimblehq.sample.compose.data.service.providers.ApiServiceProvider
import co.nimblehq.sample.compose.data.service.providers.ConverterFactoryProvider
import co.nimblehq.sample.compose.data.service.providers.RetrofitProvider
import co.nimblehq.sample.compose.data.remote.providers.ApiServiceProvider
import co.nimblehq.sample.compose.data.remote.providers.ConverterFactoryProvider
import co.nimblehq.sample.compose.data.remote.providers.RetrofitProvider
import co.nimblehq.sample.compose.data.remote.services.ApiService
import com.squareup.moshi.Moshi
import dagger.Module
import dagger.Provides
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package co.nimblehq.sample.compose.di.modules

import android.content.Context
import co.nimblehq.sample.compose.data.storage.EncryptedSharedPreferences
import co.nimblehq.sample.compose.data.local.preferences.EncryptedSharedPreferences
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package co.nimblehq.sample.compose.ui

import androidx.navigation.*
import co.nimblehq.sample.compose.model.UiModel
import androidx.navigation.NamedNavArgument
import androidx.navigation.NavType
import androidx.navigation.navArgument
import co.nimblehq.sample.compose.ui.models.UiModel

const val KeyId = "id"
const val KeyModel = "model"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package co.nimblehq.sample.compose.ui

import androidx.compose.runtime.Composable
import androidx.navigation.*
import androidx.navigation.compose.*
import co.nimblehq.sample.compose.model.UiModel
import androidx.navigation.NavBackStackEntry
import androidx.navigation.NavDeepLink
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import co.nimblehq.sample.compose.ui.models.UiModel
import co.nimblehq.sample.compose.ui.screens.home.HomeScreen
import co.nimblehq.sample.compose.ui.screens.second.SecondScreen
import co.nimblehq.sample.compose.ui.screens.third.ThirdScreen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package co.nimblehq.sample.compose.model
package co.nimblehq.sample.compose.ui.models

import android.os.Parcelable
import co.nimblehq.sample.compose.domain.model.Model
import co.nimblehq.sample.compose.domain.models.Model
import kotlinx.parcelize.Parcelize

@Parcelize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import co.nimblehq.sample.compose.R
import co.nimblehq.sample.compose.extensions.collectAsEffect
import co.nimblehq.sample.compose.extensions.showToast
import co.nimblehq.sample.compose.lib.IsLoading
import co.nimblehq.sample.compose.model.UiModel
import co.nimblehq.sample.compose.ui.AppDestination
import co.nimblehq.sample.compose.ui.models.UiModel
import co.nimblehq.sample.compose.ui.screens.AppBar
import co.nimblehq.sample.compose.ui.showToast
import co.nimblehq.sample.compose.ui.theme.ComposeTheme
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
package co.nimblehq.sample.compose.ui.screens.home

import androidx.lifecycle.viewModelScope
import co.nimblehq.sample.compose.domain.usecase.GetModelsUseCase
import co.nimblehq.sample.compose.domain.usecase.IsFirstTimeLaunchPreferencesUseCase
import co.nimblehq.sample.compose.domain.usecase.UpdateFirstTimeLaunchPreferencesUseCase
import co.nimblehq.sample.compose.model.UiModel
import co.nimblehq.sample.compose.model.toUiModel
import co.nimblehq.sample.compose.domain.usecases.GetModelsUseCase
import co.nimblehq.sample.compose.domain.usecases.IsFirstTimeLaunchPreferencesUseCase
import co.nimblehq.sample.compose.domain.usecases.UpdateFirstTimeLaunchPreferencesUseCase
import co.nimblehq.sample.compose.ui.AppDestination
import co.nimblehq.sample.compose.ui.base.BaseViewModel
import co.nimblehq.sample.compose.ui.models.UiModel
import co.nimblehq.sample.compose.ui.models.toUiModel
import co.nimblehq.sample.compose.util.DispatchersProvider
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.*
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import javax.inject.Inject

@HiltViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import co.nimblehq.sample.compose.R
import co.nimblehq.sample.compose.model.UiModel
import co.nimblehq.sample.compose.ui.models.UiModel
import co.nimblehq.sample.compose.ui.theme.*
import co.nimblehq.sample.compose.ui.theme.AppTheme.dimensions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.compose.material.Divider
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import co.nimblehq.sample.compose.model.UiModel
import co.nimblehq.sample.compose.ui.models.UiModel
import co.nimblehq.sample.compose.ui.theme.ComposeTheme

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.hilt.navigation.compose.hiltViewModel
import co.nimblehq.sample.compose.R
import co.nimblehq.sample.compose.model.UiModel
import co.nimblehq.sample.compose.ui.AppDestination
import co.nimblehq.sample.compose.ui.models.UiModel
import co.nimblehq.sample.compose.ui.screens.AppBar
import co.nimblehq.sample.compose.ui.theme.ComposeTheme

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package co.nimblehq.sample.compose.test

import co.nimblehq.sample.compose.domain.model.Model
import co.nimblehq.sample.compose.domain.models.Model

object MockUtil {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.rule.GrantPermissionRule
import co.nimblehq.sample.compose.R
import co.nimblehq.sample.compose.domain.usecase.*
import co.nimblehq.sample.compose.domain.usecases.*
import co.nimblehq.sample.compose.test.MockUtil
import co.nimblehq.sample.compose.ui.AppDestination
import co.nimblehq.sample.compose.ui.screens.BaseScreenTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
package co.nimblehq.sample.compose.ui.screens.home

import app.cash.turbine.test
import co.nimblehq.sample.compose.domain.usecase.GetModelsUseCase
import co.nimblehq.sample.compose.domain.usecase.IsFirstTimeLaunchPreferencesUseCase
import co.nimblehq.sample.compose.domain.usecase.UpdateFirstTimeLaunchPreferencesUseCase
import co.nimblehq.sample.compose.model.toUiModel
import co.nimblehq.sample.compose.domain.usecases.GetModelsUseCase
import co.nimblehq.sample.compose.domain.usecases.IsFirstTimeLaunchPreferencesUseCase
import co.nimblehq.sample.compose.domain.usecases.UpdateFirstTimeLaunchPreferencesUseCase
import co.nimblehq.sample.compose.test.CoroutineTestRule
import co.nimblehq.sample.compose.test.MockUtil
import co.nimblehq.sample.compose.ui.AppDestination
import co.nimblehq.sample.compose.ui.models.toUiModel
import co.nimblehq.sample.compose.util.DispatchersProvider
import io.kotest.matchers.shouldBe
import io.mockk.*
import io.mockk.Runs
import io.mockk.coEvery
import io.mockk.coVerify
import io.mockk.every
import io.mockk.just
import io.mockk.mockk
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.*
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.advanceUntilIdle
import kotlinx.coroutines.test.runTest
Expand Down
2 changes: 1 addition & 1 deletion sample-compose/buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object Versions {
const val ANDROID_TARGET_SDK_VERSION = 33

const val ANDROID_VERSION_CODE = 1
const val ANDROID_VERSION_NAME = "3.25.0"
const val ANDROID_VERSION_NAME = "3.26.0"

// Dependencies (Alphabet sorted)
const val ACCOMPANIST_PERMISSIONS_VERSION = "0.30.1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package co.nimblehq.sample.compose.data.extensions

import co.nimblehq.sample.compose.data.response.ErrorResponse
import co.nimblehq.sample.compose.data.response.toModel
import co.nimblehq.sample.compose.data.service.providers.MoshiBuilderProvider
import co.nimblehq.sample.compose.data.remote.models.responses.ErrorResponse
import co.nimblehq.sample.compose.data.remote.models.responses.toModel
import co.nimblehq.sample.compose.data.remote.providers.MoshiBuilderProvider
import co.nimblehq.sample.compose.domain.exceptions.ApiException
import co.nimblehq.sample.compose.domain.exceptions.NoConnectivityException
import com.squareup.moshi.JsonDataException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.sample.compose.data.storage
package co.nimblehq.sample.compose.data.local.preferences

import android.content.SharedPreferences

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.template.compose.data.storages
package co.nimblehq.sample.compose.data.local.preferences

import android.content.Context
import androidx.security.crypto.EncryptedSharedPreferences
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.nimblehq.template.compose.data.storages
package co.nimblehq.sample.compose.data.local.preferences

import android.content.SharedPreferences

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package co.nimblehq.sample.compose.data.response
package co.nimblehq.sample.compose.data.remote.models.responses

import co.nimblehq.sample.compose.domain.model.Error
import co.nimblehq.sample.compose.domain.models.Error
import com.squareup.moshi.Json

data class ErrorResponse(
Expand Down
Loading
Loading