Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New closed groups implementation #1515

Closed
wants to merge 301 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
301 commits
Select commit Hold shift + click to select a range
fcd7993
WIP: use group leaving job
RyanRory Mar 27, 2023
dfbc7a1
make group leaving a job
RyanRory Mar 28, 2023
f377219
Merge branch 'dev' into conversation-long-press-menu
RyanRory Apr 12, 2023
633a07a
feat: delete group thread directly if current user is not a member of…
RyanRory Apr 12, 2023
eca2649
Merge remote-tracking branch 'origin/closed_groups' into closed_groups
0x330a Aug 23, 2023
ff057d7
Merge remote-tracking branch 'upstream/dev' into closed_groups
0x330a Aug 23, 2023
50bc298
feat: add note to self delete option
0x330a Aug 24, 2023
2621140
fix: some compile issues for themes from merge
0x330a Aug 24, 2023
8250603
fix: clear messages dialog
0x330a Aug 24, 2023
4e0d043
fix: remove clear all media dialog for now
0x330a Aug 24, 2023
eaddc44
feat: adding support for new closed groups, moving closed groups to b…
0x330a Aug 24, 2023
284ed16
feat: checkout latest libsession-util
0x330a Aug 24, 2023
eb30d17
feat: add basic group info wrapper to libsession util
0x330a Aug 24, 2023
9bf20a1
feat: implement a ustring from jstring for utils
0x330a Aug 24, 2023
efc88b4
feat: finish group info wrappers
0x330a Aug 25, 2023
bf4ef68
feat: add base wrappers to the remaining group configs
0x330a Aug 25, 2023
b6ff1de
Merge remote-tracking branch 'upstream/dev' into closed_groups
0x330a Aug 28, 2023
3a50ff1
feat: finish wrappers for current libsession group functions
0x330a Aug 28, 2023
faf1ba8
fix: group keys constructor
0x330a Aug 28, 2023
59c5588
feat: trying to solve byte array null error
0x330a Aug 29, 2023
77386a3
fix: group member and tests with passing constructors
0x330a Aug 29, 2023
980b838
Merge remote-tracking branch 'upstream/dev' into closed_groups
0x330a Aug 29, 2023
0692768
feat: testing key apis
0x330a Aug 29, 2023
b42b9fa
feat: adding more closed group in recipient logic, adding more wrappe…
0x330a Aug 30, 2023
51716e7
feat: update submodule to latest
0x330a Aug 30, 2023
63e156c
feat: wrappers and debugging get/set for the closed groups in user gr…
0x330a Aug 31, 2023
d19d123
fix: compile errors and moving the references to sessionId and broken…
0x330a Aug 31, 2023
afcce2f
chore: update to latest submodule
0x330a Aug 31, 2023
3fe2250
feat: finish user group wrappers and start volatile convo
0x330a Sep 1, 2023
84ebe44
feat: add group info
0x330a Sep 1, 2023
e818c55
feat: update libsession commit
0x330a Sep 4, 2023
993a2c4
Merge remote-tracking branch 'upstream/master' into closed_groups
0x330a Sep 4, 2023
76ae699
feat: finish most wrappers and compile issues, start new closed group…
0x330a Sep 4, 2023
f0df026
feat: add basic compose for create group and some reusable components
0x330a Sep 6, 2023
08c06a7
feat: add basic scaffold for create group view
0x330a Sep 6, 2023
026f005
feat: creating the basic storage code to test creating group in confi…
0x330a Sep 7, 2023
de885b4
feat: wiring together storage and configs for groups in a test way, e…
0x330a Sep 8, 2023
0cbb7ec
feat: update submodule
0x330a Sep 8, 2023
7c4bf73
Merge remote-tracking branch 'origin/closed_groups' into closed_groups
0x330a Sep 8, 2023
2527ac2
feat: add a basic config send sign with group key
0x330a Sep 8, 2023
6067916
feat: add finishing of group push for initial group creation and savi…
0x330a Sep 11, 2023
df29ed8
feat: start on closed group polling for new signatures
0x330a Sep 13, 2023
040696c
feat: introduce the handling of poll messages for closed group poller
0x330a Sep 13, 2023
82e3516
feat: basic polling happening with hashes merging
0x330a Sep 13, 2023
e8ade01
fix: implement hashcode and equals to make pollers unique in concurre…
0x330a Sep 13, 2023
51c3020
feat: group message from poller decoding / sending & receiving
0x330a Sep 14, 2023
915fa5b
feat: notify updates for closed group info polling to set recipient name
0x330a Sep 14, 2023
b5b248a
refactor: refactor the configs to implement a parent with common func…
0x330a Sep 17, 2023
43e7255
refactor: fixing compile issues and namespace references throughout. …
0x330a Sep 18, 2023
ec02087
feat: finish implementing scheduling sync and pollers, destination ba…
0x330a Sep 18, 2023
fc57d33
feat: add background group creation and placeholder spinny progress
0x330a Sep 18, 2023
16536c4
feat: get the group member list from convo activity/vm
0x330a Sep 19, 2023
5bd6986
Merge remote-tracking branch 'upstream/dev' into closed_groups
0x330a Oct 1, 2023
fb2a7a8
feat: start adding tests and fix dependencies for tests
0x330a Oct 2, 2023
e419024
feat: add linux native library support for libsession to enable junit…
0x330a Oct 3, 2023
81111ea
feat: add in dexmaker inline to mock final classes with android tests…
0x330a Oct 4, 2023
86e66fb
feat: change storage to regular mocked injected in constructor
0x330a Oct 4, 2023
eddeb12
chore: update libsession-util to latest dev
0x330a Oct 4, 2023
0f7b17b
feat: add lock guard and implement new decrypt method
0x330a Oct 4, 2023
c013a27
refactor: fix the closed group message sending and remove sig_timestamp
0x330a Oct 5, 2023
1a3c86a
refactor: add sodium-internal to cmake and re-import as sodium crypto…
0x330a Oct 6, 2023
aa2282c
test: adding test for group existing and starting members
0x330a Oct 9, 2023
9dfb6f8
Merge remote-tracking branch 'upstream/master' into closed_groups
0x330a Oct 16, 2023
fcb1c56
feat: update libsession protobuf
0x330a Oct 16, 2023
00ad9cf
feat: hacky workaround for new protobuf encryption branches !
0x330a Oct 16, 2023
709f062
fix: don't do double protobuf
0x330a Oct 17, 2023
9b9772f
refactor: tidy up the config sync job
0x330a Oct 18, 2023
faeee66
refactor: process the configs for libsession directly as the byte arr…
0x330a Oct 18, 2023
f69e384
feat: increase testing for new group config types
0x330a Oct 18, 2023
e79a980
refactor: move test functions to automation and storage utilities, ad…
0x330a Oct 19, 2023
8796871
feat: add more view tests
0x330a Oct 19, 2023
2b45df8
feat: finish testing basic UI interactions for creating groups
0x330a Oct 19, 2023
ea4fbb2
feat: update libsession to use latest dev
0x330a Oct 20, 2023
3522468
feat: update protos
0x330a Oct 23, 2023
2448af0
feat: adding basic invite for new groups handling and immediate respo…
0x330a Oct 23, 2023
383634c
feat: add set group invite completed, persist a group config individu…
0x330a Oct 23, 2023
4f78f99
fix: compile issues for handle function
0x330a Oct 23, 2023
d63b5f8
feat: in theory add in the subkey auth callbacks and make a default b…
0x330a Oct 24, 2023
fb8b146
feat: add scheduling invite jobs and handling update config syncs
0x330a Oct 25, 2023
ae7c27c
feat: update libsession-util and get signCallbacks working for authen…
0x330a Oct 25, 2023
5c38c83
feat: starting to rearrange create group fragment for member list
0x330a Oct 26, 2023
6913780
feat: update libsession-util
0x330a Oct 27, 2023
2fc83b8
fix: group keys wasn't populating the config pushes for non keys obje…
0x330a Oct 27, 2023
b62cca2
feat(WIP): build an authenticated delete with sign callback
0x330a Oct 27, 2023
82a55d2
fix: tests and config sync to use the signingkey variant of the authe…
0x330a Oct 30, 2023
baf2157
feat(WIP): group creation / navigation / passing and sharing state in vm
0x330a Nov 1, 2023
fabe2d4
fix: view model should give and receive better structured events and …
0x330a Nov 2, 2023
6c3ac9b
feat: update group creation composables and let contact parcelize
0x330a Nov 2, 2023
c19bd3d
feat: update destinations to account for list of contacts
0x330a Nov 2, 2023
5a2fdb0
feat: need to fix a persist for group members but group with selected…
0x330a Nov 3, 2023
0eadfea
feat: fix group persist and select contact list search for lowercase …
0x330a Nov 6, 2023
abaa765
feat: invite contact uses multiple contacts now, fix compile issues a…
0x330a Nov 6, 2023
e679461
refactor: simplify some calls and start to add failed toast to strings
0x330a Nov 8, 2023
d8bc838
refactor: testing and building out new edit closed group capabilities
0x330a Nov 8, 2023
8e1e228
feat: add edit group view model arch
0x330a Nov 9, 2023
35f4643
feat: adding edit contact list views and presenters and various stora…
0x330a Nov 9, 2023
639ea75
fix: compile issues
0x330a Nov 13, 2023
705f12e
fix: compile issues and group display info for having admin
0x330a Nov 13, 2023
5e349b8
refactor: move configs back to 14 days and use weight for column size…
0x330a Nov 13, 2023
6f32387
feat: add common text style and fix weight issue on name
0x330a Nov 15, 2023
9275a2b
feat: add navigating to edit group invite screen
0x330a Nov 16, 2023
cc24542
feat: add inviting members to group scaffolding, need to wire up the …
0x330a Nov 17, 2023
d162522
feat: fix the invite order properly
0x330a Nov 20, 2023
25caf9b
refactor: execute the sync before inviting, update libsession module
0x330a Nov 20, 2023
d9b70d4
feat: add description
0x330a Nov 20, 2023
896907d
feat: update protos and add a way to do toasts from DI
0x330a Nov 22, 2023
5ed8f70
feat: fill out the contact info properly, add in re-send colors
0x330a Nov 22, 2023
2bb3dda
feat: adding in new closed group message handling logic
0x330a Nov 23, 2023
9e183f6
Merge remote-tracking branch 'upstream/dev' into closed_groups
0x330a Nov 23, 2023
06b8790
fix: compile issues
0x330a Nov 23, 2023
cb5d9c9
fix: boolean logic for denying closed group messages
0x330a Nov 23, 2023
9dd8eef
feat: add handlers for inserting group updates of new group types
0x330a Nov 23, 2023
56e9a42
feat: add message processing
0x330a Nov 24, 2023
d02230c
feat: all the control messages and basic sending of leave group
0x330a Nov 27, 2023
253788b
feat: add revoke and unrevoke subaccount for removing users
0x330a Nov 30, 2023
ecc75df
feat: starting member left admin handling functionality
0x330a Nov 30, 2023
4b6a7c1
feat: bringing the config sync message types and amendment functions …
0x330a Dec 3, 2023
ae6307c
feat: add info name and description updates
0x330a Dec 4, 2023
60f4b17
feat: working on unapproved state for new groups
0x330a Dec 6, 2023
4caa768
feat: add in group invited tracking and group message requests in a b…
0x330a Dec 7, 2023
2628f03
feat: update copy for message reqeusts and fix the decline all / dele…
0x330a Dec 8, 2023
09bd2ea
Merge remote-tracking branch 'origin/master' into closed_groups
0x330a Jan 2, 2024
54d15f0
fix: erroneously starting closed group poller for unapproved group
0x330a Jan 3, 2024
5309c17
fix: invite contacts correctly attaches group name, user correctly se…
0x330a Jan 4, 2024
f204c77
fix: more inconsistencies with poller start stop on pending group cre…
0x330a Jan 5, 2024
68e0dcd
dep: update libsession-util to latest dev
0x330a Jan 5, 2024
ef61f6b
refactor(WIP): testing the auto approve to see if that fixed my signi…
0x330a Jan 5, 2024
9c87a18
feat: add in toaster for failed invites and fix deleting / leaving gr…
0x330a Jan 8, 2024
970e841
feat: add realtime updates for edit group screen, update from fresh d…
0x330a Jan 10, 2024
62b21d7
fix: update group invite failure to use phrase with bold formatting
0x330a Jan 11, 2024
764bcbc
refactor: combine member and group display info to single value updat…
0x330a Jan 11, 2024
a8b0092
fix: remove duplicate info message
0x330a Jan 14, 2024
80dd51a
refactor: always assume invite contacts job failures should be displa…
0x330a Jan 14, 2024
4a13895
Merge branch 'closed_groups' of anongithub.com:0x330a/session-android…
0x330a Jan 14, 2024
c6dab78
refactor: break out some of the edit group features into components a…
0x330a Jan 15, 2024
2e0ba5c
feat: add all block handling use-cases, add missing allClosedGroups c…
0x330a Jan 17, 2024
1349514
refactor: add phrase for conv settings leave group
0x330a Jan 17, 2024
10ca392
refactor: add async group creation and leave group for admins having …
0x330a Jan 18, 2024
20901dd
fix: more testing for previously broken libsession call, add extra re…
0x330a Jan 21, 2024
935c85e
Merge remote-tracking branch 'andy/disappear-2' into closed_groups
0x330a Jan 22, 2024
1458e8b
refactor: merge disappearing messages and fix compile errors
0x330a Jan 22, 2024
12d92eb
feat: add new dialog for new members
0x330a Jan 22, 2024
1aac8f6
refactor: start fixing android tests and writing more ui tests for th…
0x330a Jan 23, 2024
724613b
refactor: tests for edit group and overview, add descriptors, refacto…
0x330a Jan 24, 2024
6091851
chore: update libsession deps
0x330a Jan 25, 2024
c06baf1
test: add edit group view state tests for various displaying elements…
0x330a Jan 29, 2024
c9270dd
feat: add group invite tracking db, refactor edit groups to match des…
0x330a Jan 31, 2024
6dc0be9
feat: add share history to protos, set up conversation blocked for us…
0x330a Feb 1, 2024
d990d67
feat(WIP): display the inviting admin in control message for invite t…
0x330a Feb 4, 2024
0aca6a1
feat: block group message requests, permit block only if inviting adm…
0x330a Feb 5, 2024
bdac794
fix: media message uses groupId properly for new closed groups now
0x330a Feb 5, 2024
69bff02
refactor: add more accessibility IDs
0x330a Feb 6, 2024
707f3f1
fix: update tests to pass and fix compile errors
0x330a Feb 6, 2024
c2aa5ed
Merge remote-tracking branch 'andy/disappear-2' into closed_groups
0x330a Feb 7, 2024
6a2764f
fix: compile issues post-merge latest disappearing
0x330a Feb 7, 2024
0487a20
Merge remote-tracking branch 'andy/disappear-2' into closed_groups
0x330a Feb 9, 2024
7b1032c
feat: start working on new closed group PN subscriptions
0x330a Feb 9, 2024
2c24764
feat: add new cg push notification subscription on join and leave
0x330a Feb 14, 2024
7c8bf5f
fix: rollback test recipientsettings expiry changes
0x330a Feb 14, 2024
13d29ae
refactor: testing the pushes for groups and debugging
0x330a Feb 14, 2024
42162b5
fix: subaccount authentication with new push subscription parameters
0x330a Feb 15, 2024
f941f09
feat: add legacy group banner with latest copy
0x330a Feb 15, 2024
2a77c5a
feat: add extra padding
0x330a Feb 15, 2024
abb11ea
feat: add dialog for legacy group banner
0x330a Feb 16, 2024
af79dc5
feat: start message deletion by hash for group messages
0x330a Feb 18, 2024
f4451d4
feat: validate admin sig
0x330a Feb 19, 2024
53cfa22
feat: add in message db query for hash message id joins and get senders
0x330a Feb 25, 2024
1c2bbd9
feat: add remove all hashes, remove by user
0x330a Feb 26, 2024
9afdb56
Merge branch 'dev' into closed_groups
0x330a Feb 29, 2024
263d4b8
deps: update libsession-util
0x330a Feb 29, 2024
716cf16
fix: compile issues and disappearing message closed group fixes
0x330a Feb 29, 2024
beb7d18
feat: trying to get expiration configs synced across users in new clo…
0x330a Mar 3, 2024
1403562
Merge remote-tracking branch 'origin/master' into closed_groups
0x330a Mar 12, 2024
9245c86
Merge remote-tracking branch 'upstream/dev' into closed_groups
0x330a Mar 13, 2024
b39467b
fix: disappearing messages works for new closed groups now and fix un…
0x330a Mar 13, 2024
79e50b1
feat: add delete for everyone check if we are closed group admin
0x330a Mar 13, 2024
e78fe9d
refactor: don't use testnet
0x330a Mar 4, 2024
3a26427
feat: wire together unsend logic in the form of delete member content…
0x330a Mar 15, 2024
92994f9
fix: open group not showing name properly, work on the message reques…
0x330a Mar 14, 2024
64c9e21
feat: work on the banner for new group members, update protobufs
0x330a Mar 18, 2024
d847181
feat: add in poll from -11 namespace, potentially handled correctly
0x330a Mar 18, 2024
94463ea
feat: update libsession
0x330a Mar 19, 2024
c45b97d
feat: add multi encrypt, delete before timestamp for messages & attac…
0x330a Mar 20, 2024
a6a7ce4
feat: add more -11 processing and sending to iOS format
0x330a Mar 21, 2024
f91edc3
feat: add test for multi encrypt, try to fix multi encrypt in storage…
0x330a Mar 22, 2024
592d786
fix: encrypt decrypt multi works now
0x330a Mar 25, 2024
fc12321
refactor: re-order poll indexes so we don't leave multiple times
0x330a Mar 27, 2024
7f1d7d5
refactor: prepare to merge async group deletion
0x330a Mar 28, 2024
68415c8
Merge branch 'conversation-long-press-menu' into closed_groups
0x330a Mar 28, 2024
50c86a2
fix: compile issues and legacy name rendering, legacy leave asynchron…
0x330a Apr 3, 2024
68b4685
feat: start returning message IDs in new group info changes for async…
0x330a Apr 4, 2024
cd35dab
feat: add libsession group leaving job and start logic for new info m…
0x330a Apr 7, 2024
ed50a43
feat: add more group leaving handling, starting to add authenticated …
0x330a Apr 8, 2024
2767f8b
feat: adding in admin shortcut delete for message hashes
0x330a Apr 10, 2024
7a42204
Merge remote-tracking branch 'upstream/dev' into closed_groups
0x330a Apr 10, 2024
74543c7
fix: merge conflicts and revert create designs to original
0x330a Apr 10, 2024
9e42198
Merge remote-tracking branch 'upstream/dev' into closed_groups
Jun 13, 2024
b788caf
closedGroup -> closedGroupV2 to avoid accidental mixing up of legacy …
Jun 25, 2024
6492718
Merge remote-tracking branch 'upstream/dev' into closed_groups
Jun 25, 2024
63d0480
Merge remote-tracking branch 'upstream/dev' into closed_groups
Jun 27, 2024
ecc7d6a
Create GroupKickCleanUpJob
Jun 28, 2024
2f090bf
Merge remote-tracking branch 'upstream/dev' into closed_groups
Jul 1, 2024
60490a6
Resolved XML layouts, download attachment conflicts
Jul 2, 2024
35ddefe
Fixed pending attachment download logic
Jul 2, 2024
b51eccb
Group name can actually be null
Jul 2, 2024
a9938c0
Move a few ui states from ConversationActivityV2 to ConversationViewM…
Jul 3, 2024
6e2f2ad
Handle kicked out of a group
Jul 4, 2024
76650fc
Add jdk into CI
Jul 4, 2024
d38db5c
Update user groups config's name for one last time before clearing gr…
Jul 4, 2024
5f89558
Merge remote-tracking branch 'upstream/dev' into closed_groups
Jul 4, 2024
1010f2b
Fixed compilation issues after merge
Jul 4, 2024
9f7fb8b
Add openjdk to unit test also
Jul 4, 2024
87d9598
Remove failed tests
Jul 4, 2024
7b7eaf2
Update proto and split member left messages
Jul 8, 2024
46299bf
Merge remote-tracking branch 'upstream/dev' into closed_groups
Jul 10, 2024
6e49d88
Updated security config
Jul 10, 2024
d4f5597
Remove invite message after handling the group
Jul 10, 2024
6e2af68
A few extra group control messages shouldn't be expiring
Jul 12, 2024
875ca0f
Make member state change more obvious
Jul 15, 2024
f5cdafb
Merge invite and promotion handling
Jul 16, 2024
f3a2c97
Merge remote-tracking branch 'upstream/dev' into closed_groups
Jul 19, 2024
b623f6c
Fixes authData used as signing key
Jul 22, 2024
cb21677
Fixes compilation errors
Jul 22, 2024
9517993
Tidied up JNI code around secret key checking
Jul 22, 2024
a5559dc
Fixed up tests
Jul 22, 2024
7fdef4e
Added textAlert color
Jul 22, 2024
1ad9a06
Removed SessionId and moved account id to lib module
Jul 22, 2024
919de96
Uses danger color for failed states on groups
Jul 23, 2024
45fbeb6
Updated libsession-util
Jul 23, 2024
fd7021b
Remove kapt, replace with KSP along with dependency updates to Kotlin…
Jul 23, 2024
000e39b
Corrected comment
Jul 23, 2024
dc80bfe
Merge branch 'refs/heads/ksp' into closed_groups
Jul 23, 2024
7b792c5
Updating gradle sdk
Jul 23, 2024
01bab1f
Upgrade to Kotlin 2.0 and newer AGP versions
Jul 24, 2024
4e9a48b
Fixed glide issues
Jul 24, 2024
c617658
Re-organised view models
Jul 24, 2024
32f1ef5
Fix up legacy group screens
Jul 24, 2024
094f720
Re-organise composes
Jul 24, 2024
0022093
Tidy up create group screen
Jul 24, 2024
04033fa
Tidy up MVVM among groups composable
Jul 25, 2024
516c5cb
Fixed compilation issues
Jul 25, 2024
b7d9953
Tidied up names
Jul 25, 2024
1ac571e
Refactored SessionOutlinedTextField
Jul 26, 2024
d905e95
Tidy up
Jul 26, 2024
e312f67
Fixed a crash and completed create group view model
Jul 26, 2024
494c596
Crash on edit group
Jul 26, 2024
a5e326c
WIP
Jul 29, 2024
98861d2
Tidy up EditGroupScreen
Jul 29, 2024
d26782f
Removing state
Jul 29, 2024
866e36b
More work on editing group
Jul 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https:/
pull: 'always',
environment: { ANDROID_HOME: '/usr/lib/android-sdk' },
commands: [
'apt-get install -y ninja-build',
'apt-get install -y ninja-build openjdk-17-jdk-headless',
'./gradlew testPlayDebugUnitTestCoverageReport'
],
}
Expand Down Expand Up @@ -78,7 +78,7 @@ local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https:/
pull: 'always',
environment: { SSH_KEY: { from_secret: 'SSH_KEY' }, ANDROID_HOME: '/usr/lib/android-sdk' },
commands: [
'apt-get install -y ninja-build',
'apt-get install -y ninja-build openjdk-17-jdk-headless',
'./gradlew assemblePlayDebug',
'./scripts/drone-static-upload.sh'
],
Expand Down
10 changes: 10 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
kind: pipeline
type: docker
name: default

