File tree Expand file tree Collapse file tree 17 files changed +198
-8
lines changed
.cicdtemplate/.github/workflows
java/co/nimblehq/sample/compose
template-compose/app/src/main/java/co/nimblehq/template/compose/ui Expand file tree Collapse file tree 17 files changed +198
-8
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "categories" : [
3
+ {
4
+ "title" : " ## ✨ Features" ,
5
+ "labels" : [
6
+ " type : feature"
7
+ ],
8
+ "empty_content" : " N/A"
9
+ },
10
+ {
11
+ "title" : " ## 🐛 Bug fixes" ,
12
+ "labels" : [
13
+ " type : bug"
14
+ ],
15
+ "empty_content" : " N/A"
16
+ },
17
+ {
18
+ "title" : " ## 🧹 Chores" ,
19
+ "labels" : [
20
+ " type : chore"
21
+ ],
22
+ "empty_content" : " N/A"
23
+ },
24
+ {
25
+ "title" : " ## Others" ,
26
+ "exclude_labels" : [
27
+ " type : feature" ,
28
+ " type : bug" ,
29
+ " type : chore" ,
30
+ " type : release"
31
+ ]
32
+ }
33
+ ],
34
+ "max_pull_requests" : 200
35
+ }
Original file line number Diff line number Diff line change
1
+ name : Create the Release pull request
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ create_release_pull_request :
8
+ name : Create the Release pull request
9
+ runs-on : ubuntu-latest
10
+ permissions :
11
+ contents : write
12
+ pull-requests : write
13
+ steps :
14
+ - name : Check out the latest code
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Read the current version
18
+ id : version
19
+ run : echo "version=$(perl -nle 'print $1 if /ANDROID_VERSION_NAME = \"(.*)\"$/' buildSrc/src/main/java/Versions.kt)" >> $GITHUB_OUTPUT
20
+
21
+ -
uses :
nimblehq/github-actions-workflows/[email protected]
22
+ with :
23
+ release_version : ${{ steps.version.outputs.version }}
24
+ changelog_configuration : " .github/workflows/config/changelog-release.json"
25
+ assignee : bot-nimble
Original file line number Diff line number Diff line change 1
1
# Team
2
2
# @ryan-conway is the Team Lead and the others are team members
3
- * @ AVI5HEK @ chornerman @ doannimble @ hoangnguyen92dn @ kaungkhantsoe @ luongvo @ lydiasama @ manh-t @ minhnimble @ ryan-conway @ sleepylee @ thiennguyen0196 @ toby-thanathip @ Wadeewee
3
+ * @ AVI5HEK @ chornerman @ doannimble @ hoangnguyen92dn @ Johnsonmaung @ kaungkhantsoe @ luongvo @ manh-t @ minhnimble @ ryan-conway @ sleepylee @ thiennguyen0196 @ toby-thanathip
4
4
5
5
# Engineering Leads
6
6
CODEOWNERS @ nimblehq/engineering-leads
Original file line number Diff line number Diff line change
1
+ {
2
+ "categories" : [
3
+ {
4
+ "title" : " ## ✨ Features" ,
5
+ "labels" : [
6
+ " type : feature"
7
+ ],
8
+ "empty_content" : " N/A"
9
+ },
10
+ {
11
+ "title" : " ## 🐛 Bug fixes" ,
12
+ "labels" : [
13
+ " type : bug"
14
+ ],
15
+ "empty_content" : " N/A"
16
+ },
17
+ {
18
+ "title" : " ## 🧹 Chores" ,
19
+ "labels" : [
20
+ " type : chore"
21
+ ],
22
+ "empty_content" : " N/A"
23
+ },
24
+ {
25
+ "title" : " ## Others" ,
26
+ "exclude_labels" : [
27
+ " type : feature" ,
28
+ " type : bug" ,
29
+ " type : chore" ,
30
+ " type : release"
31
+ ]
32
+ }
33
+ ],
34
+ "max_pull_requests" : 200
35
+ }
Original file line number Diff line number Diff line change
1
+ name : Create the Release pull request
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ create_release_pull_request :
8
+ name : Create the Release pull request
9
+ runs-on : ubuntu-latest
10
+ permissions :
11
+ contents : write
12
+ pull-requests : write
13
+ steps :
14
+ - name : Check out the latest code
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Read the current version
18
+ id : version
19
+ uses :
christian-draeger/[email protected]
20
+ with :
21
+ path : " version.properties"
22
+ properties : " templateScriptVersion"
23
+
24
+ -
uses :
nimblehq/github-actions-workflows/[email protected]
25
+ with :
26
+ release_version : ${{ steps.version.outputs.templateScriptVersion }}
27
+ changelog_configuration : " .github/workflows/config/changelog-release.json"
28
+ assignee : bot-nimble
Original file line number Diff line number Diff line change @@ -132,7 +132,8 @@ dependencies {
132
132
implementation(" androidx.compose.material:material" )
133
133
134
134
implementation(" androidx.navigation:navigation-compose:${Versions .COMPOSE_NAVIGATION_VERSION } " )
135
- implementation(" com.google.accompanist:accompanist-permissions:${Versions .ACCOMPANIST_PERMISSIONS_VERSION } " )
135
+ implementation(" com.google.accompanist:accompanist-permissions:${Versions .ACCOMPANIST_VERSION } " )
136
+ implementation(" com.google.accompanist:accompanist-systemuicontroller:${Versions .ACCOMPANIST_VERSION } " )
136
137
137
138
implementation(" androidx.datastore:datastore-preferences:${Versions .ANDROIDX_DATASTORE_PREFERENCES_VERSION } " )
138
139
Original file line number Diff line number Diff line change
1
+ package co.nimblehq.sample.compose.ui.base
2
+
3
+ import androidx.compose.runtime.Composable
4
+ import androidx.compose.ui.res.colorResource
5
+ import co.nimblehq.sample.compose.R
6
+ import co.nimblehq.sample.compose.util.setStatusBarColor
7
+
8
+ @Composable
9
+ fun BaseScreen (
10
+ isDarkStatusBarIcons : Boolean? = null,
11
+ content : @Composable () -> Unit ,
12
+ ) {
13
+ if (isDarkStatusBarIcons != null ) {
14
+ setStatusBarColor(
15
+ color = colorResource(id = R .color.statusBarColor),
16
+ darkIcons = isDarkStatusBarIcons,
17
+ )
18
+ }
19
+
20
+ content()
21
+ }
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import co.nimblehq.sample.compose.extensions.collectAsEffect
16
16
import co.nimblehq.sample.compose.extensions.showToast
17
17
import co.nimblehq.sample.compose.lib.IsLoading
18
18
import co.nimblehq.sample.compose.ui.base.BaseDestination
19
+ import co.nimblehq.sample.compose.ui.base.BaseScreen
19
20
import co.nimblehq.sample.compose.ui.common.AppBar
20
21
import co.nimblehq.sample.compose.ui.models.UiModel
21
22
import co.nimblehq.sample.compose.ui.showToast
@@ -28,6 +29,8 @@ fun HomeScreen(
28
29
viewModel : HomeViewModel = hiltViewModel(),
29
30
navigator : (destination: BaseDestination ) -> Unit ,
30
31
isResultOk : Boolean = false,
32
+ ) = BaseScreen (
33
+ isDarkStatusBarIcons = true ,
31
34
) {
32
35
val context = LocalContext .current
33
36
viewModel.error.collectAsEffect { e -> e.showToast(context) }
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import androidx.compose.ui.tooling.preview.Preview
15
15
import androidx.hilt.navigation.compose.hiltViewModel
16
16
import co.nimblehq.sample.compose.R
17
17
import co.nimblehq.sample.compose.ui.base.BaseDestination
18
+ import co.nimblehq.sample.compose.ui.base.BaseScreen
18
19
import co.nimblehq.sample.compose.ui.base.KeyResultOk
19
20
import co.nimblehq.sample.compose.ui.common.AppBar
20
21
import co.nimblehq.sample.compose.ui.theme.AppTheme.dimensions
@@ -25,6 +26,8 @@ fun SecondScreen(
25
26
viewModel : SecondViewModel = hiltViewModel(),
26
27
navigator : (destination: BaseDestination ) -> Unit ,
27
28
id : String ,
29
+ ) = BaseScreen (
30
+ isDarkStatusBarIcons = false ,
28
31
) {
29
32
SecondScreenContent (
30
33
id = id,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import androidx.compose.ui.tooling.preview.Preview
14
14
import androidx.hilt.navigation.compose.hiltViewModel
15
15
import co.nimblehq.sample.compose.R
16
16
import co.nimblehq.sample.compose.ui.base.BaseDestination
17
+ import co.nimblehq.sample.compose.ui.base.BaseScreen
17
18
import co.nimblehq.sample.compose.ui.common.AppBar
18
19
import co.nimblehq.sample.compose.ui.models.UiModel
19
20
import co.nimblehq.sample.compose.ui.theme.ComposeTheme
@@ -23,6 +24,8 @@ fun ThirdScreen(
23
24
viewModel : ThirdViewModel = hiltViewModel(),
24
25
navigator : (destination: BaseDestination ) -> Unit ,
25
26
model : UiModel ? ,
27
+ ) = BaseScreen (
28
+ isDarkStatusBarIcons = true ,
26
29
) {
27
30
ThirdScreenContent (data = model)
28
31
}
Original file line number Diff line number Diff line change
1
+ package co.nimblehq.sample.compose.util
2
+
3
+ import android.annotation.SuppressLint
4
+ import androidx.compose.runtime.Composable
5
+ import androidx.compose.runtime.LaunchedEffect
6
+ import androidx.compose.ui.graphics.Color
7
+ import com.google.accompanist.systemuicontroller.rememberSystemUiController
8
+
9
+ @SuppressLint(" ComposableNaming" )
10
+ @Composable
11
+ fun setStatusBarColor (
12
+ color : Color ,
13
+ darkIcons : Boolean ,
14
+ ) {
15
+ val systemUiController = rememberSystemUiController()
16
+ LaunchedEffect (key1 = darkIcons) {
17
+ systemUiController.setStatusBarColor(
18
+ color = color,
19
+ darkIcons = darkIcons,
20
+ )
21
+ }
22
+ }
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<resources >
3
- <color name =" greenChristi " >#FF669900</color >
3
+ <color name =" statusBarColor " >#FF669900</color >
4
4
</resources >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<resources >
3
3
<style name =" AppTheme" parent =" Theme.AppCompat.Light.NoActionBar" >
4
- <item name =" android:statusBarColor" >@color/greenChristi </item >
4
+ <item name =" android:statusBarColor" >@color/statusBarColor </item >
5
5
</style >
6
6
</resources >
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ object Versions {
6
6
const val ANDROID_TARGET_SDK_VERSION = 33
7
7
8
8
const val ANDROID_VERSION_CODE = 1
9
- const val ANDROID_VERSION_NAME = " 3.27 .0"
9
+ const val ANDROID_VERSION_NAME = " 3.29 .0"
10
10
11
11
// Dependencies (Alphabet sorted)
12
- const val ACCOMPANIST_PERMISSIONS_VERSION = " 0.30.1"
12
+ const val ACCOMPANIST_VERSION = " 0.30.1"
13
13
const val ANDROID_COMMON_KTX_VERSION = " 0.1.1"
14
14
const val ANDROID_CRYPTO_VERSION = " 1.0.0"
15
15
const val ANDROIDX_CORE_KTX_VERSION = " 1.10.1"
Original file line number Diff line number Diff line change
1
+ package co.nimblehq.template.compose.ui.base
2
+
3
+ import androidx.compose.runtime.Composable
4
+
5
+ @Composable
6
+ fun BaseScreen (
7
+ // TODO Base parameters to request on all screens here
8
+ content : @Composable () -> Unit ,
9
+ ) {
10
+ // TODO Base logic for all screens here
11
+
12
+ content()
13
+ }
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
18
18
import co.nimblehq.template.compose.R
19
19
import co.nimblehq.template.compose.extensions.collectAsEffect
20
20
import co.nimblehq.template.compose.ui.base.BaseDestination
21
+ import co.nimblehq.template.compose.ui.base.BaseScreen
21
22
import co.nimblehq.template.compose.ui.models.UiModel
22
23
import co.nimblehq.template.compose.ui.showToast
23
24
import co.nimblehq.template.compose.ui.theme.AppTheme.dimensions
@@ -28,7 +29,7 @@ import timber.log.Timber
28
29
fun HomeScreen (
29
30
viewModel : HomeViewModel = hiltViewModel(),
30
31
navigator : (destination: BaseDestination ) -> Unit ,
31
- ) {
32
+ ) = BaseScreen {
32
33
val context = LocalContext .current
33
34
viewModel.error.collectAsEffect { e -> e.showToast(context) }
34
35
viewModel.navigator.collectAsEffect { destination -> navigator(destination) }
Original file line number Diff line number Diff line change 1
1
kotlinVersion =1.6.21
2
2
kscriptVersion =4.0.3
3
- templateScriptVersion =3.27 .0
3
+ templateScriptVersion =3.29 .0
You can’t perform that action at this time.
0 commit comments