Skip to content

Commit 3654118

Browse files
⚡ Upgrade dependencies and gradle versions
1 parent 19b7a1f commit 3654118

11 files changed

Lines changed: 199 additions & 105 deletions

File tree

app/build.gradle

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
plugins {
2-
id 'com.android.application'
3-
id 'kotlin-android'
2+
alias(libs.plugins.android.application)
3+
alias(libs.plugins.kotlin.android)
4+
alias(libs.plugins.compose.compiler)
45
}
56

67
android {
7-
compileSdk 34
8+
compileSdk libs.versions.compileSdk.get().toInteger()
89

910
defaultConfig {
1011
applicationId "com.simform.ssjetpackcomposeprogressbutton"
11-
minSdk 21
12-
targetSdk 34
12+
minSdk libs.versions.minSdk.get().toInteger()
13+
targetSdk libs.versions.targetSdk.get().toInteger()
1314
versionCode 2
1415
versionName "1.0.7"
1516

@@ -30,22 +31,20 @@ android {
3031
targetCompatibility JavaVersion.VERSION_17
3132
}
3233
kotlinOptions {
33-
jvmTarget = '17'
34+
jvmTarget = JavaVersion.VERSION_17.toString()
3435
}
3536
buildFeatures {
3637
compose true
3738
}
38-
composeOptions {
39-
kotlinCompilerExtensionVersion compose_compiler
40-
}
39+
namespace = "com.simform.ssjetpackcomposeprogressbutton"
4140
}
4241

4342
dependencies {
44-
implementation 'androidx.appcompat:appcompat:1.6.1'
45-
implementation 'com.google.android.material:material:1.11.0'
46-
implementation "androidx.compose.ui:ui:1.5.4"
47-
implementation "androidx.compose.material:material:$compose_version"
48-
implementation "androidx.compose.ui:ui-tooling:$compose_version"
49-
implementation 'androidx.activity:activity-compose:1.8.2'
43+
implementation(libs.appcompat)
44+
implementation(libs.ui)
45+
implementation(libs.material3)
46+
implementation(libs.ui.tooling)
47+
implementation(libs.activity.compose)
48+
implementation(libs.material)
5049
implementation project(path: ':ssjetpackcomposeprogressbutton')
5150
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.simform.ssjetpackcomposeprogressbutton">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

app/src/main/java/com/simform/ssjetpackcomposeprogressbutton/MainActivity.kt

Lines changed: 107 additions & 35 deletions
Large diffs are not rendered by default.

build.gradle

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
1-
buildscript {
2-
ext {
3-
compose_version = '1.5.4'
4-
compose_compiler = '1.3.1'
5-
}
6-
repositories {
7-
google()
8-
mavenCentral()
9-
}
10-
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.4.2'
12-
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10'
13-
}
14-
configurations {
15-
configureEach {
16-
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
17-
}
18-
}
19-
}
20-
21-
tasks.register('clean', Delete) {
22-
delete rootProject.buildDir
1+
plugins {
2+
alias(libs.plugins.android.application) apply false
3+
alias(libs.plugins.android.library) apply false
4+
alias(libs.plugins.kotlin.android) apply false
5+
alias(libs.plugins.compose.compiler) apply false
236
}

gradle/libs.versions.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[versions]
2+
activityCompose = "1.9.2"
3+
appcompat = "1.7.0"
4+
espressoCore = "3.6.1"
5+
junit = "4.13.2"
6+
junitVersion = "1.2.1"
7+
material = "1.12.0"
8+
material3 = "1.3.0"
9+
ui = "1.7.2"
10+
androidGradlePlugin = "8.4.2"
11+
kotlinPlugin = "2.0.0"
12+
# Target Sdk's version
13+
compileSdk = "34"
14+
targetSdk = "34"
15+
minSdk = "21"
16+
17+
[libraries]
18+
activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
19+
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
20+
espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
21+
ext-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
22+
junit = { module = "junit:junit", version.ref = "junit" }
23+
material = { module = "com.google.android.material:material", version.ref = "material" }
24+
material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }
25+
ui = { module = "androidx.compose.ui:ui", version.ref = "ui" }
26+
ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "ui" }
27+
28+
[plugins]
29+
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
30+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinPlugin" }
31+
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
32+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlinPlugin" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Thu May 06 09:44:53 IST 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1+
pluginManagement {
2+
repositories {
3+
google {
4+
content {
5+
includeGroupByRegex("com\\.android.*")
6+
includeGroupByRegex("com\\.google.*")
7+
includeGroupByRegex("androidx.*")
8+
}
9+
}
10+
mavenCentral()
11+
gradlePluginPortal()
12+
}
13+
}
114
dependencyResolutionManagement {
215
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
316
repositories {
4-
google()
517
mavenCentral()
18+
google()
619
maven { url 'https://jitpack.io' }
720
}
821
}
922
rootProject.name = "SSJetPackComposeProgressButton"
10-
include ':app'
11-
include ':ssjetpackcomposeprogressbutton'
23+
include(":app", ":ssjetpackcomposeprogressbutton")

