mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00

* feat: add youtube engine abstraction and yt-dlp integration * chore: add yt-dlp as optional dependency * feat: implement custom path support for youtube engines * chore: check for custom path in setting engine select dropdown * chore: update yt_dlp_dart * chore: setting video url instead of video id in fetchSiblings * feat: implement NewPipe engine * chore: update local path to git url for flutter_new_pipe_extractor package * chore: fix android build isn't working * chore: fix routes not working when initially signing in * refactor: drop fallback support to different sources
139 lines
3.8 KiB
Groovy
139 lines
3.8 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "kotlin-android"
|
|
id "dev.flutter.flutter-gradle-plugin"
|
|
}
|
|
|
|
def localProperties = new Properties()
|
|
def localPropertiesFile = rootProject.file('local.properties')
|
|
if (localPropertiesFile.exists()) {
|
|
localPropertiesFile.withReader('UTF-8') { reader ->
|
|
localProperties.load(reader)
|
|
}
|
|
}
|
|
|
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
|
if (flutterVersionCode == null) {
|
|
flutterVersionCode = '1'
|
|
}
|
|
|
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
|
if (flutterVersionName == null) {
|
|
flutterVersionName = '1.0'
|
|
}
|
|
|
|
def keystoreProperties = new Properties()
|
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
def composeVersion = "1.4.8"
|
|
|
|
android {
|
|
namespace "oss.krtirtho.spotube"
|
|
|
|
compileSdkVersion 35
|
|
|
|
ndkVersion = "27.0.12077973"
|
|
|
|
compileOptions {
|
|
coreLibraryDesugaringEnabled true
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
|
|
sourceSets {
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
}
|
|
|
|
buildFeatures {
|
|
compose true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion "$composeVersion" // Correlates with org.jetbrains.kotlin.android plugin in settings.gradle
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "oss.krtirtho.spotube"
|
|
minSdkVersion 24
|
|
targetSdkVersion 35
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
multiDexEnabled true
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
|
storePassword keystoreProperties['storePassword']
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
debug {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
|
|
flavorDimensions "default"
|
|
|
|
productFlavors {
|
|
nightly {
|
|
dimension "default"
|
|
resValue "string", "app_name_en", "Spotube Nightly"
|
|
applicationIdSuffix ".nightly"
|
|
versionNameSuffix "-nightly"
|
|
signingConfig signingConfigs.release
|
|
}
|
|
dev {
|
|
dimension "default"
|
|
resValue "string", "app_name_en", "Spotube Dev"
|
|
applicationIdSuffix ".dev"
|
|
versionNameSuffix "-dev"
|
|
signingConfig signingConfigs.release
|
|
}
|
|
stable {
|
|
dimension "default"
|
|
resValue "string", "app_name_en", "Spotube"
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
|
|
packagingOptions {
|
|
resources.excludes += "DebugProbesKt.bin"
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source '../..'
|
|
}
|
|
|
|
def glanceVersion = "1.1.1"
|
|
dependencies {
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
|
|
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
|
|
// other deps so just ignore
|
|
implementation 'com.android.support:multidex:2.0.1'
|
|
|
|
implementation "androidx.glance:glance-appwidget:$glanceVersion"
|
|
implementation "androidx.glance:glance-appwidget-preview:$glanceVersion"
|
|
implementation "androidx.glance:glance-preview:$glanceVersion"
|
|
implementation "androidx.glance:glance-material3:$glanceVersion"
|
|
implementation "androidx.glance:glance-material:$glanceVersion"
|
|
implementation "androidx.work:work-runtime-ktx:2.8.1"
|
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3"
|
|
implementation 'com.google.code.gson:gson:2.11.0'
|
|
} |