Skip to content

Commit

Permalink
[build] Migrate build to version catalogs
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyD666 committed Sep 11, 2024
1 parent 98bd09a commit 1886800
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 72 deletions.
136 changes: 70 additions & 66 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import com.android.build.api.variant.FilterConfiguration
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
id("kotlinx-serialization")
id("kotlin-parcelize")
id("com.google.devtools.ksp")
id("com.google.dagger.hilt.android")
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.kotlin.plugin.compose)
alias(libs.plugins.kotlin.plugin.serialization)
alias(libs.plugins.hilt)
alias(libs.plugins.ksp)
}

apply(from = "../secret.gradle.kts")
Expand Down Expand Up @@ -159,69 +159,73 @@ tasks.withType(KotlinCompile::class.java).configureEach {

dependencies {

implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("androidx.activity:activity-ktx:1.9.2")
implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-beta01")
implementation("androidx.navigation:navigation-compose:2.8.0")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.5")
implementation("androidx.compose.ui:ui:1.7.0")
implementation("androidx.compose.material:material:1.7.0")
implementation("androidx.compose.material3:material3:1.3.0")
implementation("androidx.compose.material3:material3-window-size-class:1.3.0")
implementation("androidx.compose.material3.adaptive:adaptive:1.0.0")
implementation("androidx.compose.material3.adaptive:adaptive-layout:1.0.0")
implementation("androidx.compose.material3.adaptive:adaptive-navigation:1.0.0")
implementation("androidx.compose.material:material-icons-extended:1.7.0")
implementation("com.materialkolor:material-kolor:1.7.0")
implementation("androidx.room:room-runtime:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")
implementation("androidx.room:room-paging:2.6.1")
ksp("androidx.room:room-compiler:2.6.1")
implementation("androidx.work:work-runtime-ktx:2.9.1")
implementation("androidx.datastore:datastore-preferences:1.1.1")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation("androidx.paging:paging-compose:3.3.2")

implementation("com.google.android.material:material:1.12.0")
implementation("com.google.accompanist:accompanist-permissions:0.36.0")

implementation("com.google.dagger:hilt-android:2.52")
ksp("com.google.dagger:hilt-android-compiler:2.52")
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
implementation("androidx.profileinstaller:profileinstaller:1.3.1")

implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.squareup.okhttp3:okhttp-coroutines-jvm:5.0.0-alpha.12")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
implementation("com.squareup.retrofit2:retrofit:2.11.0")
implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.8.1")

implementation("com.github.aniyomiorg:aniyomi-mpv-lib:1.15.n")
implementation("com.github.jmir1:ffmpeg-kit:1.15")

implementation("io.coil-kt:coil-compose:2.7.0")
implementation("io.coil-kt:coil-gif:2.7.0")
implementation("io.coil-kt:coil-svg:2.7.0")
implementation("io.coil-kt:coil-video:2.7.0")
implementation("com.airbnb.android:lottie-compose:6.5.2")
implementation("com.rometools:rome:2.1.0")
implementation("com.rometools:rome-modules:2.1.0")
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.constraintlayout.compose)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.material)
implementation(libs.androidx.compose.icons)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.window.size)
implementation(libs.androidx.compose.adaptive)
implementation(libs.androidx.compose.adaptive.layout)
implementation(libs.androidx.compose.adaptive.navigation)
implementation(libs.androidx.room.runtime)
implementation(libs.androidx.room.ktx)
implementation(libs.androidx.room.paging)
ksp(libs.androidx.room.compiler)
implementation(libs.androidx.work.runtime.ktx)
implementation(libs.androidx.datastore.preferences)
implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.paging.compose)
implementation(libs.androidx.hilt.navigation.compose)
implementation(libs.androidx.profileinstaller)

implementation(libs.material)
implementation(libs.material.kolor)
implementation(libs.accompanist.permissions)

implementation(libs.hilt.android)
ksp(libs.hilt.android.compiler)

implementation(libs.okhttp3)
implementation(libs.okhttp3.coroutines.jvm)
implementation(libs.okhttp3.logging)
implementation(libs.retrofit2)
implementation(libs.retrofit2.kotlinx.serialization.converter)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.coroutines.guava)

implementation(libs.aniyomi.mpv.lib)
implementation(libs.ffmpeg.kit)

implementation(libs.coil.compose)
implementation(libs.coil.gif)
implementation(libs.coil.svg)
implementation(libs.coil.video)

implementation(libs.lottie.compose)

implementation(libs.rome)
implementation(libs.rome.modules)
implementation("be.ceau:opml-parser:3.1.0") {
exclude(group = "net.sf.kxml", module = "kxml2")
}
implementation("net.dankito.readability4j:readability4j:1.0.8")
implementation("sh.calvin.reorderable:reorderable:2.3.2")

implementation("org.libtorrent4j:libtorrent4j-android-arm64:2.1.0-31")
implementation("org.libtorrent4j:libtorrent4j-android-arm:2.1.0-31")
implementation("org.libtorrent4j:libtorrent4j-android-x86:2.1.0-31")
implementation("org.libtorrent4j:libtorrent4j-android-x86_64:2.1.0-31")
implementation(libs.readability4j)

implementation(libs.reorderable)

implementation(libs.libtorrent4j.arm64)
implementation(libs.libtorrent4j.arm)
implementation(libs.libtorrent4j.x86)
implementation(libs.libtorrent4j.x8664)

// debugImplementation("com.squareup.leakcanary:leakcanary-android:2.13")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
}
13 changes: 7 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.5.2" apply false
id("org.jetbrains.kotlin.android") version "2.0.20" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.0.20"
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.20"
id("com.google.dagger.hilt.android") version "2.51.1" apply false
id("com.google.devtools.ksp") version "2.0.20-1.0.24" apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.kotlin.plugin.compose)
alias(libs.plugins.kotlin.plugin.serialization)
alias(libs.plugins.hilt) apply false
alias(libs.plugins.ksp) apply false
}
88 changes: 88 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[versions]
adaptive = "1.0.0"
coil = "2.7.0"
hilt = "2.52"
libtorrent4j = "2.1.0-31"
composeMaterial = "1.7.1"
composeMaterial3 = "1.3.0"
okhttp3 = "4.12.0"
rome = "2.1.0"
room = "2.6.1"

kotlin = "2.0.20"

[libraries]
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.13.1" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.7.0" }
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version = "1.9.2" }
androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version = "1.1.0-beta01" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version = "2.8.0" }
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version = "2.8.5" }
androidx-compose-ui = { module = "androidx.compose.ui:ui", version = "1.7.1" }
androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "composeMaterial" }
androidx-compose-icons = { module = "androidx.compose.material:material-icons-extended", version.ref = "composeMaterial" }
androidx-compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "composeMaterial3" }
androidx-compose-window-size = { module = "androidx.compose.material3:material3-window-size-class", version.ref = "composeMaterial3" }
androidx-compose-adaptive = { module = "androidx.compose.material3.adaptive:adaptive", version.ref = "adaptive" }
androidx-compose-adaptive-layout = { module = "androidx.compose.material3.adaptive:adaptive-layout", version.ref = "adaptive" }
androidx-compose-adaptive-navigation = { module = "androidx.compose.material3.adaptive:adaptive-navigation", version.ref = "adaptive" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" }
androidx-room-paging = { module = "androidx.room:room-paging", version.ref = "room" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version = "2.9.1" }
androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version = "1.1.1" }
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version = "1.0.1" }
androidx-paging-compose = { module = "androidx.paging:paging-compose", version = "3.3.2" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version = "1.2.0" }
androidx-profileinstaller = { module = "androidx.profileinstaller:profileinstaller", version = "1.3.1" }

material = { module = "com.google.android.material:material", version = "1.12.0" }
material-kolor = { module = "com.materialkolor:material-kolor", version = "1.7.0" }
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version = "0.36.0" }

hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
hilt-android-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" }

okhttp3 = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp3" }
okhttp3-coroutines-jvm = { module = "com.squareup.okhttp3:okhttp-coroutines-jvm", version = "5.0.0-alpha.12" }
okhttp3-logging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp3" }
retrofit2 = { module = "com.squareup.retrofit2:retrofit", version = "2.11.0" }
retrofit2-kotlinx-serialization-converter = { module = "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter", version = "1.0.0" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.7.2" }
kotlinx-coroutines-guava = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-guava", version = "1.8.1" }

aniyomi-mpv-lib = { module = "com.github.aniyomiorg:aniyomi-mpv-lib", version = "1.15.n" }
ffmpeg-kit = { module = "com.github.jmir1:ffmpeg-kit", version = "1.15" }

coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
coil-gif = { module = "io.coil-kt:coil-gif", version.ref = "coil" }
coil-svg = { module = "io.coil-kt:coil-svg", version.ref = "coil" }
coil-video = { module = "io.coil-kt:coil-video", version.ref = "coil" }

lottie-compose = { module = "com.airbnb.android:lottie-compose", version = "6.5.2" }

rome = { module = "com.rometools:rome", version.ref = "rome" }
rome-modules = { module = "com.rometools:rome-modules", version.ref = "rome" }

readability4j = { module = "net.dankito.readability4j:readability4j", version = "1.0.8" }

reorderable = { module = "sh.calvin.reorderable:reorderable", version = "2.3.2" }

libtorrent4j-arm64 = { module = "org.libtorrent4j:libtorrent4j-android-arm64", version.ref = "libtorrent4j" }
libtorrent4j-arm = { module = "org.libtorrent4j:libtorrent4j-android-arm", version.ref = "libtorrent4j" }
libtorrent4j-x86 = { module = "org.libtorrent4j:libtorrent4j-android-x86", version.ref = "libtorrent4j" }
libtorrent4j-x8664 = { module = "org.libtorrent4j:libtorrent4j-android-x86_64", version.ref = "libtorrent4j" }

junit = { module = "junit:junit", version = "4.13.2" }
androidx-junit = { module = "androidx.test.ext:junit", version = "1.2.1" }
androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version = "3.6.1" }

[plugins]
android-application = { id = "com.android.application", version = "8.5.2" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-plugin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
hilt = { id = "com.google.dagger.hilt.android", version = "2.51.1" }
ksp = { id = "com.google.devtools.ksp", version = "2.0.20-1.0.24" }

0 comments on commit 1886800

Please sign in to comment.