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

Commit 27129c19 authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

test ci catalog

parent 63a74ffd
Loading
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ workflow:

variables:
  GRADLE_USER_HOME: "$CI_PROJECT_DIR/.gradle"
  GRADLE_OPTS: "-Dorg.gradle.daemon=false"
  SENTRY_DSN: $SENTRY_DSN
  USER_AGENT: $USER_AGENT
  APK_PATH: "app/build/outputs/apk/release"
  UNSIGNED_APK: "AppLounge_release.apk"
  COMMUNITY_APK: "AppLounge_release_community.apk"
@@ -22,6 +22,10 @@ stages:
  - publish

include:
  - component: gitlab.e.foundation/e/os/ci-catalog/build-release@main
    inputs:
      java_version: "21"
      runner_tag: android-app
  - project: "e/templates"
    ref: main
    file: "/.gitlab/gitlab-ci/gitlab-ci-auto-merge-main.yml"
@@ -36,7 +40,6 @@ auto_merge_main:
    TARGET_BRANCH: main

before_script:
  - export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
  - echo user_agent=$USER_AGENT > local.properties

.build_rules: &build_rules
@@ -91,15 +94,6 @@ before_script:
  interruptible: false
  allow_failure: true

build-release:
  <<: *build_rules
  stage: build
  script:
    - ./gradlew assembleRelease
  artifacts:
    paths:
      - app/build/outputs/apk/release

analysis:
  stage: code-quality
  <<: *build_rules
+9 −7
Original line number Diff line number Diff line
@@ -46,6 +46,14 @@ def getSentryDsn = { ->
    return properties.getProperty('SENTRY_DSN')
}

def getUserAgent = { ->

    def sentryDsnEnv = System.getenv("USER_AGENT")
    if (sentryDsnEnv != null) {
        return sentryDsnEnv
    }
}

def jacocoFileFilter = [
        '**/R.class',
        '**/R$*',
@@ -175,7 +183,7 @@ android {

        buildConfigField "String", "BUILD_ID", "\"${getGitHash() + "." + getDate()}\""
        buildConfigField("String", "SENTRY_DSN", "\"${getSentryDsn()}\"")
        buildConfigField "String", "USER_AGENT", "\"${retrieveKey("user_agent", "Dalvik/2.1.0 (Linux; U; Android %s)")}\""
        buildConfigField("String", "USER_AGENT", "\"${getUserAgent()}\"")
        buildConfigField "String", "FDROID_HOST", "\"${fdroidHost}\""
        buildConfigField "String", "FDROID_REPO_BASE_URL", "\"https://${fdroidHost}/repo/\""

@@ -460,9 +468,3 @@ dependencies {
    androidTestImplementation(libs.compose.ui.text)
}
def retrieveKey(String keyName, String defaultValue) {
    Properties properties = new Properties()
    properties.load(project.rootProject.file('local.properties').newDataInputStream())

    return properties.getProperty(keyName, defaultValue)
}