-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
148 lines (125 loc) · 5.87 KB
/
Copy pathbuild.gradle
File metadata and controls
148 lines (125 loc) · 5.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: "com.android.application"
apply plugin: "kotlin-android"
apply plugin: "kotlin-parcelize"
// Safe args allows the passing of data in bundles with type safety
// See more at https://developer.android.com/guide/navigation/navigation-pass-data
apply plugin: "androidx.navigation.safeargs.kotlin"
// Allows for Kotlin annotation processors
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 32
defaultConfig {
applicationId "com.android.tv.reference"
minSdkVersion 23
targetSdkVersion 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testOptions.unitTests.includeAndroidResources = true
// When true, the app will display features that require Firebase to be configured
// such as the ability to create a user account. When false, those features are hidden,
// there is no user account, and watch progress is stored locally.
buildConfigField("boolean", "FIREBASE_ENABLED", "false")
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
// View binding allows efficient, type-safe view access
// See more at https://developer.android.com/topic/libraries/view-binding
viewBinding = true
}
compileOptions {
// Desugaring enables using Java 8 APIs like java.time in a backwards compatible manner.
coreLibraryDesugaringEnabled true
// Exoplayer requires targeting Java 8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.work:work-runtime-ktx:2.7.1'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
// AndroidX libraries
def leanback_version = "1.2.0-alpha02"
def room_version = "2.4.2"
def fragment_version = "1.4.1"
def cast_tv_version = "17.0.0"
def cast_version = "19.0.0"
implementation "androidx.appcompat:appcompat:1.4.1"
implementation "androidx.core:core-ktx:1.7.0"
implementation "androidx.fragment:fragment-ktx:$fragment_version"
implementation "androidx.leanback:leanback:$leanback_version"
implementation "androidx.leanback:leanback-preference:$leanback_version"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation "androidx.preference:preference-ktx:1.2.0"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
// Cast library used for Cast Connect feature
implementation "com.google.android.gms:play-services-cast-tv:$cast_tv_version"
implementation "com.google.android.gms:play-services-cast:$cast_version"
debugImplementation "androidx.fragment:fragment-testing:$fragment_version"
// Work library used for simplifying work done in the background
def work_version = "2.7.1"
implementation "androidx.work:work-runtime:$work_version"
// TV provider library used for updating home screen channels
implementation 'androidx.tvprovider:tvprovider:1.0.0'
// Picasso for image loading
implementation 'com.squareup.picasso:picasso:2.71828'
// Exoplayer for playback
def exoplayer_version = "2.17.1"
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
implementation "com.google.android.exoplayer:extension-leanback:$exoplayer_version"
implementation "com.google.android.exoplayer:extension-mediasession:$exoplayer_version"
// Google Play Services for identity
def playservices_version = "20.1.0"
implementation "com.google.android.gms:play-services-auth:$playservices_version"
// Moshi for JSON parsing
implementation("com.squareup.moshi:moshi-kotlin:1.13.0")
kapt("com.squareup.moshi:moshi-kotlin-codegen:1.13.0")
// Retrofit for HTTP requests
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
// Logging
implementation("com.jakewharton.timber:timber:5.0.1")
// Testing libraries
testImplementation 'junit:junit:4.13.2'
testImplementation 'android.arch.core:core-testing:1.1.1'
testImplementation "androidx.room:room-testing:$room_version"
testImplementation 'androidx.test:core:1.4.0'
testImplementation 'androidx.test:rules:1.4.0'
testImplementation 'androidx.test:runner:1.4.0'
testImplementation 'androidx.test.ext:junit:1.1.3'
testImplementation "androidx.work:work-testing:$work_version"
testImplementation "com.google.truth:truth:1.1.3"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0-native-mt"
testImplementation "org.mockito:mockito-core:4.4.0"
testImplementation 'org.mockito:mockito-inline:4.4.0'
testImplementation 'org.robolectric:robolectric:4.7.3'
}