Skip to content

Commit

Permalink
Migrated to libs.versions.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthonyy232 committed Oct 11, 2024
1 parent 0a8a52e commit ea84410
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 74 deletions.
139 changes: 75 additions & 64 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import com.android.build.api.variant.FilterConfiguration

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp")
id("com.google.dagger.hilt.android")
id("com.mikepenz.aboutlibraries.plugin")
id("org.jetbrains.kotlin.plugin.serialization")
id("org.jetbrains.kotlin.plugin.compose")
id("androidx.baselineprofile")
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.kotlinCompose)
alias(libs.plugins.hiltAndroid)
alias(libs.plugins.ksp)
alias(libs.plugins.aboutLibraries)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.baselineProfile)
}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
Expand All @@ -31,6 +34,7 @@ android {
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand All @@ -39,12 +43,12 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "17"
}

buildFeatures {
Expand All @@ -53,16 +57,13 @@ android {
buildConfig = true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.15"
}

@Suppress("UnstableApiUsage")
androidResources {
generateLocaleConfig = true
}

ndkVersion = "26.3.11579264"
buildToolsVersion = "34.0.0"
ndkVersion = "28.0.12433566"
buildToolsVersion = "35.0.0"
dependenciesInfo {
includeInApk = false
includeInBundle = false
Expand All @@ -71,6 +72,16 @@ android {
aboutLibraries {
excludeFields = arrayOf("generated")
}

androidComponents {
onVariants { variant ->
variant.outputs.forEach { output ->
val abi = output.filters.find { it.filterType == FilterConfiguration.FilterType.ABI }?.identifier
val apkName = "paperize-v${output.versionName}-${abi ?: "universal"}.apk"
output.versionName.set(apkName)
}
}
}
}

androidComponents {
Expand All @@ -80,52 +91,52 @@ androidComponents {
}

dependencies {
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.6")
implementation("androidx.activity:activity-compose:1.9.2")
implementation(platform("androidx.compose:compose-bom:2024.09.03"))
implementation("androidx.compose.ui:ui:1.7.3")
implementation("androidx.compose.ui:ui-graphics:1.7.3")
implementation("androidx.compose.ui:ui-tooling-preview:1.7.3")
implementation("androidx.compose.material3:material3:1.3.0")
implementation("androidx.navigation:navigation-compose:2.8.2")
implementation("androidx.compose.material:material:1.7.3")
implementation("androidx.datastore:datastore:1.1.1")
implementation("androidx.datastore:datastore-preferences:1.1.1")
implementation("androidx.compose.material:material-icons-extended:1.7.3")
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
implementation("androidx.compose.animation:animation:1.7.3")
implementation("androidx.core:core-splashscreen:1.2.0-alpha02")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.6")
implementation("com.google.code.gson:gson:2.11.0")
implementation("androidx.documentfile:documentfile:1.1.0-alpha01")
implementation("net.engawapg.lib:zoomable:2.0.0-beta01")
implementation("com.github.skydoves:landscapist-glide:2.4.0")
implementation("androidx.work:work-runtime-ktx:2.10.0-beta01")
implementation("androidx.hilt:hilt-work:1.2.0")
implementation("com.airbnb.android:lottie-compose:6.5.2")
implementation("com.google.accompanist:accompanist-permissions:0.36.0")
implementation("com.mikepenz:aboutlibraries-core:11.2.3")
implementation("com.mikepenz:aboutlibraries-compose-m3:11.2.3")
implementation("androidx.compose.foundation:foundation:1.7.3")
implementation("com.github.nanihadesuka:LazyColumnScrollbar:2.2.0")
implementation("com.joaomgcd:taskerpluginlibrary:0.4.10")
implementation("com.google.ar.sceneform:filament-android:1.17.1")
implementation("androidx.profileinstaller:profileinstaller:1.4.1")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.7.3")
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)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.material)
implementation(libs.androidx.datastore)
implementation(libs.androidx.datastore.preferences)
implementation(libs.androidx.material.icons.extended)
implementation(libs.androidx.hilt.navigation.compose)
implementation(libs.androidx.animation)
implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.gson)
implementation(libs.androidx.documentfile)
implementation(libs.zoomable)
implementation(libs.landscapist.glide)
implementation(libs.androidx.work.runtime.ktx)
implementation(libs.androidx.hilt.work)
implementation(libs.lottie.compose)
implementation(libs.accompanist.permissions)
implementation(libs.aboutlibraries.core)
implementation(libs.aboutlibraries.compose.m3)
implementation(libs.androidx.foundation)
implementation(libs.lazycolumnscrollbar)
implementation(libs.taskerpluginlibrary)
implementation(libs.filament.android)
implementation(libs.androidx.profileinstaller)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.ui.test.junit4)
"baselineProfile"(project(":baselineprofile"))
debugImplementation("androidx.compose.ui:ui-tooling:1.7.3")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.7.3")
implementation("com.google.dagger:hilt-android:2.52")
ksp("com.google.dagger:hilt-android-compiler:2.52")
implementation("androidx.room:room-runtime:2.6.1")
ksp("androidx.room:room-compiler:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")
implementation("com.lazygeniouz:dfc:1.0.8")
implementation ("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
implementation("com.github.android:renderscript-intrinsics-replacement-toolkit:b6363490c3")
implementation("me.onebone:toolbar-compose:2.3.5")
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
implementation(libs.hilt.android)
ksp(libs.hilt.android.compiler)
implementation(libs.androidx.room.runtime)
ksp(libs.androidx.room.compiler)
implementation(libs.androidx.room.ktx)
implementation(libs.dfc)
implementation (libs.kotlinx.serialization.json)
implementation(libs.renderscript.intrinsics.replacement.toolkit)
implementation(libs.toolbar.compose)
}
22 changes: 12 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.gradle.kotlin.dsl.libs

