Skip to content

Commit

Permalink
Fix rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Renaud committed Aug 23, 2022
1 parent 4388396 commit 7bb09c9
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 345 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,9 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
<<<<<<< HEAD
- name: Assemble ${{ matrix.target }} unsigned apk
run: ./gradlew clean assemble${{ matrix.target }}Release $CI_GRADLE_ARG_PROPERTIES --stacktrace
run: ./gradlew clean assemble${{ matrix.target }}Release $CI_GRADLE_ARG_PROPERTIES
- name: Upload ${{ matrix.target }} unsigned APKs
=======
- name: Assemble GPlay unsigned apk
run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES
- name: Upload Gplay unsigned APKs
>>>>>>> v1.4.32
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}-release-unsigned
Expand Down
151 changes: 0 additions & 151 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Code Quality Checks

on:
Expand Down Expand Up @@ -62,55 +61,12 @@ jobs:
- name: Prepare Danger
if: always()
run: |
<<<<<<< HEAD
results="$(cat */*/build/reports/ktlint/ktlint*/ktlint*.txt */build/reports/ktlint/ktlint*/ktlint*.txt | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g")"
if [ -z "$results" ]; then
echo "::set-output name=add_comment::false"
else
body="👎\`Failed${results}\`"
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
body="$( echo $body | sed 's/\/home\/runner\/work\/tchap-android\/tchap-android\//\`<br\/>\`/g')"
body="$( echo $body | sed 's/\/src\/main\/java\// 🔸 /g')"
body="$( echo $body | sed 's/im\/vector\/app\///g')"
body="$( echo $body | sed 's/im\/vector\/lib\/attachmentviewer\///g')"
body="$( echo $body | sed 's/im\/vector\/lib\/multipicker\///g')"
body="$( echo $body | sed 's/im\/vector\/lib\///g')"
body="$( echo $body | sed 's/org\/matrix\/android\/sdk\///g')"
body="$( echo $body | sed 's/\/src\/androidTest\/java\// 🔸 /g')"
echo "::set-output name=add_comment::true"
echo "::set-output name=body::$body"
fi
- name: Find Comment
if: always() && github.event_name == 'pull_request'
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Ktlint Results
- name: Add comment if needed
if: always() && github.event_name == 'pull_request' && steps.ktlint-results.outputs.add_comment == 'true'
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
### Ktlint Results
${{ steps.ktlint-results.outputs.body }}
edit-mode: replace
- name: Delete comment if needed
if: always() && github.event_name == 'pull_request' && steps.fc.outputs.comment-id != '' && steps.ktlint-results.outputs.add_comment == 'false'
uses: actions/github-script@v3
=======
npm install --save-dev @babel/core
npm install --save-dev @babel/plugin-transform-flow-strip-types
yarn add danger-plugin-lint-report --dev
- name: Danger lint
if: always()
uses: danger/[email protected]
>>>>>>> v1.4.32
with:
args: "--dangerfile tools/danger/dangerfile-lint.js"
env:
Expand All @@ -134,110 +90,3 @@ jobs:
with:
name: dependency-analysis
path: build/reports/dependency-check-report.html
<<<<<<< HEAD

