Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 7cd9c12

Browse files
committed
changes
1 parent a831de7 commit 7cd9c12

File tree

87 files changed

+213
-3669
lines changed

Some content is hidden

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

87 files changed

+213
-3669
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
api-level: ${{ matrix.api-level }}
6464
sdcard-path-or-size: 50M
6565
profile: Nexus 6P
66-
script: ./gradlew connectedCheck -Pandroid.testInstrumentationRunnerArguments.filter=com.vanpra.composematerialdialogs.test.utils.NotScreenshotTestFilter
66+
script: ./gradlew connectedCheck -Pandroid.testInstrumentationRunnerArguments.filter=com.wakaztahir.composematerialdialogs.test.utils.NotScreenshotTestFilter
6767

6868
- name: Upload functional test results
6969
if: always()
@@ -78,7 +78,7 @@ jobs:
7878
api-level: ${{ matrix.api-level }}
7979
sdcard-path-or-size: 50M
8080
profile: Nexus 6P
81-
script: ./gradlew executeScreenshotTests -Pandroid.testInstrumentationRunnerArguments.filter=com.vanpra.composematerialdialogs.test.utils.ScreenshotTestFilter
81+
script: ./gradlew executeScreenshotTests -Pandroid.testInstrumentationRunnerArguments.filter=com.wakaztahir.composematerialdialogs.test.utils.ScreenshotTestFilter
8282

8383
- name: Upload screenshot test results
8484
if: always()

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ emulator -avd [AVD NAME] -no-window -gpu swiftshader_indirect
6565
To run the Unit and Functionality tests locally you can run the following command:
6666

6767
```
68-
./gradlew connectedCheck -Pandroid.testInstrumentationRunnerArguments.filter=com.vanpra.composematerialdialogs.test.utils.NotScreenshotTestFilter
68+
./gradlew connectedCheck -Pandroid.testInstrumentationRunnerArguments.filter=com.wakaztahir.composematerialdialogs.test.utils.NotScreenshotTestFilter
6969
```
7070

7171
To run the screenshot tests you can use:
7272

7373
```
74-
./gradlew executeScreenshotTests -Pandroid.testInstrumentationRunnerArguments.filter=com.vanpra.composematerialdialogs.test.utils.ScreenshotTestFilter
74+
./gradlew executeScreenshotTests -Pandroid.testInstrumentationRunnerArguments.filter=com.wakaztahir.composematerialdialogs.test.utils.ScreenshotTestFilter
7575
```
7676

7777
You can then view the screenshot test report at in the directory `[module]/build/screenshots/`
7878

7979
If you have added a new screenshot test or changed the UI such that it affects an existing screenshot test you will have to recapture the screenshots using an emulator. Before doing this run the screenshot tests to verify that all the tests which are not affected by the change are still passing. After doing so you can run the following command which will capture on the emulator which should be setup as mentioned above:
8080

8181
```
82-
./gradlew executeScreenshotTests -Precord -Pandroid.testInstrumentationRunnerArguments.filter=com.vanpra.composematerialdialogs.test.utils.ScreenshotTestFilter
82+
./gradlew executeScreenshotTests -Precord -Pandroid.testInstrumentationRunnerArguments.filter=com.wakaztahir.composematerialdialogs.test.utils.ScreenshotTestFilter
8383
```
8484

8585
## Pull Requests

README.md

Lines changed: 33 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,55 @@
1-
# Compose Material Dialogs
1+
# Compose Date Time Picker
22

3-
:rocket: Easy to use library to help you build complex dialogs using Jetpack Compose :rocket:
3+
This is a multiplatform port of ComposeMaterialDialogs - Date Time Picker
44