buildscript {
repositories {
google()
Expand All @@ -6,16 +8,16 @@ buildscript {
}

plugins {
id("com.android.application") version "8.7.0" apply false
id("com.android.library") version "8.7.0" apply false
id("org.jetbrains.kotlin.android") version "2.0.21" apply false
id ("org.jetbrains.kotlin.plugin.compose") version "2.0.21" apply false
id("com.google.dagger.hilt.android") version "2.52" apply false
id("com.google.devtools.ksp") version "2.0.21-1.0.25" apply false
id ("com.mikepenz.aboutlibraries.plugin") version "11.2.3" apply false
id ("org.jetbrains.kotlin.plugin.serialization") version "2.0.21" apply false
id("com.android.test") version "8.7.0" apply false
id("androidx.baselineprofile") version "1.3.2" apply false
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.kotlinAndroid) apply false
alias(libs.plugins.kotlinCompose) apply false
alias(libs.plugins.hiltAndroid) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.aboutLibraries) apply false
alias(libs.plugins.kotlinSerialization) apply false
alias(libs.plugins.androidTest) apply false
alias(libs.plugins.baselineProfile) apply false
}


Expand Down
105 changes: 105 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
[versions]
androidGradlePlugin = "8.7.0"
kotlin = "2.0.21"
hilt = "2.52"
ksp = "2.0.21-1.0.25"
aboutLibraries = "11.2.3"
baselineProfile = "1.3.2"
accompanistPermissions = "0.36.0"
aboutlibrariesCore = "11.2.3"
activityCompose = "1.9.2"
animation = "1.7.3"
composeBom = "2024.09.03"
coreKtx = "1.13.1"
coreSplashscreen = "1.2.0-alpha02"
datastore = "1.1.1"
datastorePreferences = "1.1.1"
dfc = "1.0.8"
espressoCore = "3.6.1"
filamentAndroid = "1.17.1"
foundation = "1.7.3"
gson = "2.11.0"
documentfile = "1.1.0-alpha01"
hiltAndroid = "2.52"
hiltAndroidCompiler = "2.52"
hiltNavigationCompose = "1.2.0"
junit = "4.13.2"
junitVersion = "1.2.1"
kotlinxSerializationJson = "1.7.3"
landscapistGlide = "2.4.0"
lazycolumnscrollbar = "2.2.0"
lifecycleRuntimeKtx = "2.8.6"
lottieCompose = "6.5.2"
material = "1.7.3"
material3 = "1.3.0"
navigationCompose = "2.8.2"
profileinstaller = "1.4.1"
renderscriptIntrinsicsReplacementToolkit = "b6363490c3"
roomRuntime = "2.6.1"
roomCompiler = "2.6.1"
taskerpluginlibrary = "0.4.10"
toolbarCompose = "2.3.5"
ui = "1.7.3"
workRuntimeKtx = "2.10.0-beta01"
zoomable = "2.0.0-beta01"

