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

Commit fe80a4c9 authored by Aayush Gupta's avatar Aayush Gupta Committed by Romain Hunault
Browse files

Apps: Upstream, Cleanup and CI

parent d957da8d
Loading
Loading
Loading
Loading
+67 −6
Original line number Diff line number Diff line
image: "registry.gitlab.e.foundation:5000/e/apps/docker-android-apps-cicd:latest"

stages:
- build
- debug
- release

before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew

build:
  stage: build
# Debug build related jobs
buildDebug:
  stage: debug
  script:
  - ./gradlew build
    - ./gradlew assembleDebug
  artifacts:
    paths:
      - app/build/outputs/apk/

# Default lint configuration for debug builds
# Manual as we don't want to run them generally for debug builds
.lintDebugDefault:
  stage: debug
  when: manual
  allow_failure: true

lintDebug:
  extends: .lintDebugDefault
  script:
    - ./gradlew lintDebug
  artifacts:
    paths:
      - app/build/reports/

ktlintDebug:
  extends: .lintDebugDefault
  script:
    - ./gradlew app:ktlintCheck --info
  artifacts:
    paths:
      - app/build/reports/ktlint/

# Release build related jobs

# Default configuration for release builds
# Only on "master" and "merge_request_event"
.releaseDefault:
  stage: release
  allow_failure: false
  rules:
    - if: '$CI_COMMIT_BRANCH == "master"'
      when: always
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
      when: always

buildRelease:
  extends: .releaseDefault
  script:
    - ./gradlew assembleRelease
  artifacts:
    paths:
      - app/build/outputs/apk/

lintRelease:
  extends: .releaseDefault
  script:
    - ./gradlew lintRelease
  artifacts:
    paths:
      - app/build/reports/

ktlintRelease:
  extends: .releaseDefault
  script:
    - ./gradlew app:ktlintCheck --info
  artifacts:
    paths:
      - app/build/reports/ktlint/
 No newline at end of file
+14 −20
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ plugins {
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'kotlin-parcelize'
    id "org.jlleitschuh.gradle.ktlint" version "10.1.0"
}

android {
@@ -30,26 +31,18 @@ android {

    buildTypes {
        debug {
            applicationIdSuffix ".debug"
            signingConfig signingConfigs.config
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        platform {
            signingConfig signingConfigs.config
        }
    }
    buildFeatures {
        viewBinding true
    }
    lintOptions {
        lintConfig file("lint.xml")
        disable 'MissingTranslation'
        disable 'NullSafeMutableLiveData'
    }
    aaptOptions {
        additionalParameters '-I', 'app/e-ui-sdk.jar'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
@@ -60,21 +53,22 @@ android {
    }
}

ktlint {
    disabledRules = ["no-wildcard-imports"]
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.3.0-rc01'
    implementation "com.google.android.material:material:1.3.0"
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation "com.google.android.material:material:1.4.0"
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation fileTree(include: ['*.jar'], dir: 'libs')

    // eOS
    compileOnly files("e-ui-sdk.jar")

    // Preference
    implementation "androidx.preference:preference-ktx:1.1.1"

@@ -82,13 +76,13 @@ dependencies {
    implementation 'org.bouncycastle:bcpg-jdk15on:1.60'

    // GSON
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.google.code.gson:gson:2.8.7'

    // PhotoView
    implementation "com.github.chrisbanes:PhotoView:2.3.0"

    // RecyclerView
    implementation 'androidx.recyclerview:recyclerview:1.2.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'

    // WorkManager
    implementation 'androidx.work:work-runtime-ktx:2.5.0'
@@ -110,7 +104,7 @@ dependencies {
    implementation "com.trello.rxlifecycle3:rxlifecycle-components-preference:$rxlifecycle_version"

    // Jackson
    def jackson_version = "2.12.2"
    def jackson_version = "2.12.3"
    implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
    implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
    implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"

app/e-ui-sdk.jar

deleted100644 → 0
−122 KiB

File deleted.

+2 −0
Original line number Diff line number Diff line
@@ -2,4 +2,6 @@
    <issue id="InvalidPackage">
        <ignore path="**/org.bouncycastle*.jar"/>
    </issue>
    <issue id="NullSafeMutableLiveData" severity="warning"/>
    <issue id="MissingTranslation" severity="warning"/>
</lint>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@
            android:name=".pwa.PwaInstaller"
            android:theme="@style/FullScreenTheme" />
        <activity
            android:name=".XAPK.InstallSplitApksActivity"
            android:name=".xapk.InstallSplitApksActivity"
            android:configChanges="screenSize|orientation|keyboardHidden"
            android:launchMode="singleInstance"
            android:theme="@style/AppTheme1"
Loading