Skip to content

Commit

Permalink
Merge pull request #3 from aritra-tech/dependency_bump
Browse files Browse the repository at this point in the history
Dependency Bump
  • Loading branch information
aritra-tech authored Jun 9, 2024
2 parents cc23b77 + 3304ec3 commit 236e942
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 106 deletions.
40 changes: 40 additions & 0 deletions .idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 18 additions & 20 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
}

android {
Expand Down Expand Up @@ -39,9 +40,6 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand All @@ -51,21 +49,21 @@ android {

dependencies {

implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.activity:activity-compose:1.7.2")
implementation(platform("androidx.compose:compose-bom:2023.03.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)

implementation (project(":compose_cards"))
}
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id ("com.android.application") version "8.1.1" apply false
id ("org.jetbrains.kotlin.android") version "1.8.10" apply false
id ("com.android.library") version "8.1.1" apply false
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.compose.compiler) apply false
}
28 changes: 12 additions & 16 deletions compose_cards/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import com.android.build.gradle.internal.utils.createPublishingInfoForLibrary

plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
id ("maven-publish")
}

Expand Down Expand Up @@ -36,9 +35,6 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
}
publishing {
singleVariant("release") {
withSourcesJar()
Expand All @@ -49,22 +45,22 @@ android {

dependencies {

implementation("androidx.activity:activity-compose:1.7.2")
implementation("androidx.compose.ui:ui:1.5.1")
implementation("androidx.compose.material:material:1.6.0-alpha05")
implementation("androidx.compose.ui:ui-graphics:1.5.1")
implementation("androidx.compose.foundation:foundation:1.6.0-alpha05")
implementation("androidx.compose.ui:ui-tooling-preview:1.5.1")
implementation("androidx.compose.ui:ui-tooling:1.5.1")
implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha12")
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.ui)
implementation(libs.androidx.material)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.foundation)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.ui.tooling)
implementation(libs.androidx.constraintlayout.compose)
}

publishing {
publications {
register<MavenPublication>("release") {
groupId = "com.github.aritra-tech"
artifactId = "ComposeCards"
version = "1.1.3"
version = "1.1.4"

afterEvaluate {
from(components["release"])
Expand Down
116 changes: 56 additions & 60 deletions compose_cards/src/main/java/com/aritra/compose_cards/CardDetails.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package com.aritra.compose_cards

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Button
import androidx.compose.material.ButtonDefaults
Expand Down Expand Up @@ -43,84 +43,80 @@ fun CardDetails() {
cardCVV = cardCVV
)

LazyColumn(
Column(
modifier = Modifier
.padding(16.dp)
.fillMaxWidth()
) {
item {
InputTextField(
textFieldValue = cardNumber,
label = stringResource(R.string.your_card_number),
keyboardType = KeyboardType.Number,
onTextChanged = { cardNumber = it },
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 5.dp),
visualTransformation = CardNumberFilter
)

InputTextField(
textFieldValue = cardHolderName,
label = stringResource(R.string.card_holder_name),
keyboardType = KeyboardType.Text,
onTextChanged = { cardHolderName = it },
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 5.dp),
)

Row(
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 5.dp),
verticalAlignment = Alignment.CenterVertically
) {
InputTextField(
textFieldValue = cardNumber,
label = stringResource(R.string.your_card_number),
textFieldValue = expiryDate,
label = stringResource(R.string.expiry_date),
keyboardType = KeyboardType.Number,
onTextChanged = { cardNumber = it },
onTextChanged = { expiryDate = it },
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 5.dp),
visualTransformation = CardNumberFilter
.weight(1f)
.padding(end = 8.dp)
)
}

item {
InputTextField(
textFieldValue = cardHolderName,
label = "Card Holder Name",
onTextChanged = { cardHolderName = it },
textFieldValue = cardCVV,
label = stringResource(R.string.cvv),
keyboardType = KeyboardType.Number,
onTextChanged = { cardCVV = it },
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 5.dp),
.weight(1f)
.padding(start = 8.dp)
)
}

item {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 5.dp),
verticalAlignment = Alignment.CenterVertically
) {
InputTextField(
textFieldValue = expiryDate,
label = stringResource(R.string.expiry_date),
keyboardType = KeyboardType.Number,
onTextChanged = { expiryDate = it },
modifier = Modifier
.weight(1f)
.padding(end = 8.dp)
)
InputTextField(
textFieldValue = cardCVV,
label = stringResource(R.string.cvv),
keyboardType = KeyboardType.Number,
onTextChanged = { cardCVV = it },
modifier = Modifier
.weight(1f)
.padding(start = 8.dp)
)
}
}
Spacer(modifier = Modifier.weight(1f))

item {
Button(
onClick = { },
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 20.dp),
shape = RoundedCornerShape(15.dp),
colors = ButtonDefaults.buttonColors(MaterialTheme.colors.onBackground)
) {
Text(
text = stringResource(id = R.string.save),
color = MaterialTheme.colors.onPrimary,
modifier = Modifier.padding(horizontal = 30.dp, vertical = 8.dp)
)
}
Button(
onClick = { },
modifier = Modifier
.fillMaxWidth(),
shape = RoundedCornerShape(15.dp),
colors = ButtonDefaults.buttonColors(MaterialTheme.colors.onBackground)
) {
Text(
text = stringResource(id = R.string.save),
color = MaterialTheme.colors.onPrimary,
modifier = Modifier.padding(horizontal = 30.dp, vertical = 8.dp)
)
}

}
}
}

@Preview(showBackground = true, backgroundColor = 0xFFFFFEFE,
@Preview(
showBackground = true, backgroundColor = 0xFFFFFEFE,
device = "id:pixel_6_pro"
)
@Composable
Expand Down
Loading

0 comments on commit 236e942

Please sign in to comment.