Skip to content

Commit c003db1

Browse files
Merge pull request #157 from vanpra/0.8.1-rc
Library Version 0.8.1-rc
2 parents b1ce376 + bd82c98 commit c003db1

File tree

16 files changed

+86
-67
lines changed

16 files changed

+86
-67
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
### 0.8.1-rc - 2022-05-25
4+
5+
- Update compose to 1.2.0-rc03 ([#156](https://github.com/vanpra/compose-material-dialogs/issues/156))
6+
- Update kotlin to 1.7.0
7+
- Remove `material-icons-extended` dependency ([#153](https://github.com/vanpra/compose-material-dialogs/issues/153))
8+
- Add parameter for changing title and message style and color ([#150](https://github.com/vanpra/compose-material-dialogs/issues/150))
9+
310
### 0.8.0-beta - 2022-05-25
411

512
- Update compose to 1.2.0-beta02 ([#149](https://github.com/vanpra/compose-material-dialogs/pull/149))

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
**Latest Stable Library Version: 0.7.2 (Supports Compose 1.1.1)**
88

9-
**Latest Beta Library Version: 0.8.0-beta (Supports Compose 1.2.0-beta02)**
9+
**Latest Beta Library Version: 0.8.1-rc (Supports Compose 1.2.0-rc03)**
1010

1111
### [See Releases and Changelog](https://github.com/vanpra/compose-material-dialogs/blob/main/CHANGELOG.md)
1212

app/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ plugins {
55
}
66

77
android {
8-
compileSdk = 31
9-
buildToolsVersion = "30.0.3"
10-
118
defaultConfig {
129

1310
applicationId = "com.vanpra.composematerialdialogs"
1411
minSdk = 23
15-
targetSdk = 30
12+
targetSdk = 33
13+
compileSdk = 33
1614

1715
versionName = "1.0"
1816
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -38,7 +36,7 @@ android {
3836
}
3937

4038
composeOptions {
41-
kotlinCompilerExtensionVersion = Dependencies.AndroidX.Compose.version
39+
kotlinCompilerExtensionVersion = Dependencies.AndroidX.Compose.compilerVersion
4240
}
4341
}
4442

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ buildscript {
1414

1515
dependencies {
1616
classpath(Dependencies.Kotlin.gradlePlugin)
17-
classpath("com.android.tools.build:gradle:7.4.0-alpha02")
17+
classpath("com.android.tools.build:gradle:7.3.0-beta05")
1818
classpath("com.vanniktech:gradle-maven-publish-plugin:0.19.0")
19-
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.6.21")
19+
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.7.0")
2020
classpath(Dependencies.Shot.core)
2121
}
2222
}

buildSrc/src/main/kotlin/CommonModulePlugin.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ class CommonModulePlugin: Plugin<Project> {
2626

2727
implementation(Dependencies.AndroidX.Compose.ui)
2828
implementation(Dependencies.AndroidX.Compose.material)
29-
implementation(Dependencies.AndroidX.Compose.materialIconsExtended)
30-
implementation(Dependencies.AndroidX.Compose.animation)
3129
implementation(Dependencies.AndroidX.Compose.foundationLayout)
30+
implementation(Dependencies.AndroidX.Compose.animation)
3231

3332
androidTestImplementation(Dependencies.AndroidX.Compose.activity)
3433
androidTestImplementation(Dependencies.AndroidX.Compose.testing)

buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
object Dependencies {
2-
const val desugar = "com.android.tools:desugar_jdk_libs:1.1.5"
2+
const val desugar = "com.android.tools:desugar_jdk_libs:1.2.0"
33

44
object ComposeMaterialDialogs {
5-
const val version = "0.6.3"
5+
const val version = "0.7.0"
66

77
const val core = "io.github.vanpra.compose-material-dialogs:core:$version"
88
const val datetime = "io.github.vanpra.compose-material-dialogs:datetime:$version"
@@ -14,12 +14,12 @@ object Dependencies {
1414
}
1515

1616
object Accompanist {
17-
private const val version = "0.24.9-beta"
17+
private const val version = "0.24.13-rc"
1818
const val pager = "com.google.accompanist:accompanist-pager:$version"
1919
}
2020

2121
object Kotlin {
22-
private const val version = "1.6.21"
22+
private const val version = "1.7.0"
2323
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
2424
}
2525

@@ -30,11 +30,11 @@ object Dependencies {
3030
}
3131

3232
object Google {
33-
const val material = "com.google.android.material:material:1.6.0"
33+
const val material = "com.google.android.material:material:1.6.1"
3434
}
3535

3636
object AndroidX {
37-
const val coreKtx = "androidx.core:core-ktx:1.7.0"
37+
const val coreKtx = "androidx.core:core-ktx:1.8.0"
3838

3939
object Testing {
4040
const val version = "1.4.0"
@@ -44,7 +44,8 @@ object Dependencies {
4444
}
4545

4646
object Compose {
47-
const val version = "1.2.0-beta02"
47+
const val version = "1.2.0-rc03"
48+
const val compilerVersion = "1.2.0"
4849

4950
const val ui = "androidx.compose.ui:ui:$version"
5051
const val material = "androidx.compose.material:material:$version"
@@ -55,7 +56,7 @@ object Dependencies {
5556

5657
const val testing = "androidx.compose.ui:ui-test-junit4:$version"
5758
const val activity = "androidx.activity:activity-compose:1.4.0"
58-
const val navigation = "androidx.navigation:navigation-compose:2.4.2"
59+
const val navigation = "androidx.navigation:navigation-compose:2.5.0"
5960
}
6061
}
6162
}

color/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ plugins {
55
android {
66
defaultConfig {
77
minSdk = 21
8-
compileSdk = 31
9-
targetSdk = 31
8+
compileSdk = 33
9+
targetSdk = 33
1010

1111
testInstrumentationRunner = "com.karumi.shot.ShotTestRunner"
1212
testApplicationId = "com.vanpra.composematerialdialogs.color.test"
@@ -42,7 +42,7 @@ android {
4242
}
4343

4444
composeOptions {
45-
kotlinCompilerExtensionVersion = Dependencies.AndroidX.Compose.version
45+
kotlinCompilerExtensionVersion = Dependencies.AndroidX.Compose.compilerVersion
4646
}
4747
}
4848

core/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ plugins {
55
android {
66
defaultConfig {
77
minSdk = 21
8-
compileSdk = 31
9-
targetSdk = 31
8+
compileSdk = 33
9+
targetSdk = 33
1010

1111
testInstrumentationRunner = "com.karumi.shot.ShotTestRunner"
1212
testApplicationId = "com.vanpra.composematerialdialogs.test"
@@ -45,7 +45,7 @@ android {
4545
}
4646

4747
composeOptions {
48-
kotlinCompilerExtensionVersion = Dependencies.AndroidX.Compose.version
48+
kotlinCompilerExtensionVersion = Dependencies.AndroidX.Compose.compilerVersion
4949
}
5050
}
5151

core/src/main/java/com/vanpra/composematerialdialogs/MaterialDialogCore.kt

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import androidx.compose.runtime.getValue
1717
import androidx.compose.runtime.setValue
1818
import androidx.compose.ui.Alignment
1919
import androidx.compose.ui.Modifier
20+
import androidx.compose.ui.graphics.Color
21+
import androidx.compose.ui.text.TextStyle
2022
import androidx.compose.ui.unit.dp
2123

2224
/**
@@ -29,6 +31,8 @@ import androidx.compose.ui.unit.dp
2931
fun MaterialDialogScope.title(
3032
text: String? = null,
3133
@StringRes res: Int? = null,
34+
color: Color = MaterialTheme.colors.onSurface,
35+
style: TextStyle = MaterialTheme.typography.h6,
3236
center: Boolean = false
3337
) {
3438
val titleText = getString(res, text)
@@ -50,8 +54,8 @@ fun MaterialDialogScope.title(
5054

5155
Text(
5256
text = titleText,
53-
color = MaterialTheme.colors.onSurface,
54-
style = MaterialTheme.typography.h6,
57+
color = color,
58+
style = style,
5559
modifier = modifier
5660
)
5761
}
@@ -66,6 +70,8 @@ fun MaterialDialogScope.title(
6670
fun MaterialDialogScope.iconTitle(
6771
text: String? = null,
6872
@StringRes textRes: Int? = null,
73+
color: Color = MaterialTheme.colors.onSurface,
74+
style: TextStyle = MaterialTheme.typography.h6,
6975
icon: @Composable () -> Unit = {},
7076
) {
7177
val titleText = getString(textRes, text)
@@ -79,8 +85,8 @@ fun MaterialDialogScope.iconTitle(
7985
Spacer(Modifier.width(14.dp))
8086
Text(
8187
text = titleText,
82-
color = MaterialTheme.colors.onBackground,
83-
style = MaterialTheme.typography.h6
88+
color = color,
89+
style = style
8490
)
8591
}
8692
}
@@ -91,13 +97,18 @@ fun MaterialDialogScope.iconTitle(
9197
* @param res message text from a string resource
9298
*/
9399
@Composable
94-
fun MaterialDialogScope.message(text: String? = null, @StringRes res: Int? = null) {
100+
fun MaterialDialogScope.message(
101+
text: String? = null,
102+
color: Color = MaterialTheme.colors.onSurface,
103+
style: TextStyle = MaterialTheme.typography.body1,
104+
@StringRes res: Int? = null
105+
) {
95106
val messageText = getString(res, text)
96107

97108
Text(
98109
text = messageText,
99-
color = MaterialTheme.colors.onSurface,
100-
style = MaterialTheme.typography.body1,
110+
color = color,
111+
style = style,
101112
modifier = Modifier
102113
.padding(bottom = 28.dp, start = 24.dp, end = 24.dp)
103114
)

datetime/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
}
99
defaultConfig {
1010
minSdk = 21
11-
compileSdk = 31
12-
targetSdk = 31
11+
compileSdk = 33
12+
targetSdk = 33
1313

1414
testInstrumentationRunner = "com.karumi.shot.ShotTestRunner"
1515
testApplicationId = "com.vanpra.composematerialdialogs.test"
@@ -45,7 +45,7 @@ android {
4545
}
4646

4747
composeOptions {
48-
kotlinCompilerExtensionVersion = Dependencies.AndroidX.Compose.version
48+
kotlinCompilerExtensionVersion = Dependencies.AndroidX.Compose.compilerVersion
4949
}
5050

5151
kotlinOptions {

0 commit comments

Comments
 (0)