mirror of
https://github.com/recloudstream/cloudstream.git
synced 2026-03-13 15:19:43 +08:00
Use version catalog for plugins (#2206)
This commit is contained in:
@@ -6,9 +6,9 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
id("org.jetbrains.dokka")
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.dokka)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
val javaTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath(libs.android.gradle.plugin)
|
||||
classpath(libs.buildkonfig.gradle.plugin) // Universal build config
|
||||
classpath(libs.dokka.gradle.plugin)
|
||||
classpath(libs.kotlin.gradle.plugin)
|
||||
}
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.android.library) apply false
|
||||
alias(libs.plugins.buildkonfig) apply false // Universal build config
|
||||
alias(libs.plugins.dokka) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.kotlin.jvm) apply false
|
||||
alias(libs.plugins.kotlin.multiplatform) apply false
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven("https://jitpack.io")
|
||||
}
|
||||
|
||||
// https://docs.gradle.org/current/userguide/upgrading_major_version_9.html#test_task_fails_when_no_tests_are_discovered
|
||||
tasks.withType<AbstractTestTask>().configureEach {
|
||||
failOnNoDiscoveredTests = false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.dokka")
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.dokka)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -10,4 +10,4 @@ dependencies {
|
||||
|
||||
dokka {
|
||||
moduleName = "Cloudstream"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# https://docs.gradle.org/current/userguide/plugins.html#sec:version_catalog_plugin_application
|
||||
# https://docs.gradle.org/current/userguide/dependency_versions.html#sec:strict-version
|
||||
[versions]
|
||||
activityKtx = "1.11.0"
|
||||
androidGradlePlugin = "8.13.1"
|
||||
@@ -54,10 +56,8 @@ targetSdk = "36"
|
||||
|
||||
[libraries]
|
||||
activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activityKtx" }
|
||||
android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }
|
||||
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
|
||||
biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" }
|
||||
buildkonfig-gradle-plugin = { module = "com.codingfeline.buildkonfig:buildkonfig-gradle-plugin", version.ref = "buildkonfigGradlePlugin" }
|
||||
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
|
||||
coil-network-okhttp = { module = "io.coil-kt.coil3:coil-network-okhttp", version.ref = "coil" }
|
||||
colorpicker = { module = "com.github.recloudstream:color-picker-android", version.ref = "colorpicker" }
|
||||
@@ -67,7 +67,6 @@ core = { module = "androidx.test:core" }
|
||||
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
|
||||
databinding = { module = "androidx.databinding:viewbinding", version.ref = "androidGradlePlugin" }
|
||||
desugar_jdk_libs_nio = { module = "com.android.tools:desugar_jdk_libs_nio", version.ref = "desugar_jdk_libs_nio" }
|
||||
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokkaGradlePlugin" }
|
||||
espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" }
|
||||
ext-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" }
|
||||
fuzzywuzzy = { module = "me.xdrop:fuzzywuzzy", version.ref = "fuzzywuzzy" }
|
||||
@@ -77,7 +76,6 @@ jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" }
|
||||
junit = { module = "junit:junit", version.ref = "junit" }
|
||||
junit-ktx = { module = "androidx.test.ext:junit-ktx", version.ref = "junitKtx" }
|
||||
juniversalchardet = { module = "com.github.albfernandez:juniversalchardet", version.ref = "juniversalchardet" }
|
||||
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinGradlePlugin" }
|
||||
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }
|
||||
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
|
||||
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
||||
@@ -116,6 +114,13 @@ work-runtime = { module = "androidx.work:work-runtime", version.ref = "workRunti
|
||||
work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" }
|
||||
|
||||
[plugins]
|
||||
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
|
||||
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
|
||||
buildkonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildkonfigGradlePlugin" }
|
||||
dokka = { id = "org.jetbrains.dokka", version.ref = "dokkaGradlePlugin" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinGradlePlugin" }
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm" , version.ref = "kotlinGradlePlugin" }
|
||||
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlinGradlePlugin" }
|
||||
|
||||
[bundles]
|
||||
media3 = ["media3-cast", "media3-common", "media3-container", "media3-datasource-cronet", "media3-datasource-okhttp", "media3-exoplayer", "media3-exoplayer-dash", "media3-exoplayer-hls", "media3-session", "media3-ui"]
|
||||
|
||||
@@ -6,11 +6,11 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("maven-publish")
|
||||
id("com.android.library")
|
||||
id("com.codingfeline.buildkonfig")
|
||||
id("org.jetbrains.dokka")
|
||||
id("maven-publish") // Gradle core plugin
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.buildkonfig)
|
||||
alias(libs.plugins.dokka)
|
||||
}
|
||||
|
||||
val javaTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
||||
@@ -125,4 +125,4 @@ dokka {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
rootProject.name = "CloudStream"
|
||||
// https://developer.android.com/build#settings-file
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
include(":app")
|
||||
include(":library")
|
||||
include(":docs")
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven("https://jitpack.io")
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "CloudStream"
|
||||
include(":app", ":library", ":docs")
|
||||
|
||||
Reference in New Issue
Block a user