Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Auto detect text files and perform LF normalization
* text=auto

gradlew binary linguist-generated
gradlew.bat binary linguist-generated
125 changes: 71 additions & 54 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import com.android.build.api.variant.FilterConfiguration
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion

plugins {
id 'com.android.application'
id 'com.google.devtools.ksp'
id 'kotlin-android'
}
Comment thread
HrBDev marked this conversation as resolved.

// apply Google Services and Firebase Crashlytics plugins conditionally
Expand Down Expand Up @@ -131,23 +134,27 @@ android {
'x86' : 8,
'x86_64' : 9
]
android.applicationVariants.configureEach { variant ->
variant.outputs.configureEach { output ->
def abi = output.getFilter(com.android.build.OutputFile.ABI)
if (abi != null) {
// ABI-specific output: assign the correct per-ABI version code
// eg for arm64-v8a: 3 * 10000000 + versionCode
def v = project.ext.versionCodes.get(abi) * 10000000 + variant.versionCode
output.versionCodeOverride = v
} else {
// universal APK: preserve existing production behaviour (arm64-v8a multiplier)
// so installed universal APKs are not treated as a downgrade
// when splits are disabled (e.g. alpha builds), firstAbi is null; fall back to
// the arm64-v8a multiplier (3) so versionCode arithmetic still works
def firstAbi = variant.outputs.first().getFilter(com.android.build.OutputFile.ABI)
def multiplier = firstAbi != null ? project.ext.versionCodes.get(firstAbi) : project.ext.versionCodes.get('arm64-v8a')
def v = multiplier * 10000000 + variant.versionCode
output.versionCodeOverride = v

androidComponents {
onVariants(selector().all()) { variant ->
variant.outputs.each { output ->
def abi = output.filters.find { it.filterType == FilterConfiguration.FilterType.ABI }?.identifier
if (abi != null) {
// ABI-specific output: assign the correct per-ABI version code
// eg for arm64-v8a: 3 * 10000000 + versionCode
def v = project.ext.versionCodes.get(abi) * 10000000 + output.versionCode.get()
output.versionCode.set(v)
} else {
// universal APK: preserve existing production behaviour (arm64-v8a multiplier)
// so installed universal APKs are not treated as a downgrade
// when splits are disabled (e.g. alpha builds), firstAbi is null; fall back to
// the arm64-v8a multiplier (3) so versionCode arithmetic still works
def firstAbi = variant.outputs.find { it.filters.any { f -> f.filterType == FilterConfiguration.FilterType.ABI } }
?.filters?.find { it.filterType == FilterConfiguration.FilterType.ABI }?.identifier
def multiplier = firstAbi != null ? project.ext.versionCodes.get(firstAbi) : project.ext.versionCodes.get('arm64-v8a')
def v = multiplier * 10000000 + output.versionCode.get()
output.versionCode.set(v)
}
}
}
}
Expand Down Expand Up @@ -209,16 +216,21 @@ android {
}
}
}
kotlinOptions {
jvmTarget = '17'
freeCompilerArgs += [
'-Xsuppress-warning=SENSELESS_COMPARISON'
]

kotlin {
compilerOptions {
languageVersion = KotlinVersion.KOTLIN_2_3
jvmTarget = JvmTarget.JVM_17
freeCompilerArgs.addAll([
'-Xsuppress-warning=SENSELESS_COMPARISON'
])
}
}

buildFeatures {
viewBinding true
buildConfig true
resValues true
}

compileOptions {
Expand Down Expand Up @@ -287,42 +299,42 @@ def firestackDependency = { ->
}

dependencies {
def room_version = "2.8.1"
def paging_version = "3.3.6"
def room_version = "2.8.4"
def paging_version = "3.5.0"

implementation 'com.google.guava:guava:33.6.0-android'

// https://developer.android.com/studio/write/java8-support
// included to fix issues with Android 6 support, issue#563
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")

fullImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.20'
fullImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.3.21'
fullImplementation 'androidx.appcompat:appcompat:1.7.1'
fullImplementation 'androidx.core:core-ktx:1.17.0'
fullImplementation 'androidx.core:core-ktx:1.19.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
fullImplementation 'androidx.constraintlayout:constraintlayout:2.2.1'
fullImplementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
fullImplementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0'

fullImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2'
fullImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2'
fullImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0'
fullImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0'

// LiveData
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.9.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.10.0'

implementation 'com.google.code.gson:gson:2.13.2'
implementation 'com.google.code.gson:gson:2.14.0'

implementation "androidx.room:room-runtime:$room_version"
ksp "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.room:room-paging:$room_version"

fullImplementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.4'
fullImplementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.9.4'
fullImplementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.10.0'
fullImplementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.10.0'

// Pagers Views
implementation "androidx.paging:paging-runtime-ktx:$paging_version"
fullImplementation 'androidx.fragment:fragment-ktx:1.8.9'
implementation 'com.google.android.material:material:1.13.0'
implementation 'com.google.android.material:material:1.14.0'
fullImplementation 'androidx.viewpager2:viewpager2:1.1.0'

fullImplementation 'com.squareup.okhttp3:okhttp:5.3.2'
Expand All @@ -332,7 +344,7 @@ dependencies {
fullImplementation 'com.squareup.retrofit2:retrofit:3.0.0'
fullImplementation 'com.squareup.retrofit2:converter-gson:3.0.0'

implementation 'com.squareup.okio:okio-jvm:3.16.4'
implementation 'com.squareup.okio:okio-jvm:3.17.0'
// Glide
fullImplementation('com.github.bumptech.glide:glide:5.0.7') {
exclude group: 'glide-parent'
Expand All @@ -348,11 +360,11 @@ dependencies {
fullImplementation 'com.facebook.shimmer:shimmer:0.5.0'

// Koin core
download 'io.insert-koin:koin-core:4.1.1'
implementation 'io.insert-koin:koin-core:4.1.1'
download 'io.insert-koin:koin-core:4.2.1'
implementation 'io.insert-koin:koin-core:4.2.1'
// Koin main (Scope, ViewModel ...)
download 'io.insert-koin:koin-android:4.1.1'
implementation 'io.insert-koin:koin-android:4.1.1'
download 'io.insert-koin:koin-android:4.2.1'
implementation 'io.insert-koin:koin-android:4.2.1'

download 'hu.autsoft:krate:2.0.0'
implementation 'hu.autsoft:krate:2.0.0'
Expand All @@ -368,7 +380,7 @@ dependencies {
playImplementation firestackDependency()

// Work manager
implementation('androidx.work:work-runtime-ktx:2.11.0') {
implementation('androidx.work:work-runtime-ktx:2.11.2') {
modules {
module("com.google.guava:listenablefuture") {
replacedBy("com.google.guava:guava", "listenablefuture is part of guava")
Expand All @@ -378,8 +390,8 @@ dependencies {

// for handling IP addresses and subnets, both IPv4 and IPv6
// seancfoley.github.io/IPAddress/ipaddress.html
download 'com.github.seancfoley:ipaddress:5.5.1'
implementation 'com.github.seancfoley:ipaddress:5.5.1'
download 'com.github.seancfoley:ipaddress:5.6.2'
implementation 'com.github.seancfoley:ipaddress:5.6.2'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
Expand All @@ -388,20 +400,20 @@ dependencies {
testImplementation 'org.robolectric:robolectric:4.16.1'
testImplementation 'androidx.test:core:1.7.0'
testImplementation 'androidx.test.ext:junit:1.3.0'
testImplementation 'org.mockito:mockito-core:5.21.0'
testImplementation 'org.mockito:mockito-core:5.23.0'
// Added test dependencies for comprehensive testing
testImplementation 'io.mockk:mockk:1.14.9'
testImplementation 'io.mockk:mockk-android:1.14.9'
testImplementation 'io.mockk:mockk:1.14.11'
testImplementation 'io.mockk:mockk-android:1.14.11'
testImplementation 'androidx.arch.core:core-testing:2.2.0'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2'
testImplementation 'io.insert-koin:koin-test:4.1.1'
testImplementation 'io.insert-koin:koin-test-junit4:4.1.1'
androidTestImplementation 'io.mockk:mockk-android:1.14.9'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.11.0'
testImplementation 'io.insert-koin:koin-test:4.2.1'
testImplementation 'io.insert-koin:koin-test-junit4:4.2.1'
androidTestImplementation 'io.mockk:mockk-android:1.14.11'

leakCanaryImplementation 'com.squareup.leakcanary:leakcanary-android:2.14'

fullImplementation 'androidx.navigation:navigation-fragment-ktx:2.9.6'
fullImplementation 'androidx.navigation:navigation-ui-ktx:2.9.6'
fullImplementation 'androidx.navigation:navigation-fragment-ktx:2.9.8'
fullImplementation 'androidx.navigation:navigation-ui-ktx:2.9.8'

fullImplementation 'androidx.biometric:biometric:1.1.0'

Expand All @@ -419,6 +431,11 @@ dependencies {

// for confetti animation
fullImplementation 'nl.dionsegijn:konfetti-xml:2.0.5'

constraints {
implementation("androidx.annotation:annotation-experimental:1.6.0")
}

// for in-app purchases
playImplementation 'com.android.billingclient:billing:8.3.0'
websiteImplementation 'com.android.billingclient:billing:8.3.0'
Expand Down Expand Up @@ -451,11 +468,11 @@ dependencies {
implementation 'com.waseemsabir:betterypermissionhelper:1.0.3'

// Firebase dependencies for error reporting (website and play variants only)
websiteImplementation platform('com.google.firebase:firebase-bom:34.7.0')
websiteImplementation platform('com.google.firebase:firebase-bom:34.14.1')
websiteImplementation 'com.google.firebase:firebase-crashlytics'
websiteImplementation 'com.google.firebase:firebase-crashlytics-ndk'

playImplementation platform('com.google.firebase:firebase-bom:34.7.0')
playImplementation platform('com.google.firebase:firebase-bom:34.14.1')
playImplementation 'com.google.firebase:firebase-crashlytics'
playImplementation 'com.google.firebase:firebase-crashlytics-ndk'
}
14 changes: 6 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '2.1.20'
ext.kotlin_version = '2.3.21'
repositories {
google()
// https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
// jcenter() is no longer getting updates, instead using mavenCentral
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.13.1'
classpath 'com.android.tools.build:gradle:9.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// add firebase plugins - will be conditionally applied in app/build.gradle
def taskNames = gradle.startParameter.taskNames.join(',').toLowerCase()
Expand All @@ -25,20 +25,18 @@ buildscript {
println("app; deGoogled? $deGoogled (fdroidBuild: $fdroidBuild, fdroidBuildServer: $isFdroidBuildServer, apkBuild: $apkBuild)")

if (!deGoogled) {
classpath 'com.google.gms:google-services:4.4.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.6'
classpath 'com.google.gms:google-services:4.4.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.7'
}
}
}

plugins {
id 'com.google.devtools.ksp' version '2.1.20-2.0.1' apply false
id 'com.google.devtools.ksp' version '2.3.9' apply false
}

allprojects {
repositories {
google()
mavenCentral()

def firestackRepo = project.findProperty("firestackRepo") ?: "github"

Expand All @@ -63,5 +61,5 @@ allprojects {
}

tasks.register('clean', Delete) {
delete rootProject.buildDir
delete layout.buildDirectory
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
9 changes: 6 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#Mon Apr 17 17:05:36 IST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading