Skip to content

Commit

Permalink
Merge pull request #97 from vanpra/0.5.1
Browse files Browse the repository at this point in the history
Library release 0.5.1
  • Loading branch information
PranavMaganti authored Jul 30, 2021
2 parents 90ed103 + b13375b commit ddc5265
Show file tree
Hide file tree
Showing 21 changed files with 129 additions and 141 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

### 0.5.1 - 2021-07-29

- Update compose to 1.0.0
- Fix resolution of extension function imports

### 0.5.0 - 2021-07-27

- Update compose to 1.0.0-beta09
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ae8d455118164f43a24732761a970cc8)](https://www.codacy.com/gh/vanpra/compose-material-dialogs/dashboard?utm_source=github.com&utm_medium=referral&utm_content=vanpra/compose-material-dialogs&utm_campaign=Badge_Grade)![Build & Test](https://github.com/vanpra/compose-material-dialogs/actions/workflows/main.yml/badge.svg)

**Current Library Compose Version: 1.0.0-rc02**
**Current Library Compose Version: 1.0.0**

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

Expand All @@ -19,7 +19,7 @@
```gradle
dependencies {
...
implementation "io.github.vanpra.compose-material-dialogs:core:0.5.0"
implementation "io.github.vanpra.compose-material-dialogs:core:0.5.1"
...
}
```
Expand All @@ -35,7 +35,7 @@ dependencies {
```gradle
dependencies {
...
implementation "io.github.vanpra.compose-material-dialogs:datetime:0.5.0"
implementation "io.github.vanpra.compose-material-dialogs:datetime:0.5.1"
...
}
```
Expand All @@ -51,7 +51,7 @@ dependencies {
```gradle
dependencies {
...
implementation "io.github.vanpra.compose-material-dialogs:color:0.5.0"
implementation "io.github.vanpra.compose-material-dialogs:color:0.5.1"
...
}
```
Expand Down
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ android {
"META-INF/LICENSE",
"META-INF/AL2.0",
"META-INF/**",
"META-INF/*.kotlin_module"
)
)

Expand Down
4 changes: 3 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.vanpra.composematerialdialogdemos"
android:sharedUserId="com.vanpra.composematerialdialogs.uid">

Expand All @@ -9,7 +10,8 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Composematerialdialogs">
android:theme="@style/Theme.Composematerialdialogs"
tools:replace="android:theme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ fun MultiSelectionDemo() {
var initialSelection by remember { mutableStateOf(setOf(3, 5)) }

DialogAndShowButton(buttonText = "Multi-Selection Dialog", buttons = { defaultListDialogButtons() }) {
title(res = R.string.labels_dialog_title)
listItemsMultiChoice(labels) {
println(it)
}
title(res = R.string.labels_dialog_title)
listItemsMultiChoice(labels) {
println(it)
}
}

DialogAndShowButton(
buttonText = "Multi-Selection Dialog with disabled items",
Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("com.diffplug.spotless") version "5.14.1"
id("org.jetbrains.dokka") version "1.4.32"
id("org.jetbrains.dokka") version "1.5.0"
}

buildscript {
Expand All @@ -29,8 +29,7 @@ allprojects {
gradlePluginPortal()
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") }
maven { url = uri("https://kotlin.bintray.com/kotlinx/") }
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }

maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots") }
}

tasks.withType<KotlinCompile>().all {
Expand All @@ -42,7 +41,8 @@ allprojects {
"-Xopt-in=androidx.compose.ui.test.ExperimentalTestApi",
"-Xopt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-Xopt-in=androidx.compose.ui.ExperimentalComposeUiApi",
)
"-Xopt-in=com.google.accompanist.pager.ExperimentalPagerApi"
)
}
}
}
Expand Down
22 changes: 11 additions & 11 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
object Dependencies {
const val material = "com.google.android.material:material:1.4.0-rc01"
const val material = "com.google.android.material:material:1.5.0-alpha01"
const val desugar = "com.android.tools:desugar_jdk_libs:1.1.5"

object ComposeMaterialDialogs {
const val version = "0.4.3"
const val version = "0.5.1"

const val core = "io.github.vanpra.compose-material-dialogs:core:$version"
const val datetime = "io.github.vanpra.compose-material-dialogs:datetime:$version"
const val color = "io.github.vanpra.compose-material-dialogs:color:$version"
}

object Ktlint {
const val version = "0.41.0"
const val version = "0.42.0"
}

object Accompanist {
private const val version = "0.14.0"
private const val version = "0.15.0"
const val pager = "com.google.accompanist:accompanist-pager:$version"
}

Expand All @@ -26,32 +26,32 @@ object Dependencies {
}

object Shot {
private const val version = "5.10.5"
private const val version = "5.10.6"
const val shot = "com.karumi:shot-android:$version"
}

object AndroidX {
const val appcompat = "androidx.appcompat:appcompat:1.4.0-alpha02"
const val coreKtx = "androidx.core:core-ktx:1.6.0-rc01"
const val appcompat = "androidx.appcompat:appcompat:1.4.0-alpha03"
const val coreKtx = "androidx.core:core-ktx:1.7.0-alpha01"

object Testing {
const val version = "1.4.0-alpha06"
const val version = "1.4.0"
const val core = "androidx.test:core:$version"
const val rules = "androidx.test:rules:$version"
const val runner = "androidx.test:runner:$version"
}

object Compose {
const val version = "1.0.0-rc02"
const val version = "1.0.0"

const val ui = "androidx.compose.ui:ui:$version"
const val material = "androidx.compose.material:material:$version"
const val materialIconsExtended =
"androidx.compose.material:material-icons-extended:$version"

const val testing = "androidx.compose.ui:ui-test-junit4:$version"
const val testing = "androidx.compose.ui:ui-test-junit4:1.0.0-rc02"
const val activity = "androidx.activity:activity-compose:1.3.0-rc02"
const val navigation = "androidx.navigation:navigation-compose:2.4.0-alpha04"
const val navigation = "androidx.navigation:navigation-compose:2.4.0-alpha05"
}
}
}
18 changes: 0 additions & 18 deletions buildSrc/src/main/kotlin/test.py

