2024-02-05 21:50:43 +01:00
|
|
|
plugins {
|
2024-05-25 10:42:10 +02:00
|
|
|
id 'com.android.application'
|
2024-02-14 07:09:48 +01:00
|
|
|
id 'kotlin-android'
|
2024-05-25 10:42:10 +02:00
|
|
|
id 'org.jetbrains.kotlin.android'
|
2024-06-23 19:58:04 +02:00
|
|
|
id 'io.realm.kotlin'
|
|
|
|
// id 'com.google.devtools.ksp'
|
2024-02-05 21:50:43 +01:00
|
|
|
id('com.github.triplet.play') version '3.8.3' apply false
|
|
|
|
}
|
|
|
|
|
2024-03-15 23:03:21 +01:00
|
|
|
// from common.gradle
|
2024-02-05 21:50:43 +01:00
|
|
|
android {
|
|
|
|
defaultConfig {
|
2024-04-09 14:43:14 +02:00
|
|
|
minSdk 23
|
2024-03-13 22:39:17 +01:00
|
|
|
compileSdk 34
|
|
|
|
targetSdk 34
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = '17'
|
|
|
|
}
|
|
|
|
|
|
|
|
vectorDrawables.useSupportLibrary false
|
|
|
|
vectorDrawables.generatedDensities = []
|
|
|
|
|
|
|
|
testApplicationId "ac.mdiq.podcini.tests"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2024-02-05 21:50:43 +01:00
|
|
|
}
|
2024-03-13 22:39:17 +01:00
|
|
|
|
2024-02-05 21:50:43 +01:00
|
|
|
buildTypes {
|
|
|
|
release {
|
2024-03-13 22:39:17 +01:00
|
|
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard.cfg"
|
2024-06-23 19:58:04 +02:00
|
|
|
resValue "string", "app_name", "Podcini.R"
|
2024-02-05 21:50:43 +01:00
|
|
|
}
|
2024-03-15 23:03:21 +01:00
|
|
|
debug {
|
2024-06-23 19:58:04 +02:00
|
|
|
resValue "string", "app_name", "Podcini.R Debug"
|
2024-02-15 15:10:16 +01:00
|
|
|
}
|
|
|
|
}
|
2024-02-05 21:50:43 +01:00
|
|
|
|
2024-03-13 22:39:17 +01:00
|
|
|
packagingOptions {
|
|
|
|
resources {
|
2024-04-19 12:52:23 +02:00
|
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/NOTICE'
|
|
|
|
exclude 'META-INF/CHANGES'
|
|
|
|
exclude 'META-INF/README.md'
|
|
|
|
exclude 'META-INF/NOTICE.txt'
|
|
|
|
exclude 'META-INF/LICENSE.txt'
|
|
|
|
exclude 'META-INF/MANIFEST.MF'
|
2024-03-13 22:39:17 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
|
|
}
|
|
|
|
|
|
|
|
testOptions {
|
|
|
|
animationsDisabled = true
|
|
|
|
unitTests {
|
|
|
|
includeAndroidResources = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lint {
|
2024-06-23 19:58:04 +02:00
|
|
|
// disable "GradleDependency"
|
2024-07-12 12:52:26 +02:00
|
|
|
checkReleaseBuilds false
|
2024-03-13 22:39:17 +01:00
|
|
|
checkDependencies true
|
|
|
|
warningsAsErrors true
|
|
|
|
abortOnError true
|
|
|
|
checkGeneratedSources = true
|
|
|
|
}
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
viewBinding true
|
2024-05-11 18:38:02 +02:00
|
|
|
buildConfig true
|
2024-03-13 22:39:17 +01:00
|
|
|
}
|
2024-02-05 21:50:43 +01:00
|
|
|
}
|
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
//tasks.withType(Test).configureEach {
|
|
|
|
// testLogging {
|
|
|
|
// exceptionFormat "full"
|
|
|
|
// events "skipped", "passed", "failed"
|
|
|
|
// showStandardStreams true
|
|
|
|
// displayGranularity 2
|
|
|
|
// }
|
|
|
|
//}
|
2024-03-13 22:39:17 +01:00
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
//gradle.projectsEvaluated {
|
|
|
|
// tasks.withType(JavaCompile).tap {
|
|
|
|
// configureEach {
|
|
|
|
// options.compilerArgs << "-Xlint"
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//}
|
2024-03-13 22:39:17 +01:00
|
|
|
|
|
|
|
|
2024-03-15 23:03:21 +01:00
|
|
|
// from playFlavor.gradle
|
|
|
|
android {
|
|
|
|
flavorDimensions += ["market"]
|
|
|
|
productFlavors {
|
|
|
|
free {
|
|
|
|
dimension "market"
|
|
|
|
}
|
|
|
|
play {
|
|
|
|
dimension "market"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// start of the app build.gradle
|
|
|
|
android {
|
|
|
|
namespace "ac.mdiq.podcini"
|
2024-06-24 22:52:25 +02:00
|
|
|
lint {
|
|
|
|
lintConfig = file("lint.xml")
|
|
|
|
// checkOnly += ['NewApi', 'InlinedApi']
|
2024-06-25 12:29:14 +02:00
|
|
|
checkOnly += ['NewApi', 'InlinedApi', 'Performance', 'DuplicateIds']
|
2024-06-24 22:52:25 +02:00
|
|
|
|
|
|
|
disable += ['TypographyDashes', 'TypographyQuotes', 'ObsoleteLintCustomCheck', 'CheckResult', 'UnusedAttribute', 'BatteryLife', 'InflateParams',
|
2024-07-18 23:47:28 +02:00
|
|
|
'RestrictedApi', 'TrustAllX509TrustManager', 'ExportedReceiver', 'VectorDrawableCompat',
|
2024-03-15 23:03:21 +01:00
|
|
|
'StaticFieldLeak', 'UseCompoundDrawables', 'NestedWeights', 'Overdraw', 'UselessParent', 'TextFields',
|
|
|
|
'AlwaysShowAction', 'Autofill', 'ClickableViewAccessibility', 'ContentDescription',
|
|
|
|
'KeyboardInaccessibleWidget', 'LabelFor', 'SetTextI18n', 'HardcodedText', 'RelativeOverlap',
|
|
|
|
'RtlCompat', 'RtlHardcoded', 'MissingMediaBrowserServiceIntentFilter', 'VectorPath',
|
2024-06-24 22:52:25 +02:00
|
|
|
'InvalidPeriodicWorkRequestInterval', 'NotifyDataSetChanged', 'RtlEnabled']
|
2024-03-15 23:03:21 +01:00
|
|
|
}
|
|
|
|
buildFeatures {
|
|
|
|
buildConfig true
|
|
|
|
}
|
|
|
|
defaultConfig {
|
2024-07-20 21:41:46 +02:00
|
|
|
versionCode 3020216
|
|
|
|
versionName "6.1.2"
|
2024-03-15 23:03:21 +01:00
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
applicationId "ac.mdiq.podcini.R"
|
2024-03-15 23:03:21 +01:00
|
|
|
def commit = ""
|
2024-06-23 19:58:04 +02:00
|
|
|
// try {
|
|
|
|
// def hashStdOut = new ByteArrayOutputStream()
|
|
|
|
// exec {
|
|
|
|
// commandLine "git", "rev-parse", "--short", "HEAD"
|
|
|
|
// standardOutput = hashStdOut
|
|
|
|
// }
|
|
|
|
// commit = hashStdOut.toString().trim()
|
|
|
|
// } catch (Exception ignore) {
|
|
|
|
// }
|
2024-03-15 23:03:21 +01:00
|
|
|
buildConfigField "String", "COMMIT_HASH", ('"' + (commit.isEmpty() ? "Unknown commit" : commit) + '"')
|
|
|
|
|
|
|
|
if (project.hasProperty("podcastindexApiKey")) {
|
|
|
|
buildConfigField "String", "PODCASTINDEX_API_KEY", '"' + podcastindexApiKey + '"'
|
|
|
|
buildConfigField "String", "PODCASTINDEX_API_SECRET", '"' + podcastindexApiSecret + '"'
|
|
|
|
} else {
|
2024-03-20 14:59:05 +01:00
|
|
|
buildConfigField "String", "PODCASTINDEX_API_KEY", '"QT2RYHSUZ3UC9GDJ5MFY"'
|
|
|
|
buildConfigField "String", "PODCASTINDEX_API_SECRET", '"Zw2NL74ht5aCtx5zFL$#MY$##qdVCX7x37jq95Sz"'
|
2024-03-15 23:03:21 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
signingConfigs {
|
|
|
|
releaseConfig {
|
|
|
|
enableV1Signing true
|
|
|
|
enableV2Signing true
|
|
|
|
storeFile file(project.getProperties().getOrDefault("releaseStoreFile", "keystore"))
|
|
|
|
storePassword project.getProperties().getOrDefault("releaseStorePassword", "password")
|
|
|
|
keyAlias project.getProperties().getOrDefault("releaseKeyAlias", "alias")
|
|
|
|
keyPassword project.getProperties().getOrDefault("releaseKeyPassword", "password")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
2024-06-23 19:58:04 +02:00
|
|
|
resValue "string", "provider_authority", "ac.mdiq.podcini.R.debug.provider"
|
2024-03-15 23:03:21 +01:00
|
|
|
}
|
|
|
|
release {
|
2024-06-23 19:58:04 +02:00
|
|
|
resValue "string", "app_name", "Podcini.R"
|
|
|
|
resValue "string", "provider_authority", "ac.mdiq.podcini.R.provider"
|
2024-03-15 23:03:21 +01:00
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
|
|
|
signingConfig signingConfigs.releaseConfig
|
2024-05-11 18:38:02 +02:00
|
|
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard.cfg"
|
2024-03-15 23:03:21 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
applicationVariants.configureEach { variant ->
|
|
|
|
variant.outputs.configureEach { output ->
|
2024-06-23 19:58:04 +02:00
|
|
|
def applicationName = "Podcini.R"
|
2024-03-15 23:03:21 +01:00
|
|
|
outputFileName = "${applicationName}_${variant.buildType.name}_${defaultConfig.versionName}.apk"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
androidResources {
|
|
|
|
additionalParameters "--no-version-vectors"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-05 21:50:43 +01:00
|
|
|
dependencies {
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation "androidx.core:core-ktx:1.13.1"
|
2024-06-10 16:56:20 +02:00
|
|
|
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
2024-05-25 10:42:10 +02:00
|
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1'
|
2024-02-14 07:09:48 +01:00
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.8.2"
|
2024-05-18 00:05:16 +02:00
|
|
|
implementation "androidx.annotation:annotation:1.8.0"
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
2024-02-05 21:50:43 +01:00
|
|
|
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation "androidx.fragment:fragment-ktx:1.8.0"
|
2024-02-05 21:50:43 +01:00
|
|
|
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
2024-03-13 22:39:17 +01:00
|
|
|
implementation "androidx.media:media:1.7.0"
|
2024-04-18 23:56:00 +02:00
|
|
|
implementation "androidx.media3:media3-exoplayer:1.3.1"
|
|
|
|
implementation "androidx.media3:media3-ui:1.3.1"
|
|
|
|
implementation "androidx.media3:media3-datasource-okhttp:1.3.1"
|
|
|
|
implementation "androidx.media3:media3-common:1.3.1"
|
|
|
|
implementation "androidx.media3:media3-session:1.3.1"
|
2024-03-13 22:39:17 +01:00
|
|
|
implementation "androidx.palette:palette-ktx:1.0.0"
|
|
|
|
implementation "androidx.preference:preference-ktx:1.2.1"
|
|
|
|
implementation "androidx.recyclerview:recyclerview:1.3.2"
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation "androidx.viewpager2:viewpager2:1.1.0"
|
2024-03-13 22:39:17 +01:00
|
|
|
implementation "androidx.work:work-runtime:2.9.0"
|
2024-02-25 11:28:34 +01:00
|
|
|
implementation "androidx.core:core-splashscreen:1.0.1"
|
|
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation 'androidx.webkit:webkit:1.11.0'
|
|
|
|
|
|
|
|
implementation "com.google.android.material:material:1.12.0"
|
2024-02-25 11:28:34 +01:00
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation 'io.realm.kotlin:library-base:2.0.0'
|
2024-03-13 22:39:17 +01:00
|
|
|
|
|
|
|
implementation "org.apache.commons:commons-lang3:3.14.0"
|
2024-05-05 15:46:34 +02:00
|
|
|
implementation 'commons-io:commons-io:2.16.1'
|
2024-03-13 22:39:17 +01:00
|
|
|
implementation "org.jsoup:jsoup:1.17.2"
|
|
|
|
|
2024-05-11 18:38:02 +02:00
|
|
|
implementation "io.coil-kt:coil:2.6.0"
|
|
|
|
|
2024-03-13 22:39:17 +01:00
|
|
|
implementation "com.squareup.okhttp3:okhttp:4.12.0"
|
|
|
|
implementation "com.squareup.okhttp3:okhttp-urlconnection:4.12.0"
|
2024-05-05 15:46:34 +02:00
|
|
|
implementation 'com.squareup.okio:okio:3.9.0'
|
2024-02-25 11:28:34 +01:00
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
// implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
|
2024-03-13 22:39:17 +01:00
|
|
|
implementation "io.reactivex.rxjava2:rxjava:2.2.21"
|
2024-02-05 21:50:43 +01:00
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation 'com.mikepenz:iconics-core:5.5.0-compose01'
|
|
|
|
implementation 'com.mikepenz:iconics-views:5.5.0-compose01'
|
|
|
|
implementation 'com.mikepenz:google-material-typeface:4.0.0.3-kotlin@aar'
|
|
|
|
implementation 'com.mikepenz:google-material-typeface-outlined:4.0.0.2-kotlin@aar'
|
|
|
|
implementation 'com.mikepenz:fontawesome-typeface:5.13.3.0-kotlin@aar'
|
|
|
|
|
2024-03-13 22:39:17 +01:00
|
|
|
implementation 'com.leinardi.android:speed-dial:3.3.0'
|
2024-02-05 21:50:43 +01:00
|
|
|
implementation 'com.github.ByteHamster:SearchPreference:v2.5.0'
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation 'com.github.skydoves:balloon:1.6.5'
|
2024-02-05 21:50:43 +01:00
|
|
|
implementation 'com.github.xabaras:RecyclerViewSwipeDecorator:1.3'
|
2024-03-13 22:39:17 +01:00
|
|
|
implementation "com.annimon:stream:1.2.2"
|
2024-02-05 21:50:43 +01:00
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
implementation 'com.github.mfietz:fyydlin:v0.5.0'
|
|
|
|
|
2024-04-18 23:56:00 +02:00
|
|
|
implementation "net.dankito.readability4j:readability4j:1.0.8"
|
|
|
|
|
2024-02-05 21:50:43 +01:00
|
|
|
// Non-free dependencies:
|
2024-03-13 22:39:17 +01:00
|
|
|
playImplementation 'com.google.android.play:core-ktx:1.8.1'
|
|
|
|
compileOnly "com.google.android.wearable:wearable:2.9.0"
|
2024-02-05 21:50:43 +01:00
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
// this one can not be updated? TODO: need to get an alternative
|
2024-02-05 21:50:43 +01:00
|
|
|
androidTestImplementation 'com.nanohttpd:nanohttpd:2.1.1'
|
2024-04-18 23:56:00 +02:00
|
|
|
|
2024-03-13 22:39:17 +01:00
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"
|
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-contrib:3.5.1"
|
|
|
|
androidTestImplementation "androidx.test.espresso:espresso-intents:3.5.1"
|
|
|
|
androidTestImplementation "androidx.test:runner:1.5.2"
|
|
|
|
androidTestImplementation "androidx.test:rules:1.5.0"
|
2024-02-14 07:09:48 +01:00
|
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
2024-05-05 15:46:34 +02:00
|
|
|
androidTestImplementation 'org.awaitility:awaitility:4.2.1'
|
2024-02-25 11:28:34 +01:00
|
|
|
|
|
|
|
// Non-free dependencies:
|
|
|
|
|
2024-03-13 22:39:17 +01:00
|
|
|
testImplementation "androidx.test:core:1.5.0"
|
2024-05-05 15:46:34 +02:00
|
|
|
testImplementation 'org.awaitility:awaitility:4.2.1'
|
2024-03-13 22:39:17 +01:00
|
|
|
testImplementation "junit:junit:4.13.2"
|
2024-02-25 11:28:34 +01:00
|
|
|
testImplementation 'org.mockito:mockito-inline:5.2.0'
|
2024-07-08 21:16:05 +02:00
|
|
|
testImplementation 'org.robolectric:robolectric:4.13'
|
2024-02-25 11:28:34 +01:00
|
|
|
testImplementation 'javax.inject:javax.inject:1'
|
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
playImplementation 'com.google.android.gms:play-services-base:18.5.0'
|
2024-02-25 11:28:34 +01:00
|
|
|
freeImplementation 'org.conscrypt:conscrypt-android:2.5.2'
|
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
playApi 'androidx.mediarouter:mediarouter:1.7.0'
|
|
|
|
// playApi "com.google.android.support:wearable:2.9.0"
|
|
|
|
playApi 'com.google.android.gms:play-services-cast-framework:21.5.0'
|
2024-02-25 11:28:34 +01:00
|
|
|
}
|
|
|
|
|
2024-06-23 19:58:04 +02:00
|
|
|
apply plugin: "io.realm.kotlin"
|
2024-02-05 21:50:43 +01:00
|
|
|
|
2024-02-20 11:30:25 +01:00
|
|
|
if (project.hasProperty("podciniPlayPublisherCredentials")) {
|
2024-02-05 21:50:43 +01:00
|
|
|
apply plugin: 'com.github.triplet.play'
|
|
|
|
play {
|
|
|
|
track.set('alpha')
|
2024-02-20 11:30:25 +01:00
|
|
|
serviceAccountCredentials.set(file(podciniPlayPublisherCredentials))
|
2024-02-05 21:50:43 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-14 07:09:48 +01:00
|
|
|
tasks.register('copyLicense', Copy) {
|
2024-02-05 21:50:43 +01:00
|
|
|
from "../LICENSE"
|
|
|
|
into "src/main/assets/"
|
|
|
|
rename { String fileName ->
|
|
|
|
fileName + ".txt"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
preBuild.dependsOn copyLicense
|