Convert Gradle files to Kotlin

This commit is contained in:
Niels van Velzen authored and Bill Thornton committed 2020-03-09 15:57:40 -04:00
1 parent 717c87f8b7
commit ec6fe7795a
7 files changed
+107 -109

No files matched your search

-71
View File
@@ -1,71 +0,0 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
def version = "0.11.1"
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
defaultConfig {
minSdkVersion 21
targetSdkVersion 28
versionCode 906
versionName version
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix ".debug"
debuggable true
}
}
}
dependencies {
def acraVersion = '5.4.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
// This is split like this because this is a modular gradle project on jitpack
// see https://github.com/jitpack/gradle-modular
// The split allows dependency substitution to work in the settings.gradle file,
// at least for the 'library' part. 'android' part is still broken somehow, but this
// is better than nothing.
implementation 'com.github.jellyfin.jellyfin-apiclient-java:android:0.5.0'
implementation 'com.github.jellyfin.jellyfin-apiclient-java:library:0.5.0'
implementation 'com.amazon.android:exoplayer:2.10.6'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.leanback:leanback:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.palette:palette:1.0.0'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.squareup.okhttp:okhttp:2.7.0'
implementation 'com.squareup.okhttp:okhttp-urlconnection:2.7.0'
implementation 'com.google.guava:guava:18.0'
implementation 'com.flaviofaria:kenburnsview:1.0.6'
implementation 'org.videolan.android:libvlc-all:3.1.12'
implementation "ch.acra:acra-http:$acraVersion"
implementation "ch.acra:acra-dialog:$acraVersion"
implementation "ch.acra:acra-limiter:$acraVersion"
testImplementation 'junit:junit:4.12'
implementation "androidx.core:core-ktx:1.1.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.tvprovider:tvprovider:1.0.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
}
repositories {
mavenCentral()
}
+68
View File
@@ -0,0 +1,68 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("kotlin-android-extensions")
}
val version = "0.11.0"
android {
compileSdkVersion(28)
buildToolsVersion = "28.0.3"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion(21)
targetSdkVersion(28)
versionCode = 905
versionName = version
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
getByName("debug") {
applicationIdSuffix = ".debug"
isDebuggable = true
}
}
}
dependencies {
// This is split like this because this is a modular gradle project on jitpack
// see https://github.com/jitpack/gradle-modular
// The split allows dependency substitution to work in the settings.gradle file,
// at least for the 'library' part. 'android' part is still broken somehow, but this
// is better than nothing.
implementation("com.github.jellyfin.jellyfin-apiclient-java:android:master-SNAPSHOT")
implementation("com.github.jellyfin.jellyfin-apiclient-java:library:master-SNAPSHOT")
implementation("com.amazon.android:exoplayer:2.10.6")
implementation("androidx.recyclerview:recyclerview:1.0.0")
implementation("androidx.leanback:leanback:1.0.0")
implementation("androidx.appcompat:appcompat:1.0.2")
implementation("androidx.palette:palette:1.0.0")
implementation("com.squareup.picasso:picasso:2.3.2")
implementation("com.github.bumptech.glide:glide:3.7.0")
implementation("com.squareup.okhttp:okhttp:2.7.0")
implementation("com.squareup.okhttp:okhttp-urlconnection:2.7.0")
implementation("com.google.guava:guava:18.0")
implementation("com.flaviofaria:kenburnsview:1.0.6")
implementation("org.videolan.android:libvlc-all:3.1.12")
implementation("ch.acra:acra-http:5.4.0")
implementation("ch.acra:acra-dialog:5.4.0")
implementation("ch.acra:acra-limiter:5.4.0")
testImplementation("junit:junit:4.12")
implementation("androidx.core:core-ktx:1.1.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61")
implementation("androidx.constraintlayout:constraintlayout:1.1.3")
implementation("androidx.tvprovider:tvprovider:1.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2")
}
-27
View File
@@ -1,27 +0,0 @@
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
google()
maven {
url 'https://jitpack.io'
}
maven {
url 'https://dl.bintray.com/videolan/Android'
}
}
}
+22
View File
@@ -0,0 +1,22 @@
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.2")
classpath(kotlin("gradle-plugin", "1.3.61"))
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
google()
maven("https://jitpack.io")
maven("https://dl.bintray.com/videolan/Android")
}
}
+5
View File
@@ -1,4 +1,9 @@
# Gradle
org.gradle.jvmargs=-Xmx768m
# Kotlin compiler
kotlin.incremental=true
# Android
android.enableJetifier=true
android.useAndroidX=true
-11
View File
@@ -1,11 +0,0 @@
include ':app'
def apiclientLocation = '../jellyfin-apiclient-java'
if (new File(apiclientLocation).exists()) {
includeBuild(apiclientLocation) {
dependencySubstitution {
substitute module('com.github.jellyfin.jellyfin-apiclient-java:library') with project(':library')
}
}
}
+12
View File
@@ -0,0 +1,12 @@
include(":app")
val enableDependencySubstitution = true
val apiclientLocation = "../jellyfin-apiclient-java"
if (File(apiclientLocation).exists() && enableDependencySubstitution) {
includeBuild(apiclientLocation) {
dependencySubstitution {
substitute(module("com.github.jellyfin.jellyfin-apiclient-java:library")).with(project(":library"))
}
}
}