This file was deleted.

9 changes: 6 additions & 3 deletions color/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ android {

packagingOptions.excludes.addAll(
listOf(
"META-INF/DEPENDENCIES.txt",
"META-INF/LICENSE",
"META-INF/LICENSE.txt",
"META-INF/NOTICE",
"META-INF/NOTICE.txt",
"META-INF/AL2.0",
"META-INF/**",
"META-INF/*.kotlin_module"
"META-INF/LGPL2.1"
)
)

Expand All @@ -53,4 +56,4 @@ shot {

mavenPublish {
sonatypeHost = com.vanniktech.maven.publish.SonatypeHost.S01
}
}
Empty file removed color/mirakle_build_file_stub
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class ColorPickerDialogTests {

composeTestRule.setContent {
DialogWithContent(buttons = { defaultButtons() }) {
colorChooser(colors = ColorPalette.Primary, waitForPositiveButton = true) {
selectedColor = it
}
colorChooser(colors = ColorPalette.Primary, waitForPositiveButton = true) {
selectedColor = it
}
}
}

composeTestRule.onDialogColorSelector(2).performClick()
assertEquals(null, selectedColor)
Expand All @@ -57,11 +57,11 @@ class ColorPickerDialogTests {

composeTestRule.setContent {
DialogWithContent(buttons = { defaultButtons() }) {
colorChooser(colors = ColorPalette.Primary, waitForPositiveButton = false) {
selectedColor = it
}
colorChooser(colors = ColorPalette.Primary, waitForPositiveButton = false) {
selectedColor = it
}
}
}

composeTestRule.onDialogColorSelector(2).performClick()
composeTestRule.waitForIdle()
Expand Down
9 changes: 6 additions & 3 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ android {

packagingOptions.excludes.addAll(
listOf(
"META-INF/DEPENDENCIES.txt",
"META-INF/LICENSE",
"META-INF/LICENSE.txt",
"META-INF/NOTICE",
"META-INF/NOTICE.txt",
"META-INF/AL2.0",
"META-INF/**",
"META-INF/*.kotlin_module"
"META-INF/LGPL2.1"
)
)

Expand Down Expand Up @@ -56,4 +59,4 @@ shot {

mavenPublish {
sonatypeHost = com.vanniktech.maven.publish.SonatypeHost.S01
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ class InputDialogTest {
) {
composeTestRule.setContent {
DialogWithContent(dialog = dialog, buttons = { defaultButtons() }) {
title(res = R.string.input_dialog_title)
testInputDialog()
}
title(res = R.string.input_dialog_title)
testInputDialog()
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@ class ListDialog {
) {
composeTestRule.setContent {
DialogWithContent(dialog = dialog, buttons = { defaultButtons() }) {
title(res = R.string.labels_dialog_title)
listItemsMultiChoice(labels, waitForPositiveButton = waitForPositiveButton) {
selectedItem.value = it
}
title(res = R.string.labels_dialog_title)
listItemsMultiChoice(labels, waitForPositiveButton = waitForPositiveButton) {
selectedItem.value = it
}
}
}
}

private fun setupSingleSelectionDialog(
Expand All @@ -294,11 +294,11 @@ class ListDialog {
) {
composeTestRule.setContent {
DialogWithContent(dialog = dialog, buttons = { defaultButtons() }) {
title(res = R.string.ringtone_dialog_title)
listItemsSingleChoice(ringtones, waitForPositiveButton = waitForPositiveButton) {
selectedItem.value = it
}
title(res = R.string.ringtone_dialog_title)
listItemsSingleChoice(ringtones, waitForPositiveButton = waitForPositiveButton) {
selectedItem.value = it
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ class ListDialog : ScreenshotTest {
fun multiSelectionDialog() {
composeTestRule.setContentAndWaitForIdle {
DialogWithContent(buttons = { defaultButtons() }) {
title(res = R.string.labels_dialog_title)
listItemsMultiChoice(labels)
}
title(res = R.string.labels_dialog_title)
listItemsMultiChoice(labels)
}
}
compareScreenshot(composeTestRule.onDialog())
}
Expand All @@ -122,9 +122,9 @@ class ListDialog : ScreenshotTest {
fun singleSelectionDialog() {
composeTestRule.setContentAndWaitForIdle {
DialogWithContent(buttons = { defaultButtons() }) {
title(res = R.string.ringtone_dialog_title)
listItemsSingleChoice(ringtones)
}
title(res = R.string.ringtone_dialog_title)
listItemsSingleChoice(ringtones)
}
}
compareScreenshot(composeTestRule.onDialog())
}
Expand Down
Loading

0 comments on commit ddc5265

Please sign in to comment.