Convert gradle files from Groovy to KTS
This commit is contained in:
parent
58d7c7cba4
commit
46727898fc
7 changed files with 159 additions and 153 deletions
113
app/build.gradle
113
app/build.gradle
|
@ -1,113 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'com.android.application'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-parcelize'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'androidx.navigation.safeargs.kotlin'
|
|
||||||
id 'dagger.hilt.android.plugin'
|
|
||||||
id "com.mikepenz.aboutlibraries.plugin"
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 31
|
|
||||||
buildToolsVersion "31.0.0"
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
applicationId "dev.jdtech.jellyfin"
|
|
||||||
minSdkVersion 24
|
|
||||||
targetSdkVersion 31
|
|
||||||
versionCode 3
|
|
||||||
versionName "0.1.2"
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled true
|
|
||||||
shrinkResources true
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
coreLibraryDesugaringEnabled true
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '1.8'
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
dataBinding true
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation 'androidx.core:core-ktx:1.6.0'
|
|
||||||
implementation 'androidx.core:core-splashscreen:1.0.0-alpha01'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
|
||||||
|
|
||||||
// Material
|
|
||||||
implementation 'com.google.android.material:material:1.4.0'
|
|
||||||
|
|
||||||
// ConstraintLayout
|
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
|
|
||||||
|
|
||||||
// Navigation
|
|
||||||
def navigation_version = "2.3.5"
|
|
||||||
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
|
|
||||||
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
|
|
||||||
|
|
||||||
// RecyclerView
|
|
||||||
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
|
||||||
implementation "androidx.recyclerview:recyclerview-selection:1.1.0"
|
|
||||||
|
|
||||||
// Room
|
|
||||||
def room_version = "2.3.0"
|
|
||||||
implementation "androidx.room:room-runtime:$room_version"
|
|
||||||
kapt "androidx.room:room-compiler:$room_version"
|
|
||||||
implementation "androidx.room:room-ktx:$room_version"
|
|
||||||
|
|
||||||
// Preference
|
|
||||||
def preference_version = "1.1.1"
|
|
||||||
implementation "androidx.preference:preference-ktx:$preference_version"
|
|
||||||
|
|
||||||
// Jellyfin
|
|
||||||
def jellyfin_version = "1.0.2"
|
|
||||||
implementation "org.jellyfin.sdk:jellyfin-platform-android:$jellyfin_version"
|
|
||||||
|
|
||||||
// Glide
|
|
||||||
def glide_version = "4.12.0"
|
|
||||||
implementation "com.github.bumptech.glide:glide:$glide_version"
|
|
||||||
kapt "com.github.bumptech.glide:compiler:$glide_version"
|
|
||||||
|
|
||||||
// Hilt
|
|
||||||
def hilt_version = "2.38.1"
|
|
||||||
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
||||||
kapt "com.google.dagger:hilt-compiler:$hilt_version"
|
|
||||||
|
|
||||||
// ExoPlayer
|
|
||||||
def exoplayer_version = "2.15.0"
|
|
||||||
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
|
|
||||||
implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayer_version"
|
|
||||||
implementation files('libs/extension-ffmpeg-release.aar')
|
|
||||||
|
|
||||||
// Timber
|
|
||||||
def timber_version = "5.0.1"
|
|
||||||
implementation "com.jakewharton.timber:timber:$timber_version"
|
|
||||||
|
|
||||||
def about_libraries_version = "8.9.1"
|
|
||||||
implementation "com.mikepenz:aboutlibraries-core:$about_libraries_version"
|
|
||||||
implementation "com.mikepenz:aboutlibraries:$about_libraries_version"
|
|
||||||
|
|
||||||
// Testing
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
|
||||||
}
|
|
120
app/build.gradle.kts
Normal file
120
app/build.gradle.kts
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("kotlin-android")
|
||||||
|
id("kotlin-parcelize")
|
||||||
|
id("kotlin-kapt")
|
||||||
|
id("androidx.navigation.safeargs.kotlin")
|
||||||
|
id("dagger.hilt.android.plugin")
|
||||||
|
id("com.mikepenz.aboutlibraries.plugin")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk = 31
|
||||||
|
buildToolsVersion = "31.0.0"
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "dev.jdtech.jellyfin"
|
||||||
|
minSdk = 24
|
||||||
|
targetSdk = 31
|
||||||
|
versionCode = 3
|
||||||
|
versionName = "0.1.2"
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
getByName("debug") {
|
||||||
|
applicationIdSuffix = ".debug"
|
||||||
|
}
|
||||||
|
create("staging") {
|
||||||
|
initWith(getByName("release"))
|
||||||
|
applicationIdSuffix = ".staging"
|
||||||
|
}
|
||||||
|
getByName("release") {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
isShrinkResources = true
|
||||||
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
isCoreLibraryDesugaringEnabled = true
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
dataBinding = true
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("androidx.core:core-ktx:1.6.0")
|
||||||
|
implementation("androidx.core:core-splashscreen:1.0.0-alpha01")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.3.1")
|
||||||
|
|
||||||
|
// Material
|
||||||
|
implementation("com.google.android.material:material:1.4.0")
|
||||||
|
|
||||||
|
// ConstraintLayout
|
||||||
|
implementation("androidx.constraintlayout:constraintlayout:2.1.0")
|
||||||
|
|
||||||
|
// Navigation
|
||||||
|
val navigationVersion = "2.3.5"
|
||||||
|
implementation("androidx.navigation:navigation-fragment-ktx:$navigationVersion")
|
||||||
|
implementation("androidx.navigation:navigation-ui-ktx:$navigationVersion")
|
||||||
|
|
||||||
|
// RecyclerView
|
||||||
|
implementation("androidx.recyclerview:recyclerview:1.2.1")
|
||||||
|
implementation("androidx.recyclerview:recyclerview-selection:1.1.0")
|
||||||
|
|
||||||
|
// Room
|
||||||
|
val roomVersion = "2.3.0"
|
||||||
|
implementation("androidx.room:room-runtime:$roomVersion")
|
||||||
|
kapt("androidx.room:room-compiler:$roomVersion")
|
||||||
|
implementation("androidx.room:room-ktx:$roomVersion")
|
||||||
|
|
||||||
|
// Preference
|
||||||
|
val preferenceVersion = "1.1.1"
|
||||||
|
implementation("androidx.preference:preference-ktx:$preferenceVersion")
|
||||||
|
|
||||||
|
// Jellyfin
|
||||||
|
val jellyfinVersion = "1.0.2"
|
||||||
|
implementation("org.jellyfin.sdk:jellyfin-platform-android:$jellyfinVersion")
|
||||||
|
|
||||||
|
// Glide
|
||||||
|
val glideVersion = "4.12.0"
|
||||||
|
implementation("com.github.bumptech.glide:glide:$glideVersion")
|
||||||
|
kapt("com.github.bumptech.glide:compiler:$glideVersion")
|
||||||
|
|
||||||
|
// Hilt
|
||||||
|
val hiltVersion = "2.38.1"
|
||||||
|
implementation("com.google.dagger:hilt-android:$hiltVersion")
|
||||||
|
kapt("com.google.dagger:hilt-compiler:$hiltVersion")
|
||||||
|
|
||||||
|
// ExoPlayer
|
||||||
|
val exoplayerVersion = "2.15.0"
|
||||||
|
implementation("com.google.android.exoplayer:exoplayer-core:$exoplayerVersion")
|
||||||
|
implementation("com.google.android.exoplayer:exoplayer-ui:$exoplayerVersion")
|
||||||
|
implementation(files("libs/extension-ffmpeg-release.aar"))
|
||||||
|
|
||||||
|
// Timber
|
||||||
|
val timberVersion = "5.0.1"
|
||||||
|
implementation("com.jakewharton.timber:timber:$timberVersion")
|
||||||
|
|
||||||
|
val aboutLibrariesVersion = "8.9.1"
|
||||||
|
implementation("com.mikepenz:aboutlibraries-core:$aboutLibrariesVersion")
|
||||||
|
implementation("com.mikepenz:aboutlibraries:$aboutLibrariesVersion")
|
||||||
|
|
||||||
|
// Testing
|
||||||
|
testImplementation("junit:junit:4.13.2")
|
||||||
|
androidTestImplementation("androidx.test.ext:junit:1.1.3")
|
||||||
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
|
||||||
|
|
||||||
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
|
||||||
|
}
|
2
app/proguard-rules.pro
vendored
2
app/proguard-rules.pro
vendored
|
@ -1,6 +1,6 @@
|
||||||
# Add project specific ProGuard rules here.
|
# Add project specific ProGuard rules here.
|
||||||
# You can control the set of applied configuration files using the
|
# 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
|
# For more details, see
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
37
build.gradle
37
build.gradle
|
@ -1,37 +0,0 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
||||||
buildscript {
|
|
||||||
ext.kotlin_version = "1.5.30"
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
maven {
|
|
||||||
url "https://plugins.gradle.org/m2/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:7.0.2'
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
|
||||||
// in the individual module build.gradle files
|
|
||||||
def nav_version = "2.3.5"
|
|
||||||
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
|
|
||||||
|
|
||||||
def hilt_version = "2.38.1"
|
|
||||||
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
|
|
||||||
|
|
||||||
def about_libraries_version = "8.9.1"
|
|
||||||
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$about_libraries_version"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task clean(type: Delete) {
|
|
||||||
delete rootProject.buildDir
|
|
||||||
}
|
|
37
build.gradle.kts
Normal file
37
build.gradle.kts
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
buildscript {
|
||||||
|
val kotlinVersion = "1.5.30"
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url = uri("https://plugins.gradle.org/m2/")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath("com.android.tools.build:gradle:7.0.2")
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
|
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle.kts files
|
||||||
|
val navVersion = "2.3.5"
|
||||||
|
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:$navVersion")
|
||||||
|
|
||||||
|
val hiltVersion = "2.38.1"
|
||||||
|
classpath("com.google.dagger:hilt-android-gradle-plugin:$hiltVersion")
|
||||||
|
|
||||||
|
val aboutLibrariesVersion = "8.9.1"
|
||||||
|
classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$aboutLibrariesVersion")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.create<Delete>("clean") {
|
||||||
|
delete(rootProject.buildDir)
|
||||||
|
}
|
|
@ -1,2 +0,0 @@
|
||||||
rootProject.name = "Jellyfin"
|
|
||||||
include ':app'
|
|
1
settings.gradle.kts
Normal file
1
settings.gradle.kts
Normal file
|
@ -0,0 +1 @@
|
||||||
|
include(":app")
|
Loading…
Reference in a new issue