steps:
- name: test
image: mingc/android-build-box:1.24.0
commands:
- bash ./gradlew test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
project.properties
.project
.settings
.kotlin
bin/
gen/
.idea/
Expand Down
89 changes: 37 additions & 52 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,24 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$gradlePluginVersion"
classpath files('libs/gradle-witness.jar')
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
classpath "com.google.gms:google-services:$googleServicesVersion"
classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerVersion"
}
}

plugins {
id 'kotlin-kapt'
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.plugin.serialization'
id 'org.jetbrains.kotlin.plugin.compose'
id 'com.google.devtools.ksp'
id 'com.google.dagger.hilt.android'
id 'kotlin-parcelize'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'witness'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlinx-serialization'
apply plugin: 'dagger.hilt.android.plugin'

configurations.all {
configurations.configureEach {
exclude module: "commons-logging"
}

Expand Down Expand Up @@ -58,24 +53,21 @@ android {
useLibrary 'org.apache.http.legacy'

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

packagingOptions {
exclude 'LICENSE.txt'
exclude 'LICENSE'
exclude 'NOTICE'
exclude 'asm-license.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/proguard/androidx-annotations.pro'
resources {
excludes += ['LICENSE.txt', 'LICENSE', 'NOTICE', 'asm-license.txt', 'META-INF/LICENSE', 'META-INF/NOTICE', 'META-INF/proguard/androidx-annotations.pro']
}
}


splits {
abi {
enable true
Expand All @@ -86,10 +78,8 @@ android {
}

buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.7'
viewBinding true
buildConfig true
}

defaultConfig {
Expand All @@ -111,8 +101,8 @@ android {
buildConfigField "String", "USER_AGENT", "\"OWA\""
buildConfigField "String[]", "LANGUAGES", "new String[]{\"" + autoResConfig().collect { s -> s.replace('-r', '_') }.join('", "') + '"}'
buildConfigField "int", "CANONICAL_VERSION_CODE", "$canonicalVersionCode"
resourceConfigurations += []

resConfigs autoResConfig()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// The following argument makes the Android Test Orchestrator run its
// "pm clear" command after each test invocation. This command ensures
Expand Down Expand Up @@ -172,7 +162,7 @@ android {
}
}

applicationVariants.all { variant ->
applicationVariants.configureEach { variant ->
variant.outputs.each { output ->
def abiName = output.getFilter("ABI") ?: 'universal'
def postFix = abiPostFix.get(abiName, 0)
Expand All @@ -183,23 +173,18 @@ android {
}
}

lintOptions {
abortOnError true
baseline file("lint-baseline.xml")
}

testOptions {
unitTests {
includeAndroidResources = true
}
}

buildFeatures {
dataBinding true
viewBinding true
}

def huaweiEnabled = project.properties['huawei'] != null
lint {
abortOnError true
baseline file('lint-baseline.xml')
}

applicationVariants.configureEach { variant ->
if (variant.flavorName == 'huawei') {
Expand All @@ -215,9 +200,11 @@ android {
}
}

task testPlayDebugUnitTestCoverageReport(type: JacocoReport, dependsOn: "testPlayDebugUnitTest") {
tasks.register("testPlayDebugUnitTestCoverageReport", JacocoReport) {
dependsOn("testPlayDebugUnitTest")

reports {
xml.enabled = true
xml.enabled(true)
}

// Add files that should not be listed in the report (e.g. generated Files from dagger)
Expand All @@ -239,8 +226,9 @@ android {

dependencies {

implementation("com.google.dagger:hilt-android:2.46.1")
kapt("com.google.dagger:hilt-android-compiler:2.44")
implementation("com.google.dagger:hilt-android:$daggerHiltVersion")
ksp("com.google.dagger:hilt-compiler:$daggerHiltVersion")
implementation("androidx.hilt:hilt-navigation-compose:$androidxHiltVersion")

implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation 'androidx.recyclerview:recyclerview:1.2.1'
Expand Down Expand Up @@ -281,17 +269,14 @@ dependencies {
implementation 'commons-net:commons-net:3.7.2'
implementation 'com.github.chrisbanes:PhotoView:2.1.3'
implementation "com.github.bumptech.glide:glide:$glideVersion"
annotationProcessor "com.github.bumptech.glide:compiler:$glideVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"
ksp "com.github.bumptech.glide:ksp:$glideVersion"
implementation 'com.makeramen:roundedimageview:2.1.0'
implementation 'com.pnikosis:materialish-progress:1.5'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'pl.tajchert:waitingdots:0.1.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'com.melnykov:floatingactionbutton:1.3.0'
implementation 'com.google.zxing:android-integration:3.1.0'
implementation "com.google.dagger:hilt-android:$daggerVersion"
kapt "com.google.dagger:hilt-compiler:$daggerVersion"
implementation 'mobi.upod:time-duration-picker:1.1.3'
implementation 'com.google.zxing:core:3.2.1'
implementation ('com.davemorrissey.labs:subsampling-scale-image-view:3.6.0') {
Expand Down Expand Up @@ -324,7 +309,6 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
implementation "com.squareup.phrase:phrase:$phraseVersion"
implementation 'app.cash.copper:copper-flow:1.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
implementation "nl.komponents.kovenant:kovenant:$kovenantVersion"
implementation "nl.komponents.kovenant:kovenant-android:$kovenantVersion"
Expand All @@ -348,7 +332,6 @@ dependencies {
androidTestImplementation('com.adevinta.android:barista:4.2.0') {
exclude group: 'org.jetbrains.kotlin'
}

// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:rules:1.5.0'
Expand All @@ -367,6 +350,8 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-web:3.5.1'
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.5.1'
androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.5.1'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.5.3"
debugImplementation "androidx.compose.ui:ui-test-manifest:1.5.3"
androidTestUtil 'androidx.test:orchestrator:1.4.2'

testImplementation 'org.robolectric:robolectric:4.12.2'
Expand All @@ -385,6 +370,11 @@ dependencies {
androidTestImplementation "androidx.compose.ui:ui-test-junit4-android:$composeVersion"
debugImplementation "androidx.compose.ui:ui-test-manifest:$composeVersion"

// Navigation
implementation "androidx.navigation:navigation-fragment-ktx:$navVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navVersion"
implementation "androidx.navigation:navigation-compose:$navVersion"

implementation "com.google.accompanist:accompanist-themeadapter-appcompat:0.33.1-alpha"
implementation "com.google.accompanist:accompanist-permissions:0.33.1-alpha"
implementation "com.google.accompanist:accompanist-drawablepainter:0.33.1-alpha"
Expand Down Expand Up @@ -415,8 +405,3 @@ def autoResConfig() {
.collect { matcher -> matcher.group(1) }
.sort()
}

// Allow references to generated code
kapt {
correctErrorTypes = true
}
6 changes: 4 additions & 2 deletions app/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="network.loki.messenger.test">
xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<uses-library android:name="android.test.runner"
android:required="false" />

<activity android:name="androidx.activity.ComponentActivity"/>

</application>
</manifest>
Loading