Skip to content

Commit 572aa0a

Browse files
committed
Development commit
- Upgraded gradle plugin to 8.5.0. - Migrated build configuration files from Groovy to Kotlin. - Migrated build to version catalogs (libs.versions.toml). - Updated all internal dependencies.
1 parent e61c238 commit 572aa0a

12 files changed

+202
-90
lines changed

.idea/deploymentTargetSelector.xml

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

-60
This file was deleted.

app/build.gradle.kts

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
plugins {
2+
alias(libs.plugins.android.application)
3+
alias(libs.plugins.jetbrains.kotlin.android)
4+
alias(libs.plugins.compose.compiler)
5+
}
6+
7+
android {
8+
namespace = "com.bharathvishal.textfilegeneratorbenchmark"
9+
compileSdk = 34
10+
defaultConfig {
11+
applicationId = "com.bharathvishal.textfilegeneratorbenchmark"
12+
vectorDrawables {
13+
useSupportLibrary = true
14+
}
15+
minSdk = 23
16+
targetSdk = 34
17+
versionCode = 95
18+
versionName = "2.9"
19+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
20+
}
21+
buildFeatures {
22+
viewBinding = true
23+
compose = true
24+
}
25+
buildTypes {
26+
debug {
27+
isDebuggable = true
28+
isMinifyEnabled = true
29+
proguardFiles(
30+
getDefaultProguardFile("proguard-android-optimize.txt"),
31+
"proguard-rules.pro"
32+
)
33+
}
34+
release {
35+
isDebuggable = false
36+
isMinifyEnabled = true
37+
proguardFiles(
38+
getDefaultProguardFile("proguard-android-optimize.txt"),
39+
"proguard-rules.pro"
40+
)
41+
}
42+
}
43+
compileOptions {
44+
sourceCompatibility = JavaVersion.VERSION_17
45+
targetCompatibility = JavaVersion.VERSION_17
46+
}
47+
48+
kotlinOptions {
49+
jvmTarget = "17"
50+
}
51+
composeOptions {
52+
kotlinCompilerExtensionVersion = "1.5.14"
53+
}
54+
55+
packaging {
56+
jniLibs {
57+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
58+
}
59+
resources {
60+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
61+
}
62+
}
63+
}
64+
65+
dependencies {
66+
implementation(libs.androidx.appcompat)
67+
implementation(libs.jetbrains.kotlinx.couroutine)
68+
implementation(libs.coil.kt)
69+
implementation(libs.jetbrains.kotlin.stdlib)
70+
implementation(libs.google.android.material)
71+
implementation(libs.androidx.constraintlayout)
72+
testImplementation(libs.junit)
73+
implementation(libs.glide)
74+
annotationProcessor(libs.glide.compiler)
75+
androidTestImplementation(libs.androidx.espresso.core)
76+
implementation(libs.androidx.cardview)
77+
implementation(libs.androidx.compose.material3)
78+
implementation(libs.androidx.compose.material3.windowsize)
79+
implementation(libs.androidx.compose.material3.windowsize)
80+
implementation(libs.androidx.lifecycle.runtime.ktx)
81+
implementation(libs.androidx.activity.compose)
82+
androidTestImplementation(libs.androidx.ui.test.junit4)
83+
debugImplementation(libs.androidx.compose.ui.tooling)
84+
implementation(libs.androidx.compose.ui.tooling.preview)
85+
implementation(libs.androidx.core.core.splashscreen)
86+
implementation(libs.androidx.compose.material.material.icons)
87+
implementation(libs.google.accompanist.accompanist)
88+
}
89+
90+
91+
92+

app/proguard-rules.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Add project specific ProGuard rules here.
22
# You can control the set of applied configuration files using the
3-
# proguardFiles setting in build.gradle.
3+
# proguardFiles setting in build.gradle.kts.
44
#
55
# For more details, see
66
# http://developer.android.com/guide/developing/tools/proguard.html

app/src/main/java/com/bharathvishal/textfilegeneratorbenchmark/TextFileGeneratorFragment.kt