# Lint for main module
android-lint:
name: Android Linter
runs-on: ubuntu-latest
# Allow all jobs on main and develop. Just one per PR.
concurrency:
group: ${{ github.ref == 'refs/heads/main' && format('android-lint-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('android-lint-develop-{0}', github.sha) || format('android-lint-{0}', github.ref) }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Lint analysis
run: ./gradlew clean :vector:lint --stacktrace $CI_GRADLE_ARG_PROPERTIES
- name: Upload reports
if: always()
uses: actions/upload-artifact@v3
with:
name: lint-report
path: |
vector/build/reports/*.*
# Lint for Gplay and Fdroid release APK
apk-lint:
name: Lint APK (${{ matrix.target }})
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
strategy:
fail-fast: false
matrix:
target: [ GplayBtchapWithoutvoipWithpinning, FdroidBtchapWithoutvoipWithoutpinning ]
# Allow all jobs on develop. Just one per PR.
concurrency:
group: ${{ github.ref == 'refs/heads/develop' && format('apk-lint-develop-{0}-{1}', matrix.target, github.sha) || format('apk-lint-{0}-{1}', matrix.target, github.ref) }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Lint ${{ matrix.target }} release
run: ./gradlew clean lint${{ matrix.target }}Release --stacktrace $CI_GRADLE_ARG_PROPERTIES
- name: Upload ${{ matrix.target }} linting report
if: always()
uses: actions/upload-artifact@v3
with:
name: release-lint-report-${{ matrix.target }}
path: |
vector/build/reports/*.*
detekt:
name: Detekt Analysis
runs-on: ubuntu-latest
# Allow all jobs on main and develop. Just one per PR.
concurrency:
group: ${{ github.ref == 'refs/heads/main' && format('detekt-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('detekt-develop-{0}', github.sha) || format('detekt-{0}', github.ref) }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Run detekt
run: |
./gradlew detekt $CI_GRADLE_ARG_PROPERTIES
- name: Upload reports
if: always()
uses: actions/upload-artifact@v3
with:
name: detekt-report
path: |
*/build/reports/detekt/detekt.html
# towncrier:
# name: Towncrier check
# runs-on: ubuntu-latest
# if: github.event_name == 'pull_request' && github.head_ref == 'develop'
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python 3.8
# uses: actions/setup-python@v4
# with:
# python-version: 3.8
# - name: Install towncrier
# run: |
# python3 -m pip install towncrier
# - name: Run towncrier
# # Fetch the pull request' base branch so towncrier will be able to
# # compare the current branch with the base branch.
# # Source: https://github.com/actions/checkout/#fetch-all-branches.
# run: |
# git fetch --no-tags origin +refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH}
# towncrier check --compare-with origin/${BASE_BRANCH}
# env:
# BASE_BRANCH: ${{ github.base_ref }}
=======
>>>>>>> v1.4.32
28 changes: 2 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,10 @@ jobs:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
emulator-build: 7425822
<<<<<<< HEAD
script: |
./gradlew unitTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES
=======
script: |
./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES
>>>>>>> v1.4.32
# NB: continue-on-error marks steps.tests.conclusion = 'success' but leaves stes.tests.outcome = 'failure'
- name: Run all the codecoverage tests at once (retry if emulator failed)
uses: reactivecircus/android-emulator-runner@v2
Expand All @@ -72,28 +65,16 @@ jobs:
disable-animations: true
emulator-build: 7425822
script: |
<<<<<<< HEAD
./gradlew unitTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage --stacktrace $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport --stacktrace $CI_GRADLE_ARG_PROPERTIES
# Tchap: Skip for forks
# - run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
# if: always() # we may have failed a previous step and retried, that's OK
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
=======
./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES
- run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
if: always() # we may have failed a previous step and retried, that's OK
# Tchap: Skip in forks
if: github.repository == 'vector-im/element-android' && always() # we may have failed a previous step and retried, that's OK
env:
GITHUB_TOKEN: ${{ secrets.SONARQUBE_GITHUB_API_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
>>>>>>> v1.4.32

- name: Format unit test results
if: always()
Expand Down Expand Up @@ -132,9 +113,4 @@ jobs:
# restore-keys: |
# ${{ runner.os }}-gradle-
# - name: Build Android Tests
<<<<<<< HEAD
# run: ./gradlew clean assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace
=======
# run: ./gradlew clean assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES

>>>>>>> v1.4.32
40 changes: 21 additions & 19 deletions vector-config/src/main/java/im/vector/app/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ package im.vector.app.config
* Set of flags to configure the application.
*/
object Config {

// Tchap: The spaces feature is hidden, show all rooms in the home
const val SHOW_SPACES = false
const val SPACES_SHOW_ALL_IN_HOME = !SHOW_SPACES

// Tchap: Hide voice message recorder button
const val SHOW_VOICE_RECORDER = false

// Tchap: Enable add messages reaction
const val SHOW_ADD_MESSAGE_REACTION = true

// Tchap: Enable editing messages
const val SHOW_EDIT_MESSAGE = true

/**
* Flag to allow external UnifiedPush distributors to be chosen by the user.
*
Expand All @@ -35,13 +49,10 @@ object Config {
* - Changing the value from `false` to `true` will let the user be able to select an external UnifiedPush distributor;
* - Changing the value from `true` to `false` will force the app to return to the background sync / Firebase Push.
*/
<<<<<<< HEAD
const val ALLOW_EXTERNAL_UNIFIED_PUSH_DISTRIBUTORS = false
=======
const val ALLOW_EXTERNAL_UNIFIED_PUSH_DISTRIBUTORS = true
const val ALLOW_EXTERNAL_UNIFIED_PUSH_DISTRIBUTORS = false // Tchap: Disable UnifiedPush (use Firebase/background sync)

const val ENABLE_LOCATION_SHARING = true
const val LOCATION_MAP_TILER_KEY = "fU3vlMsMn4Jb6dnEIFsx"
const val ENABLE_LOCATION_SHARING = false // Tchap: Disable Location Sharing
const val LOCATION_MAP_TILER_KEY = "" // Tchap: Disable Location Sharing

/**
* The maximum length of voice messages in milliseconds.
Expand All @@ -56,7 +67,7 @@ object Config {
/**
* The onboarding flow.
*/
val ONBOARDING_VARIANT = OnboardingVariant.FTUE_AUTH
val ONBOARDING_VARIANT = OnboardingVariant.LEGACY // Tchap: Use legacy login flow

/**
* If set, MSC3086 asserted identity messages sent on VoIP calls will cause the call to appear in the room corresponding to the asserted identity.
Expand All @@ -71,26 +82,17 @@ object Config {
* The analytics configuration to use for the Debug build type.
* Can be disabled by providing Analytics.Disabled
*/
val DEBUG_ANALYTICS_CONFIG = Analytics.PostHog(
postHogHost = "https://posthog.element.dev",
postHogApiKey = "phc_VtA1L35nw3aeAtHIx1ayrGdzGkss7k1xINeXcoIQzXN",
policyLink = "https://element.io/cookie-policy",
)
val DEBUG_ANALYTICS_CONFIG = Analytics.Disabled // Tchap: No analytic

/**
* The analytics configuration to use for the Release build type.
* Can be disabled by providing Analytics.Disabled
*/
val RELEASE_ANALYTICS_CONFIG = Analytics.PostHog(
postHogHost = "https://posthog.hss.element.io",
postHogApiKey = "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
policyLink = "https://element.io/cookie-policy",
)
val RELEASE_ANALYTICS_CONFIG = Analytics.Disabled // Tchap: No analytic

/**
* The analytics configuration to use for the Nightly build type.
* Can be disabled by providing Analytics.Disabled
*/
val NIGHTLY_ANALYTICS_CONFIG = RELEASE_ANALYTICS_CONFIG
>>>>>>> v1.4.32
val NIGHTLY_ANALYTICS_CONFIG = Analytics.Disabled // Tchap: No analytic
}
Loading

0 comments on commit 7bb09c9

Please sign in to comment.