Skip to content

⚡ Upgrade dependencies and gradle versions #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
}

android {
compileSdk 34
compileSdk libs.versions.compileSdk.get().toInteger()

defaultConfig {
applicationId "com.simform.ssjetpackcomposeprogressbutton"
minSdk 21
targetSdk 34
minSdk libs.versions.minSdk.get().toInteger()
targetSdk libs.versions.targetSdk.get().toInteger()
versionCode 2
versionName "1.0.7"

Expand All @@ -30,22 +31,20 @@ android {
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
jvmTarget = JavaVersion.VERSION_17.toString()
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_compiler
}
namespace = "com.simform.ssjetpackcomposeprogressbutton"
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation "androidx.compose.ui:ui:1.5.4"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation 'androidx.activity:activity-compose:1.8.2'
implementation(libs.appcompat)
implementation(libs.ui)
implementation(libs.material3)
implementation(libs.ui.tooling)
implementation(libs.activity.compose)
implementation(libs.material)
implementation project(path: ':ssjetpackcomposeprogressbutton')
}
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.simform.ssjetpackcomposeprogressbutton">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down

Large diffs are not rendered by default.

27 changes: 5 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
buildscript {
ext {
compose_version = '1.5.4'
compose_compiler = '1.3.1'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10'
}
configurations {
configureEach {
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
}
}
}

tasks.register('clean', Delete) {
delete rootProject.buildDir
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.compose.compiler) apply false
}
32 changes: 32 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[versions]
activityCompose = "1.9.2"
appcompat = "1.7.0"
espressoCore = "3.6.1"
junit = "4.13.2"
junitVersion = "1.2.1"
material = "1.12.0"
material3 = "1.3.0"
ui = "1.7.2"
androidGradlePlugin = "8.4.2"
kotlinPlugin = "2.0.0"
# Target Sdk's version
compileSdk = "34"
targetSdk = "34"
minSdk = "21"

[libraries]
activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
ext-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
junit = { module = "junit:junit", version.ref = "junit" }
material = { module = "com.google.android.material:material", version.ref = "material" }
material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }
ui = { module = "androidx.compose.ui:ui", version.ref = "ui" }
ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "ui" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinPlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlinPlugin" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu May 06 09:44:53 IST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
18 changes: 15 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
google()
maven { url 'https://jitpack.io' }
}
}
rootProject.name = "SSJetPackComposeProgressButton"
include ':app'
include ':ssjetpackcomposeprogressbutton'
include(":app", ":ssjetpackcomposeprogressbutton")
31 changes: 14 additions & 17 deletions ssjetpackcomposeprogressbutton/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
alias(libs.plugins.kotlin.android)
alias(libs.plugins.android.library)
alias(libs.plugins.compose.compiler)
id("maven-publish")
}

afterEvaluate {
Expand All @@ -19,11 +20,11 @@ afterEvaluate {
}

android {
compileSdk 34
compileSdk libs.versions.compileSdk.get().toInteger()

defaultConfig {
minSdk 21
targetSdk 34
minSdk libs.versions.minSdk.get().toInteger()
targetSdk libs.versions.targetSdk.get().toInteger()

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -42,24 +43,20 @@ android {
}

kotlinOptions {
jvmTarget = '17'
jvmTarget = JavaVersion.VERSION_17.toString()
}

buildFeatures {
buildConfig false
compose true
}

composeOptions {
kotlinCompilerExtensionVersion compose_compiler
}
namespace = "com.simform.ssjetpackcomposeprogressbuttonlibrary"
}

dependencies {

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation(libs.ui)
implementation(libs.material3)
testImplementation(libs.junit)
androidTestImplementation(libs.ext.junit)
androidTestImplementation(libs.espresso.core)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.simform.ssjetpackcomposeprogressbuttonlibrary">
<manifest >

</manifest>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.simform.ssjetpackcomposeprogressbuttonlibrary

import androidx.compose.foundation.layout.size
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.Icon
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.rotate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Button
import androidx.compose.material.ButtonColors
import androidx.compose.material.ButtonDefaults
import androidx.compose.material.ButtonElevation
import androidx.compose.material.Icon
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Done
import androidx.compose.material.icons.outlined.Info
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonColors
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.ButtonElevation
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -102,7 +102,7 @@ fun SSJetPackComposeProgressButton(
cornerRadius: Int = twenty,
speedMillis: Int = thousand,
enabled: Boolean = true,
elevation: ButtonElevation? = ButtonDefaults.elevation(),
elevation: ButtonElevation? = ButtonDefaults.elevatedButtonElevation(),
colors: ButtonColors = ButtonDefaults.buttonColors(),
padding: PaddingValues = PaddingValues(0.dp),
alphaValue: Float = 1f,
Expand Down