Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6974a79 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '3695-main-upgrade_deps' into 'main'

Update edrive for a16

See merge request !317
parents ef843f80 c09b7a48
Loading
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ stages:
  - gitlab_release

before_script:
  - export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
  - export GRADLE_USER_HOME=$(pwd)/.gradle
  - chmod +x ./gradlew

@@ -46,8 +47,8 @@ build:
        exit 1
      fi
      cd "release"
    - unsigned_build=$(ls *.apk | grep "unsigned")
    - cp $unsigned_build $UNSIGNED_APK
    - unsigned_build=$(ls *.apk | grep "universal-release")
    - mv $unsigned_build $UNSIGNED_APK
  artifacts:
    paths:
      - app/build/outputs/apk/
+72 −58
Original line number Diff line number Diff line
plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)
}

def versionMajor = 1
def versionMinor = 8
def versionPatch = 1
def versionMinor = 9
def versionPatch = 0

def getTestProp(String propName) {
    def result = ""
@@ -35,47 +35,54 @@ def getSentryDsn = { ->
}

android {
    compileSdk 34
    namespace = 'foundation.e.drive'
    compileSdk = 36

    defaultConfig {
        applicationId "foundation.e.drive"
        minSdk 26
        targetSdk 34
        versionCode versionMajor * 1000000 + versionMinor * 1000 + versionPatch
        versionName "${versionMajor}.${versionMinor}.${versionPatch}"
        setProperty("archivesBaseName", "eDrive-$versionName")
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        applicationId = "foundation.e.drive"
        minSdk = 26
        targetSdk = 36
        versionCode = versionMajor * 1000000 + versionMinor * 1000 + versionPatch
        versionName = "${versionMajor}.${versionMinor}.${versionPatch}"
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

        manifestPlaceholders = [
                'appAuthRedirectScheme':  applicationId,
        ]
    }

    splits {
        abi {
            enable true
            reset()
            include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
            universalApk true
        }
    }

    signingConfigs {
        debugConfig {
            storeFile file("../keystore/platform.keystore")
            storePassword 'android'
            keyAlias 'platform'
            keyPassword 'android'
            storeFile = file("../keystore/platform.keystore")
            storePassword = 'android'
            keyAlias = 'platform'
            keyPassword = 'android'
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            minifyEnabled = false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig = signingConfigs.debugConfig
            buildConfigField("String", "SENTRY_DSN", "\"${getSentryDsn()}\"")
        }

        debug {
            signingConfig signingConfigs.debugConfig
            signingConfig = signingConfigs.debugConfig
            buildConfigField("String", "SENTRY_DSN", "\"dummy\"")
        }
    }

    kotlinOptions {
        jvmTarget = "11"
    }

    testOptions {
        unitTests {
            returnDefaultValues = true
@@ -87,50 +94,57 @@ android {
            }
        }
    }

    buildFeatures {
        viewBinding true
        buildConfig = true
        viewBinding = true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
        sourceCompatibility = JavaVersion.VERSION_21
        targetCompatibility = JavaVersion.VERSION_21
    }

    kotlinOptions {
        jvmTarget = "21"
    }
}

dependencies {
    implementation("foundation.e:Nextcloud-Android-Library:2.0.3-u2.17-release") {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    implementation(libs.nextcloud.android.library) {
        exclude group: 'com.gitlab.bitfireAT', module: 'dav4jvm' // Got from AccountManager
        exclude group: 'com.github.bitfireAT', module: 'dav4jvm'
        exclude group: 'org.ogce', module: 'xpp3' // unused in Android and brings wrong Junit version
    }

    implementation "commons-httpclient:commons-httpclient:3.1@jar"
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    api 'androidx.annotation:annotation:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation "androidx.constraintlayout:constraintlayout:2.1.4"
    implementation 'com.google.android.material:material:1.10.0'
    implementation 'com.github.bumptech.glide:glide:4.15.1'
    implementation 'com.github.bumptech.glide:annotations:4.15.1'
    implementation 'androidx.core:core-ktx:1.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
    implementation "androidx.work:work-runtime:2.9.0"
    implementation 'androidx.test:core:1.5.0'
    implementation 'com.jakewharton.timber:timber:5.0.1'
    implementation 'foundation.e:elib:0.0.1-alpha11'
    implementation 'foundation.e.lib:telemetry:1.0.1-release'


    androidTestImplementation 'androidx.test:runner:1.5.2'
    androidTestImplementation 'androidx.test:rules:1.5.0'
    androidTestImplementation 'androidx.annotation:annotation:1.7.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    androidTestImplementation 'junit:junit:4.13.2'

    testImplementation 'androidx.test:runner:1.5.2'
    testImplementation 'androidx.test:rules:1.5.0'

    testImplementation 'junit:junit:4.13.2'
    testImplementation 'org.robolectric:robolectric:4.7.3'
    testImplementation 'org.mockito:mockito-core:5.0.0'
    testImplementation 'androidx.work:work-testing:2.9.0'
    annotationProcessor libs.compiler

    api libs.annotation

    implementation libs.appcompat
    implementation libs.constraintlayout
    implementation libs.core
    implementation libs.core.ktx
    implementation libs.elib
    implementation libs.glide
    implementation libs.glide.annotations
    implementation libs.material
    implementation libs.telemetry
    implementation libs.timber
    implementation libs.work.runtime

    androidTestImplementation libs.annotation
    androidTestImplementation libs.espresso.core
    androidTestImplementation libs.junit
    androidTestImplementation libs.rules
    androidTestImplementation libs.runner

    testImplementation libs.junit
    testImplementation libs.mockito.core
    testImplementation libs.robolectric
    testImplementation libs.rules
    testImplementation libs.runner
    testImplementation libs.work.testing
}
+129 −18

File changed.

Preview size limit exceeded, changes collapsed.

+1 −2
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="foundation.e.drive">
    xmlns:tools="http://schemas.android.com/tools">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
+4 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import foundation.e.drive.utils.AppConstants
import foundation.e.drive.utils.DavClientProvider
import foundation.e.drive.work.WorkLauncher
import timber.log.Timber
import androidx.core.content.edit

class AccountAdder(private val context: Context) {

@@ -48,9 +49,9 @@ class AccountAdder(private val context: Context) {
    }

    private fun updateAccountNameOnPreference(name: String) {
        preferences.edit()
            .putString(AccountManager.KEY_ACCOUNT_NAME, name)
            .apply()
        preferences.edit {
            putString(AccountManager.KEY_ACCOUNT_NAME, name)
        }
    }

    /**
Loading