1
0
mirror of https://github.com/vector-im/riotX-android synced 2025-10-06 00:02:48 +02:00

Compare commits

...

44 Commits

Author SHA1 Message Date
Adam Brown
9ecdc49c61 including failure output in the PR 2022-08-25 14:46:00 +01:00
Adam Brown
2df3e4b30c causing screenshot tests to fail and running screenshot verification on the ci 2022-08-25 14:45:44 +01:00
Adam Brown
0a7062aef0 including screenshot test output to showcase comparisons -
these should not be merged directly into the repo but instead pulled in via git lfs
2022-08-25 14:29:17 +01:00
Adam Brown
fa3af58734 add screenshot tests around the combined server selection 2022-08-25 14:28:12 +01:00
Adam Brown
852d905985 switching button to material button as the colorPrimary isn't working with the default button 2022-08-25 14:27:43 +01:00
Adam Brown
d7555e94ca extracting inline fragment view logic to a controller 2022-08-25 14:27:06 +01:00
Adam Brown
7d6dcc00a4 adding room settings example 2022-08-25 12:24:39 +01:00
Adam Brown
58536f3341 adding paparazzi screenshot testing lib setup 2022-08-25 11:12:49 +01:00
Adam Brown
8b5a49c580 enabling build caching by default to improve build times 2022-08-11 15:26:43 +01:00
Adam Brown
8f5ff962e2 split commit to make fdroid changes to avoid files being seen as new 2022-08-11 15:23:18 +01:00
Adam Brown
e447795981 lifting fdroid and gplay variants to the application module 2022-08-11 15:23:08 +01:00
Adam Brown
5bea463021 split commit to make debug changes to avoid files being seen as new! 2022-08-11 15:21:39 +01:00
Adam Brown
cbb95c3fe8 lifting debug build type to the application module 2022-08-11 15:14:49 +01:00
Adam Brown
b4e6b64ecb lifting the release build type to the application module 2022-08-11 15:12:28 +01:00
Adam Brown
704fbf5d14 lifting nightly to the application module 2022-08-11 15:07:40 +01:00
Adam Brown
2440844eca moving all the strings to a dedicated libray/strings module 2022-08-11 14:14:54 +01:00
Adam Brown
b3f3c24802 merging with develop 2022-08-11 11:29:52 +01:00
Adam Brown
487a9a4cc6 adding fragment testing dependency as a possible solution for missing jacoco agent on CI 2022-08-11 11:20:14 +01:00
Adam Brown
e577c85640 moving application based tests to the vector-app module
- they require the VectorApplication to trigger
2022-08-11 11:20:14 +01:00
Adam Brown
7f28761327 applying missing nightly build type config 2022-08-11 11:20:14 +01:00
Adam Brown
1772cec39e avoiding spawing a daemon for the CI quality checks 2022-08-11 11:20:14 +01:00
Adam Brown
823be50187 fixing typo in changelog 2022-08-11 11:20:14 +01:00
Adam Brown
028e6cf87d tweaking ci lint memory allowance 2022-08-11 11:20:14 +01:00
Adam Brown
f3056ec519 merging with develop 2022-08-11 11:20:14 +01:00
Adam Brown
3e56233b76 attempting to redistibute lint memory allowance to fix OOM 2022-08-11 11:20:14 +01:00
Adam Brown
5a507dd0e4 lifting the application launcher colour to the application module 2022-08-11 11:20:14 +01:00
Adam Brown
ec82959845 lifting the application config and icon to the application module 2022-08-11 11:20:14 +01:00
Adam Brown
4832ecdab1 adding changelog entry 2022-08-11 11:20:14 +01:00
Adam Brown
aa2d82a97b using entry point instead of manually fetching fields from application 2022-08-11 11:20:14 +01:00
Adam Brown
fd661540ca lifting the phonenumber dependency to the deps file and exposing as api for the app level module 2022-08-11 11:20:14 +01:00
Adam Brown
f4e990461e using the vector-app module to handle recursively applying lint 2022-08-11 11:20:14 +01:00
Adam Brown
eb7a5bf098 reusing lint file 2022-08-11 11:20:14 +01:00
Adam Brown
69185d0a21 renaming output apks to match the previous name 2022-08-11 11:20:14 +01:00
Adam Brown
476e9b2dba moving imports around to match application/library split 2022-08-11 11:20:14 +01:00
Adam Brown
84e3ce80f9 copying the vector lint config for the top level application 2022-08-11 11:20:14 +01:00
Adam Brown
bf866f6faa moving font certs file to the module that uses it 2022-08-11 11:20:14 +01:00
Adam Brown
3a7f78167a updating artifact paths to match new module location 2022-08-11 11:20:14 +01:00
Adam Brown
7a640a4cc4 lifting the manifest provider references to the app module manifest 2022-08-11 11:20:14 +01:00
Adam Brown
cf250bc3b5 reording import 2022-08-11 11:20:14 +01:00
Adam Brown
286d37f4a3 avoid clashing buildconfig and moving placeholders to the modules which uses them 2022-08-11 11:20:14 +01:00
Adam Brown
73e4f89157 adding library support for the android-stem plugin 2022-08-11 11:20:14 +01:00
Adam Brown
ae65e48512 introducing vector-app module to act as the top level application 2022-08-11 11:20:14 +01:00
Adam Brown
7b9bab5399 using build meta for application id 2022-08-11 11:20:14 +01:00
Adam Brown
4cf03ed4c8 using non final id reference for stub id, ids in library modules are not final 2022-08-11 11:20:14 +01:00
343 changed files with 933 additions and 538 deletions

