Skip to content

Commit

Permalink
Development commit
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
BharathVishal committed Jun 29, 2024
1 parent e61c238 commit 572aa0a
Show file tree
Hide file tree
Showing 12 changed files with 202 additions and 90 deletions.
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.

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.

60 changes: 0 additions & 60 deletions app/build.gradle

This file was deleted.

92 changes: 92 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.compose.compiler)
}

android {
namespace = "com.bharathvishal.textfilegeneratorbenchmark"
compileSdk = 34
defaultConfig {
applicationId = "com.bharathvishal.textfilegeneratorbenchmark"
vectorDrawables {
useSupportLibrary = true
}
minSdk = 23
targetSdk = 34
versionCode = 95
versionName = "2.9"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
viewBinding = true
compose = true
}
buildTypes {
debug {
isDebuggable = true
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
release {
isDebuggable = false
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "17"
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.14"
}

packaging {
jniLibs {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

dependencies {
implementation(libs.androidx.appcompat)
implementation(libs.jetbrains.kotlinx.couroutine)
implementation(libs.coil.kt)
implementation(libs.jetbrains.kotlin.stdlib)
implementation(libs.google.android.material)
implementation(libs.androidx.constraintlayout)
testImplementation(libs.junit)
implementation(libs.glide)
annotationProcessor(libs.glide.compiler)
androidTestImplementation(libs.androidx.espresso.core)
implementation(libs.androidx.cardview)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material3.windowsize)
implementation(libs.androidx.compose.material3.windowsize)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.core.core.splashscreen)
implementation(libs.androidx.compose.material.material.icons)
implementation(libs.google.accompanist.accompanist)
}




2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ class TextFileGeneratorFragment : Fragment(), CoroutineScope by MainScope() {
var endNum: Int = endNum1
var loopexecutionTimes = 0

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


@Deprecated("Deprecated in Java")
override fun onCancelled(result: Void?) {
super.onCancelled(result)
val context1 = contextRef.get()
Expand Down Expand Up @@ -366,6 +368,7 @@ class TextFileGeneratorFragment : Fragment(), CoroutineScope by MainScope() {
}
}

@Deprecated("Deprecated in Java")
@SuppressLint("SetTextI18n")
override fun onPostExecute(aVoid: Void?) {
super.onPostExecute(aVoid)
Expand Down Expand Up @@ -430,11 +433,13 @@ class TextFileGeneratorFragment : Fragment(), CoroutineScope by MainScope() {
cancel(true)
}

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

@Deprecated("Deprecated in Java")
override fun onPreExecute() {
val context1 = contextRef.get()

Expand Down
26 changes: 0 additions & 26 deletions build.gradle

This file was deleted.

6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.compose.compiler) apply false
}
52 changes: 52 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[versions]
agp = "8.5.0"
appCompatVer="1.7.0"
kotlinxCoroutinesVer="1.7.3"
coilVer="2.6.0"
kotlinVer = "2.0.0"
materialVer = "1.12.0"
constraintlayoutVer="2.1.4"
coreKtxVer = "1.13.1"
glideVer="4.16.0"
cardViewVer="1.0.0"
compose3MaterialVer="1.2.1"
lifecycleRuntimeKtxVer="2.8.2"
activityComposeVer="1.9.0"
composeUItestVer="1.6.8"
uitoolingVer="1.6.8"
uitoolingpreviewVer="1.6.8"
splashScreenVer="1.0.1"
junitVersion = "4.13.2"
materialiconsVer="1.6.8"
espressoCoreVer = "3.6.1"
accompanistVer = "0.28.0"


[libraries]
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appCompatVer" }
jetbrains-kotlinx-couroutine = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesVer" }
coil-kt = { group = "io.coil-kt", name = "coil-compose", version.ref = "coilVer" }
jetbrains-kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlinVer" }
google-android-material = { group = "com.google.android.material", name = "material", version.ref = "materialVer" }
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayoutVer" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtxVer" }
junit = { group = "junit", name = "junit", version.ref = "junitVersion" }
glide = { group = "com.github.bumptech.glide", name = "glide", version.ref = "glideVer" }
glide-compiler = { group = "com.github.bumptech.glide", name = "compiler", version.ref = "glideVer" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCoreVer" }
androidx-cardview = { group = "androidx.cardview", name = "cardview", version.ref = "cardViewVer" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "compose3MaterialVer" }
androidx-compose-material3-windowsize= { group = "androidx.compose.material3", name = "material3-window-size-class", version.ref = "compose3MaterialVer" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtxVer" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityComposeVer" }
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4",version.ref="composeUItestVer" }
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name="ui-tooling",version.ref = "uitoolingVer" }
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name="ui-tooling-preview",version.ref = "uitoolingpreviewVer" }
androidx-core-core-splashscreen= { group = "androidx.core", name = "core-splashscreen",version.ref="splashScreenVer" }
androidx-compose-material-material-icons = { group = "androidx.compose.material", name = "material-icons-extended", version.ref = "materialiconsVer" }
google-accompanist-accompanist = { group = "com.google.accompanist", name = "accompanist-systemuicontroller", version.ref = "accompanistVer" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVer" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlinVer" }
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 @@
#Wed Feb 08 17:57:03 IST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

26 changes: 26 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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()
maven {
setUrl("https://jitpack.io")
}
}
}

rootProject.name = "Text-File-Generator-Benchmark-for-Android"
include(":app")

0 comments on commit 572aa0a

Please sign in to comment.