+5
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ class TextFileGeneratorFragment : Fragment(), CoroutineScope by MainScope() {
206206
var endNum: Int = endNum1
207207
var loopexecutionTimes = 0
208208

209+
@Deprecated("Deprecated in Java")
209210
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
210211
override fun doInBackground(vararg voids: Void): Void? {
211212
val context1 = contextRef.get()
@@ -304,6 +305,7 @@ class TextFileGeneratorFragment : Fragment(), CoroutineScope by MainScope() {
304305
}
305306

306307

308+
@Deprecated("Deprecated in Java")
307309
override fun onCancelled(result: Void?) {
308310
super.onCancelled(result)
309311
val context1 = contextRef.get()
@@ -366,6 +368,7 @@ class TextFileGeneratorFragment : Fragment(), CoroutineScope by MainScope() {
366368
}
367369
}
368370

371+
@Deprecated("Deprecated in Java")
369372
@SuppressLint("SetTextI18n")
370373
override fun onPostExecute(aVoid: Void?) {
371374
super.onPostExecute(aVoid)
@@ -430,11 +433,13 @@ class TextFileGeneratorFragment : Fragment(), CoroutineScope by MainScope() {
430433
cancel(true)
431434
}
432435

436+
@Deprecated("Deprecated in Java")
433437
override fun onProgressUpdate(vararg progress: Int?) {
434438
super.onProgressUpdate(*progress)
435439
benchMarkProgress?.setMessage("Generating files, Please wait \nProgress : $filesAlreadyPresent/$totalCount")
436440
}
437441

442+
@Deprecated("Deprecated in Java")
438443
override fun onPreExecute() {
439444
val context1 = contextRef.get()
440445

build.gradle

-26
This file was deleted.

build.gradle.kts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
plugins {
3+
alias(libs.plugins.android.application) apply false
4+
alias(libs.plugins.jetbrains.kotlin.android) apply false
5+
alias(libs.plugins.compose.compiler) apply false
6+
}

gradle/libs.versions.toml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[versions]
2+
agp = "8.5.0"
3+
appCompatVer="1.7.0"
4+
kotlinxCoroutinesVer="1.7.3"
5+
coilVer="2.6.0"
6+
kotlinVer = "2.0.0"
7+
materialVer = "1.12.0"
8+
constraintlayoutVer="2.1.4"
9+
coreKtxVer = "1.13.1"
10+
glideVer="4.16.0"
11+
cardViewVer="1.0.0"
12+
compose3MaterialVer="1.2.1"
13+
lifecycleRuntimeKtxVer="2.8.2"
14+
activityComposeVer="1.9.0"
15+
composeUItestVer="1.6.8"
16+
uitoolingVer="1.6.8"
17+
uitoolingpreviewVer="1.6.8"
18+
splashScreenVer="1.0.1"
19+
junitVersion = "4.13.2"
20+
materialiconsVer="1.6.8"
21+
espressoCoreVer = "3.6.1"
22+
accompanistVer = "0.28.0"
23+
24+
25+
[libraries]
26+
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appCompatVer" }
27+
jetbrains-kotlinx-couroutine = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesVer" }
28+
coil-kt = { group = "io.coil-kt", name = "coil-compose", version.ref = "coilVer" }
29+
jetbrains-kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlinVer" }
30+
google-android-material = { group = "com.google.android.material", name = "material", version.ref = "materialVer" }
31+
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayoutVer" }
32+
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtxVer" }
33+
junit = { group = "junit", name = "junit", version.ref = "junitVersion" }
34+
glide = { group = "com.github.bumptech.glide", name = "glide", version.ref = "glideVer" }
35+
glide-compiler = { group = "com.github.bumptech.glide", name = "compiler", version.ref = "glideVer" }
36+
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCoreVer" }
37+
androidx-cardview = { group = "androidx.cardview", name = "cardview", version.ref = "cardViewVer" }
38+
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "compose3MaterialVer" }
39+
androidx-compose-material3-windowsize= { group = "androidx.compose.material3", name = "material3-window-size-class", version.ref = "compose3MaterialVer" }
40+
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtxVer" }
41+
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityComposeVer" }
42+
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4",version.ref="composeUItestVer" }
43+
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name="ui-tooling",version.ref = "uitoolingVer" }
44+
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name="ui-tooling-preview",version.ref = "uitoolingpreviewVer" }
45+
androidx-core-core-splashscreen= { group = "androidx.core", name = "core-splashscreen",version.ref="splashScreenVer" }
46+
androidx-compose-material-material-icons = { group = "androidx.compose.material", name = "material-icons-extended", version.ref = "materialiconsVer" }
47+
google-accompanist-accompanist = { group = "com.google.accompanist", name = "accompanist-systemuicontroller", version.ref = "accompanistVer" }
48+
49+
[plugins]
50+
android-application = { id = "com.android.application", version.ref = "agp" }
51+
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVer" }
52+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlinVer" }
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Wed Feb 08 17:57:03 IST 2023
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle

-1
This file was deleted.

settings.gradle.kts

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
}
14+
dependencyResolutionManagement {
15+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
16+
repositories {
17+
google()
18+
mavenCentral()
19+
maven {
20+
setUrl("https://jitpack.io")
21+
}
22+
}
23+
}
24+
25+
rootProject.name = "Text-File-Generator-Benchmark-for-Android"
26+
include(":app")

0 commit comments

Comments
 (0)