[libraries]
aboutlibraries-compose-m3 = { module = "com.mikepenz:aboutlibraries-compose-m3", version.ref = "aboutlibrariesCore" }
aboutlibraries-core = { module = "com.mikepenz:aboutlibraries-core", version.ref = "aboutlibrariesCore" }
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanistPermissions" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
androidx-animation = { module = "androidx.compose.animation:animation", version.ref = "animation" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
androidx-datastore = { module = "androidx.datastore:datastore", version.ref = "datastore" }
androidx-documentfile = { module = "androidx.documentfile:documentfile", version.ref = "documentfile" }
androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
androidx-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "foundation" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigationCompose" }
androidx-hilt-work = { module = "androidx.hilt:hilt-work", version.ref = "hiltNavigationCompose" }
androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycleRuntimeKtx" }
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-material = { module = "androidx.compose.material:material", version.ref = "material" }
androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "material" }
androidx-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
androidx-profileinstaller = { module = "androidx.profileinstaller:profileinstaller", version.ref = "profileinstaller" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "roomRuntime" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomCompiler" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomRuntime" }
androidx-ui = { module = "androidx.compose.ui:ui", version.ref = "ui" }
androidx-ui-graphics = { module = "androidx.compose.ui:ui-graphics", version.ref = "ui" }
androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "ui" }
androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "ui" }
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "ui" }
androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "ui" }
androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" }
dfc = { module = "com.lazygeniouz:dfc", version.ref = "dfc" }
filament-android = { module = "com.google.ar.sceneform:filament-android", version.ref = "filamentAndroid" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hiltAndroidCompiler" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroid" }
junit = { module = "junit:junit", version.ref = "junit" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
landscapist-glide = { module = "com.github.skydoves:landscapist-glide", version.ref = "landscapistGlide" }
lazycolumnscrollbar = { module = "com.github.nanihadesuka:LazyColumnScrollbar", version.ref = "lazycolumnscrollbar" }
lottie-compose = { module = "com.airbnb.android:lottie-compose", version.ref = "lottieCompose" }
renderscript-intrinsics-replacement-toolkit = { module = "com.github.android:renderscript-intrinsics-replacement-toolkit", version.ref = "renderscriptIntrinsicsReplacementToolkit" }
taskerpluginlibrary = { module = "com.joaomgcd:taskerpluginlibrary", version.ref = "taskerpluginlibrary" }
toolbar-compose = { module = "me.onebone:toolbar-compose", version.ref = "toolbarCompose" }
zoomable = { module = "net.engawapg.lib:zoomable", version.ref = "zoomable" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "androidGradlePlugin" }
androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugin" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinCompose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
hiltAndroid = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutLibraries" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
androidTest = { id = "com.android.test", version.ref = "androidGradlePlugin" }
baselineProfile = { id = "androidx.baselineprofile", version.ref = "baselineProfile" }

0 comments on commit ea84410

Please sign in to comment.