mirror of
https://github.com/yuliskov/SmartTube.git
synced 2025-08-06 20:10:13 +08:00
135 lines
5.3 KiB
Groovy
135 lines
5.3 KiB
Groovy
apply from: gradle.ext.sharedModulesConstants
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
google()
|
|
}
|
|
|
|
dependencies {
|
|
// These docs use an open ended version so that our plugin
|
|
// can be updated quickly in response to Android tooling updates
|
|
|
|
// Check that you have the Google Services Gradle plugin v4.3.2 or later
|
|
// (if not, add it).
|
|
classpath 'com.google.gms:google-services:4.3.3'
|
|
|
|
// Add the Crashlytics Gradle plugin.
|
|
// https://firebase.google.com/docs/crashlytics/get-started?platform=android
|
|
// https://firebase.google.com/docs/android/setup
|
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
// Google Services Gradle plugin (transforms google-services.json file)
|
|
apply plugin: 'com.google.gms.google-services'
|
|
|
|
// Apply the Crashlytics Gradle plugin
|
|
apply plugin: 'com.google.firebase.crashlytics'
|
|
|
|
android {
|
|
// FIX: Default interface methods are only supported starting with Android N (--min-api 24)
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
compileSdkVersion project.properties.compileSdkVersion
|
|
buildToolsVersion project.properties.buildToolsVersion
|
|
testOptions.unitTests.includeAndroidResources = true
|
|
|
|
defaultConfig {
|
|
// values linked with applicationId: searchable.searchSuggestAuthority, searchable.searchSuggestIntentData, VideoContract.CONTENT_AUTHORITY
|
|
// applicationId "org.teamsmart.smarttube.tv"
|
|
applicationId "com.liskovsoft.smarttubetv"
|
|
minSdkVersion project.properties.minSdkVersion
|
|
targetSdkVersion project.properties.targetSdkVersion
|
|
versionCode 71
|
|
versionName "4.51"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
|
|
|
|
// More info: http://myhexaville.com/2017/03/10/android-multidex/
|
|
// Additionally, you should extend your application from MultiDexApplication
|
|
multiDexEnabled = true
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
// gradle 4.6 migration: disable dimensions mechanism
|
|
// more: https://proandroiddev.com/advanced-android-flavors-part-4-a-new-version-fc2ad80c01bb
|
|
flavorDimensions "default"
|
|
|
|
productFlavors {
|
|
stbeta {
|
|
// matchingFallbacks = ['lite']
|
|
applicationIdSuffix ".beta"
|
|
}
|
|
storig {
|
|
// matchingFallbacks = ['lite']
|
|
}
|
|
}
|
|
|
|
// naming example: SmartYouTubeTV_Xwalk_v6.8.12_r.apk
|
|
// https://stackoverflow.com/questions/18332474/how-to-set-versionname-in-apk-filename-using-gradle
|
|
applicationVariants.all { variant ->
|
|
variant.outputs.each { output ->
|
|
def project = "STubeNext"
|
|
def flavor = variant.productFlavors[-1].name
|
|
def buildType = variant.variantData.variantConfiguration.buildType.name.take(1)
|
|
def version = variant.versionName
|
|
|
|
def newApkName = sprintf("%s_%s_v%s_%s.apk", [project, flavor, version, buildType])
|
|
|
|
// gradle 4.6 migration
|
|
output.outputFileName = new File(newApkName)
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
|
|
implementation 'androidx.leanback:leanback:' + leanbackXLibraryVersion
|
|
implementation 'androidx.leanback:leanback-preference:' + leanbackXLibraryVersion
|
|
implementation 'androidx.recommendation:recommendation:' + leanbackXLibraryVersion
|
|
implementation 'androidx.annotation:annotation:' + appCompatXLibraryVersion
|
|
implementation 'androidx.recyclerview:recyclerview:' + appCompatXLibraryVersion
|
|
|
|
implementation 'com.github.bumptech.glide:glide:' + glideVersion
|
|
annotationProcessor 'com.github.bumptech.glide:compiler:' + glideVersion
|
|
implementation 'com.zlc.glide:webpdecoder:2.0.' + glideVersion
|
|
|
|
implementation 'com.google.android.exoplayer:exoplayer:' + amazonExoplayerVersion
|
|
implementation 'com.google.android.exoplayer:extension-leanback:' + amazonExoplayerVersion
|
|
implementation 'androidx.media:media:' + mediaXLibraryVersion // exoplayer fix
|
|
|
|
testImplementation 'junit:junit:' + junitVersion
|
|
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
|
|
androidTestImplementation 'androidx.test.ext:junit:' + testXSupportLibraryVersion
|
|
androidTestImplementation 'androidx.test.ext:truth:' + testXSupportLibraryVersion
|
|
androidTestImplementation 'androidx.test:runner:' + testXSupportLibraryVersion
|
|
androidTestImplementation 'androidx.test:rules:' + testXSupportLibraryVersion
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:' + espressoVersion
|
|
|
|
implementation project(':sharedutils')
|
|
implementation project(':mediaserviceinterfaces')
|
|
implementation project(':youtubeapi')
|
|
|
|
implementation 'io.reactivex.rxjava2:rxandroid:' + rxAndroidVersion
|
|
implementation 'io.reactivex.rxjava2:rxjava:' + rxJavaVersion
|
|
|
|
implementation project(path: ':common')
|
|
|
|
// Add the Firebase Crashlytics SDK.
|
|
stbetaImplementation('com.google.firebase:firebase-crashlytics:' + firebaseCrashlyticsVersion) {
|
|
transitive = true
|
|
}
|
|
}
|