mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2026-10-26 16:45:23 +00:00
Move Gradle plugins to plugin catalog (#1296)
* Move Gradle plugins to plugin catalog * Fix linter config for playback module
This commit is contained in:
1 parent
20138f2d38
commit
ced03b82de
7 files changed
+65
-65
No files matched your search
@@ -1,16 +1,15 @@
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
kotlin("plugin.serialization") version Plugins.Versions.kotlin
|
||||
kotlin("kapt")
|
||||
id("com.mikepenz.aboutlibraries.plugin")
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
alias(libs.plugins.aboutlibraries)
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = 30
|
||||
|
||||
defaultConfig {
|
||||
// Android version targets
|
||||
minSdk = 21
|
||||
targetSdk = 30
|
||||
|
||||
|
||||
+3
-12
@@ -1,23 +1,14 @@
|
||||
plugins {
|
||||
id("io.gitlab.arturbosch.detekt").version(Plugins.Versions.detekt)
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories.defaultRepositories()
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories.defaultRepositories()
|
||||
|
||||
dependencies {
|
||||
classpath(Plugins.androidBuildTools)
|
||||
classpath(Plugins.kotlin)
|
||||
classpath(Plugins.aboutLibraries)
|
||||
classpath(libs.android.gradle)
|
||||
classpath(libs.kotlin.gradle)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Detekt configuration
|
||||
subprojects {
|
||||
apply<io.gitlab.arturbosch.detekt.DetektPlugin>()
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
import org.gradle.api.artifacts.dsl.RepositoryHandler
|
||||
import org.gradle.kotlin.dsl.maven
|
||||
|
||||
fun RepositoryHandler.defaultRepositories() {
|
||||
mavenCentral()
|
||||
google()
|
||||
|
||||
// Jellyfin SDK
|
||||
mavenLocal {
|
||||
content {
|
||||
includeVersionByRegex("org.jellyfin.sdk", ".*", "latest-SNAPSHOT")
|
||||
}
|
||||
}
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
|
||||
content {
|
||||
includeVersionByRegex("org.jellyfin.sdk", ".*", "master-SNAPSHOT")
|
||||
includeVersionByRegex("org.jellyfin.sdk", ".*", "openapi-unstable-SNAPSHOT")
|
||||
}
|
||||
}
|
||||
|
||||
// Jellyfin apiclient
|
||||
maven("https://jitpack.io") {
|
||||
content {
|
||||
// Only allow legacy apiclient
|
||||
includeVersionByRegex("com.github.jellyfin.jellyfin-sdk-kotlin", ".*", "v0.7.10")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
object Plugins {
|
||||
object Versions {
|
||||
const val kotlin = "1.5.10"
|
||||
const val detekt = "1.17.1"
|
||||
const val androidBuildTools = "7.0.2"
|
||||
const val aboutlibraries = "8.9.3"
|
||||
}
|
||||
|
||||
const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
|
||||
const val androidBuildTools = "com.android.tools.build:gradle:${Versions.androidBuildTools}"
|
||||
const val aboutLibraries = "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${Versions.aboutlibraries}"
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# Gradle
|
||||
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m
|
||||
org.gradle.jvmargs=-Xmx2048m
|
||||
|
||||
# Allow switching between flavors of the Jellyfin SDK. Possible values are:
|
||||
# - "default"
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
[versions]
|
||||
kotlinx-coroutines = "1.4.3"
|
||||
kotlinx-serialization = "1.1.0"
|
||||
aboutlibraries = "8.9.4"
|
||||
acra = "5.8.4"
|
||||
android-gradle = "7.0.4"
|
||||
androidx-leanback = "1.1.0-beta01"
|
||||
androidx-lifecycle = "2.3.1"
|
||||
androidx-startup = "1.1.0"
|
||||
koin = "3.1.2"
|
||||
detekt = "1.18.1"
|
||||
glide = "4.12.0"
|
||||
acra = "5.8.4"
|
||||
aboutlibraries = "8.9.3"
|
||||
koin = "3.1.2"
|
||||
kotlin = "1.6.10"
|
||||
kotlinx-coroutines = "1.4.3"
|
||||
kotlinx-serialization = "1.1.0"
|
||||
|
||||
[plugins]
|
||||
aboutlibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutlibraries" }
|
||||
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
|
||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||
|
||||
[libraries]
|
||||
# Jellyfin apiclient
|
||||
@@ -16,10 +24,12 @@ jellyfin-apiclient = { module = "com.github.jellyfin.jellyfin-sdk-kotlin:android
|
||||
jellyfin-sdk = { module = "org.jellyfin.sdk:jellyfin-core", version = "1.1.0" }
|
||||
|
||||
# Kotlin
|
||||
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
|
||||
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
|
||||
|
||||
# Android(x)
|
||||
android-gradle = { module = "com.android.tools.build:gradle", version.ref = "android-gradle" }
|
||||
androidx-core = { module = "androidx.core:core-ktx", version = "1.3.2" }
|
||||
androidx-activity = { module = "androidx.activity:activity-ktx", version = "1.2.2" }
|
||||
androidx-fragment = { module = "androidx.fragment:fragment-ktx", version = "1.3.2" }
|
||||
|
||||
@@ -4,11 +4,11 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion(30)
|
||||
compileSdk = 30
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion(21)
|
||||
targetSdkVersion(30)
|
||||
minSdk = 21
|
||||
targetSdk = 30
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
@@ -17,6 +17,11 @@ android {
|
||||
|
||||
sourceSets["main"].java.srcDirs("src/main/kotlin")
|
||||
sourceSets["test"].java.srcDirs("src/test/kotlin")
|
||||
|
||||
lint {
|
||||
lintConfig = file("$rootDir/android-lint.xml")
|
||||
isAbortOnError = false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -6,3 +6,39 @@ include(":app")
|
||||
|
||||
// Modules
|
||||
include(":playback")
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
|
||||
// Jellyfin SDK
|
||||
mavenLocal {
|
||||
content {
|
||||
includeVersionByRegex("org.jellyfin.sdk", ".*", "latest-SNAPSHOT")
|
||||
}
|
||||
}
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
|
||||
content {
|
||||
includeVersionByRegex("org.jellyfin.sdk", ".*", "master-SNAPSHOT")
|
||||
includeVersionByRegex("org.jellyfin.sdk", ".*", "openapi-unstable-SNAPSHOT")
|
||||
}
|
||||
}
|
||||
|
||||
// Jellyfin apiclient
|
||||
maven("https://jitpack.io") {
|
||||
content {
|
||||
// Only allow legacy apiclient
|
||||
includeVersionByRegex("com.github.jellyfin.jellyfin-sdk-kotlin", ".*", "v0.7.10")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user