View File

@@ -40,7 +40,7 @@ jobs:
with:
name: vector-${{ matrix.target }}-debug
path: |
vector/build/outputs/apk/*/debug/*.apk
vector-app/build/outputs/apk/*/debug/*.apk
release:
name: Build unsigned GPlay APKs
@@ -65,7 +65,7 @@ jobs:
with:
name: vector-gplay-release-unsigned
path: |
vector/build/outputs/apk/*/release/*.apk
vector-app/build/outputs/apk/*/release/*.apk
exodus:
runs-on: ubuntu-latest

View File

@@ -7,7 +7,7 @@ on:
# Enrich gradle.properties for CI/CD
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -XX:MaxPermSize=512m -Dkotlin.daemon.jvm.options="-Xmx2g" -Dkotlin.incremental=false
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon
jobs:
@@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v3
- name: Run knit
run: |
./gradlew knitCheck
./gradlew knitCheck $CI_GRADLE_ARG_PROPERTIES
# Check the project: ktlint, detekt, lint
lint:
@@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v3
- name: Run ktlint
run: |
./gradlew ktlintCheck --continue
./gradlew ktlintCheck $CI_GRADLE_ARG_PROPERTIES --continue
- name: Run detekt
if: always()
run: |
@@ -49,8 +49,8 @@ jobs:
- name: Run lint
# Not always, if ktlint or detekt fail, avoid running the long lint check.
run: |
./gradlew lintGplayRelease $CI_GRADLE_ARG_PROPERTIES
./gradlew lintFdroidRelease $CI_GRADLE_ARG_PROPERTIES
./gradlew vector-app:lintGplayRelease $CI_GRADLE_ARG_PROPERTIES
./gradlew vector-app:lintFdroidRelease $CI_GRADLE_ARG_PROPERTIES
- name: Upload reports
if: always()
uses: actions/upload-artifact@v3

View File

@@ -49,31 +49,9 @@ jobs:
disable-animations: true
emulator-build: 7425822
script: |
./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES
./gradlew gatherGplayDebugStringTemplates $CI_GRADLE_ARG_PROPERTIES
./gradlew vector:verifyPaparazziDebug $CI_GRADLE_ARG_PROPERTIES
# 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
if: always() && steps.tests.outcome == 'failure' # don't run if previous step succeeded.
with:
api-level: 28
arch: x86
profile: Nexus 5X
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
emulator-build: 7425822
script: |
./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
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 }}
- name: Format unit test results
if: always()

View File

@@ -32,6 +32,8 @@ buildscript {
classpath 'org.owasp:dependency-check-gradle:7.1.1'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.7.10"
classpath "org.jetbrains.kotlinx:kotlinx-knit:0.4.0"
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
classpath 'app.cash.paparazzi:paparazzi-gradle-plugin:1.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

1
changelog.d/3955.misc Normal file
View File

@@ -0,0 +1 @@
Creates a dedicated strings module

1
changelog.d/6407.misc Normal file
View File

@@ -0,0 +1 @@
Converts the vector module to a library with a parent vector-app application module

View File

@@ -28,8 +28,8 @@ def initializeReport(report, projects, classExcludes) {
report.executionData {
fileTree(rootProject.rootDir.absolutePath).include(
"**/build/**/*.exec",
"**/build/outputs/code_coverage/**/coverage.ec",
"**/build/**/*.exec",
"**/build/outputs/code_coverage/**/coverage.ec",
)
}
report.reports {
@@ -74,18 +74,18 @@ def collectProjects(predicate) {
task generateCoverageReport(type: JacocoReport) {
outputs.upToDateWhen { false }
rootProject.apply plugin: 'jacoco'
def projects = collectProjects { ['vector', 'matrix-sdk-android'].contains(it.name) }
def projects = collectProjects { ['vector-app', 'vector', 'matrix-sdk-android'].contains(it.name) }
initializeReport(it, projects, excludes)
}
task unitTestsWithCoverage(type: GradleBuild) {
// the 7.1.3 android gradle plugin has a bug where enableTestCoverage generates invalid coverage
startParameter.projectProperties.coverage = [enableTestCoverage: false]
startParameter.projectProperties.coverage = [enableTestCoverage: false]
tasks = [':vector:testGplayDebugUnitTest', ':matrix-sdk-android:testDebugUnitTest']
}
task instrumentationTestsWithCoverage(type: GradleBuild) {
startParameter.projectProperties.coverage = [enableTestCoverage: true]
startParameter.projectProperties.coverage = [enableTestCoverage: true]
startParameter.projectProperties['android.testInstrumentationRunnerArguments.notPackage'] = 'im.vector.app.ui'
tasks = [':vector:connectedGplayDebugAndroidTest', 'matrix-sdk-android:connectedDebugAndroidTest']
tasks = [':vector-app:connectedGplayDebugAndroidTest', ':vector:connectedGplayDebugAndroidTest', 'matrix-sdk-android:connectedDebugAndroidTest']
}

View File

@@ -85,6 +85,8 @@ ext.libs = [
'material' : "com.google.android.material:material:1.6.1",
'appdistributionApi' : "com.google.firebase:firebase-appdistribution-api-ktx:$appDistribution",
'appdistribution' : "com.google.firebase:firebase-appdistribution:$appDistribution",
// Phone number https://github.com/google/libphonenumber
'phonenumber' : "com.googlecode.libphonenumber:libphonenumber:8.12.53"
],
dagger : [
'dagger' : "com.google.dagger:dagger:$dagger",

View File

@@ -42,6 +42,7 @@ ext.groups = [
regex: [
],
group: [
'app.cash.paparazzi',
'ch.qos.logback',
'com.adevinta.android',
'com.airbnb.android',
@@ -145,11 +146,14 @@ ext.groups = [
'it.unimi.dsi',
'jakarta.activation',
'jakarta.xml.bind',
'javax.activation',
'javax.annotation',
'javax.inject',
'javax.xml.bind',
'jline',
'jp.wasabeef',
'junit',
'kxml2',
'me.saket',
'net.bytebuddy',
'net.java',
@@ -178,11 +182,13 @@ ext.groups = [
'org.hamcrest',
'org.jacoco',
'org.java-websocket',
'org.jcodec',
'org.jetbrains',
'org.jetbrains.dokka',
'org.jetbrains.intellij.deps',
'org.jetbrains.kotlin',
'org.jetbrains.kotlinx',
'org.jetbrains.trove4j',
'org.json',
'org.jsoup',
'org.junit',

View File

@@ -12,10 +12,12 @@ org.gradle.jvmargs=-Xmx4g -Xms512M -XX:MaxPermSize=2048m -XX:MaxMetaspaceSize=1g
org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.vfs.watch=true
org.gradle.caching=true
# Android Settings
android.enableJetifier=true
android.useAndroidX=true
android.jetifier.ignorelist=android-base-common,common
#Project Settings
# Change debugPrivateData to true for debugging

View File

@@ -0,0 +1,22 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'com.likethesalad.stem-library'
}
android {
compileSdk versions.compileSdk
defaultConfig {
minSdk versions.minSdk
targetSdk versions.targetSdk
}
compileOptions {
sourceCompatibility versions.sourceCompat
targetCompatibility versions.targetCompat
}
kotlinOptions {
jvmTarget = "11"
}
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="im.vector.lib.strings" />

Some files were not shown because too many files have changed in this diff Show More