ssjetpackcomposeprogressbutton/build.gradle

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
plugins {
2-
id 'com.android.library'
3-
id 'kotlin-android'
4-
id 'maven-publish'
2+
alias(libs.plugins.kotlin.android)
3+
alias(libs.plugins.android.library)
4+
alias(libs.plugins.compose.compiler)
5+
id("maven-publish")
56
}
67

78
afterEvaluate {
@@ -19,11 +20,11 @@ afterEvaluate {
1920
}
2021

2122
android {
22-
compileSdk 34
23+
compileSdk libs.versions.compileSdk.get().toInteger()
2324

2425
defaultConfig {
25-
minSdk 21
26-
targetSdk 34
26+
minSdk libs.versions.minSdk.get().toInteger()
27+
targetSdk libs.versions.targetSdk.get().toInteger()
2728

2829
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2930
consumerProguardFiles "consumer-rules.pro"
@@ -42,24 +43,20 @@ android {
4243
}
4344

4445
kotlinOptions {
45-
jvmTarget = '17'
46+
jvmTarget = JavaVersion.VERSION_17.toString()
4647
}
4748

4849
buildFeatures {
4950
buildConfig false
5051
compose true
5152
}
52-
53-
composeOptions {
54-
kotlinCompilerExtensionVersion compose_compiler
55-
}
53+
namespace = "com.simform.ssjetpackcomposeprogressbuttonlibrary"
5654
}
5755

5856
dependencies {
59-
60-
testImplementation 'junit:junit:4.13.2'
61-
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
62-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
63-
implementation "androidx.compose.ui:ui:$compose_version"
64-
implementation "androidx.compose.material:material:$compose_version"
57+
implementation(libs.ui)
58+
implementation(libs.material3)
59+
testImplementation(libs.junit)
60+
androidTestImplementation(libs.ext.junit)
61+
androidTestImplementation(libs.espresso.core)
6562
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="com.simform.ssjetpackcomposeprogressbuttonlibrary">
2+
<manifest >
33

44
</manifest>

ssjetpackcomposeprogressbutton/src/main/java/com/simform/ssjetpackcomposeprogressbuttonlibrary/PrintLoadingBar.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.simform.ssjetpackcomposeprogressbuttonlibrary
22

33
import androidx.compose.foundation.layout.size
4-
import androidx.compose.material.CircularProgressIndicator
5-
import androidx.compose.material.Icon
4+
import androidx.compose.material3.CircularProgressIndicator
5+
import androidx.compose.material3.Icon
66
import androidx.compose.runtime.Composable
77
import androidx.compose.ui.Modifier
88
import androidx.compose.ui.draw.rotate

0 commit comments

Comments
 (0)