5-
[![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)
5+
#### [Date and Time Picker Documentation](https://vanpra.github.io/compose-material-dialogs/DateTimePicker)
66

7-
**Current Library Compose Version: 1.1.0-beta04**
7+
![](https://raw.githubusercontent.com/vanpra/compose-material-dialogs/main/imgs/date_and_time.png)
88

9-
### [See Releases and Changelog](https://github.com/vanpra/compose-material-dialogs/blob/main/CHANGELOG.md)
9+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.vanpra.compose-material-dialogs/datetime/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.vanpra.compose-material-dialogs/datetime)
1010

11-
## Core
1211

13-
#### [Core Documentation](https://vanpra.github.io/compose-material-dialogs/Core)
12+
### Usage
1413

15-
![](https://raw.githubusercontent.com/vanpra/compose-material-dialogs/main/imgs/full_core.png)
1614

17-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.vanpra.compose-material-dialogs/core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.vanpra.compose-material-dialogs/core)
15+
### Multiplatform Dependency
1816

19-
```gradle
20-
dependencies {
21-
...
22-
implementation "io.github.vanpra.compose-material-dialogs:core:0.6.2"
23-
...
24-
}
25-
```
17+
#### Step 1 : Add the Github Packages Repo
2618

27-
## Date and Time Picker
19+
```kotlin
2820

29-
#### [Date and Time Picker Documentation](https://vanpra.github.io/compose-material-dialogs/DateTimePicker)
21+
val githubProperties = Properties()
22+
githubProperties.load(FileInputStream(rootProject.file("github.properties")))
3023

31-
![](https://raw.githubusercontent.com/vanpra/compose-material-dialogs/main/imgs/date_and_time.png)
32-
33-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.vanpra.compose-material-dialogs/datetime/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.vanpra.compose-material-dialogs/datetime)
34-
35-
```gradle
36-
dependencies {
37-
...
38-
implementation "io.github.vanpra.compose-material-dialogs:datetime:0.6.2"
39-
...
24+
allprojects {
25+
repositories {
26+
maven {
27+
name = "GitHubPackages"
28+
url = uri("https://maven.pkg.github.com/username/repo")
29+
credentials {
30+
username = (githubProperties["gpr.usr"] ?: System.getenv("GPR_USER")).toString()
31+
password = (githubProperties["gpr.key"] ?: System.getenv("GPR_API_KEY")).toString()
32+
}
33+
}
34+
}
4035
}
4136
```
4237

43-
## Color Picker
38+
#### Step 2 : Create Github Properties File
4439

45-
#### [Color Picker Documentation](https://vanpra.github.io/compose-material-dialogs/ColorPicker)
40+
Create `github.properties` file in your project at root level and add two properties (make github personal access token)
4641

47-
![](https://raw.githubusercontent.com/vanpra/compose-material-dialogs/main/imgs/color_picker.png)
48-
49-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.vanpra.compose-material-dialogs/color/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.vanpra.compose-material-dialogs/color)
50-
51-
```gradle
52-
dependencies {
53-
...
54-
implementation "io.github.vanpra.compose-material-dialogs:color:0.6.2"
55-
...
56-
}
42+
```properties
43+
gpr.usr=yourusername
44+
gpr.key=yourgithubpersonalaccesstoken
5745
```
5846

59-
## For Developers
47+
#### Step 3 : Add The Dependency
6048

61-
If you would like to help by contributing to the library have a look at our [Contribution Guide](https://github.com/vanpra/compose-material-dialogs/blob/main/CONTRIBUTING.md) to get started
49+
Get the latest version , check it from releases page or better from the packages
6250

63-
## Credits
51+
This code is for Kotlin Gradle Script , Convert it over to groovy by removing quotes and braces if you use groovy !
6452

65-
This library's design is heavily inspired by https://github.com/afollestad/material-dialogs
53+
```kotlin
54+
implementation("com.wakaztahir:datetime:<current-version>")
55+
```

android/build.gradle.kts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
plugins {
2-
id("org.jetbrains.compose") version "1.0.1"
2+
id("org.jetbrains.compose") version ProjectConfig.ComposeVersion
33
id("com.android.application")
44
kotlin("android")
55
id("kotlin-kapt")
66
}
77

8-
//group = BuildConfig.Info.group
9-
//version = BuildConfig.Info.version
10-
118
android {
129
compileSdk = ProjectConfig.compileSdk
1310
buildToolsVersion = "30.0.3"
1411

1512
defaultConfig {
16-
applicationId = "com.vanpra.android"
13+
applicationId = "com.wakaztahir.android"
1714
minSdk = ProjectConfig.minSdk
1815
targetSdk = ProjectConfig.targetSdk
1916

@@ -40,10 +37,6 @@ android {
4037
dependencies {
4138
implementation(project(":common"))
4239

43-
// implementation(Dependencies.ComposeMaterialDialogs.core)
44-
// implementation(Dependencies.ComposeMaterialDialogs.datetime)
45-
// implementation(Dependencies.ComposeMaterialDialogs.color)
46-
4740
implementation(Dependencies.Google.material)
4841
implementation(Dependencies.AndroidX.coreKtx)
4942

android/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.vanpra.android">
3-
<!-- android:sharedUserId="com.vanpra.composematerialdialogs.uid" -->
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.wakaztahir.android">
3+
<!-- android:sharedUserId="com.wakaztahir.composematerialdialogs.uid" -->
44

55
<application
66
android:allowBackup="true"

android/src/main/java/com/vanpra/android/MainActivity.kt renamed to android/src/main/java/com/wakaztahir/android/MainActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package com.vanpra.android
1+
package com.wakaztahir.android
22

33
import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
66
import androidx.compose.material.MaterialTheme
7-
import com.vanpra.common.DialogDemos
7+
import com.wakaztahir.common.DialogDemos
88

99
class MainActivity : ComponentActivity() {
1010
override fun onCreate(savedInstanceState: Bundle?) {

build.gradle.kts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import java.util.Properties
2+
import java.io.FileInputStream
13
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
24

35
plugins {
@@ -24,11 +26,28 @@ buildscript {
2426
//group = BuildConfig.Info.group
2527
//version = BuildConfig.Info.version
2628

29+
30+
val githubProperties = java.util.Properties()
31+
try {
32+
githubProperties.load(FileInputStream(rootProject.file("github.properties")))
33+
} catch (e: Exception) {
34+
}
35+
2736
allprojects {
2837
repositories {
2938
google()
3039
mavenCentral()
3140
gradlePluginPortal()
41+
maven {
42+
name = "GithubPackages"
43+
url = uri("https://maven.pkg.github.com/codeckle/compose-datetime")
44+
45+
credentials {
46+
/**Create github.properties in root project folder file with gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN**/
47+
username = (githubProperties["gpr.usr"] ?: System.getenv("GPR_USER")).toString()
48+
password = (githubProperties["gpr.key"] ?: System.getenv("GPR_API_KEY")).toString()
49+
}
50+
}
3251
}
3352

3453
tasks.withType<KotlinCompile>().all {
@@ -46,7 +65,6 @@ allprojects {
4665
}
4766
}
4867

49-
5068
tasks.dokkaHtmlMultiModule.configure {
5169
outputDirectory.set(projectDir.resolve("docs/api"))
5270
}

buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
object Dependencies {
22
const val desugar = "com.android.tools:desugar_jdk_libs:1.1.5"
33

4+
object Accompanist {
5+
const val Pager = "com.wakaztahir.accompanist:pager:0.24.3-alpha"
6+
}
7+
48
object ComposeMaterialDialogs {
59
const val version = "0.6.2"
610

@@ -13,11 +17,6 @@ object Dependencies {
1317
const val version = "0.42.1"
1418
}
1519

16-
object Accompanist {
17-
private const val version = "0.21.4-beta"
18-
const val pager = "com.google.accompanist:accompanist-pager:$version"
19-
}
20-
2120
object Kotlin {
2221
private const val version = "1.6.10" // 1.0.1 compose-jb required 1.6.10
2322
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
object ProjectConfig {
2+
3+
// Android Config
24
val compileSdk = 31
35
val minSdk = 21
46
val targetSdk = 30
57

8+
const val ComposeVersion = "1.0.1"
9+
610
object Info {
7-
val group : String = "com.vanpra"
8-
val version : String = "1.0.3"
11+
val group : String = "com.wakaztahir"
12+
val version : String = "1.0.4"
913
}
1014
}

buildSrc/src/main/kotlin/update_deps.py

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)