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

Fix Part of #5084: Initialize Appcheck #5115

Merged
merged 111 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 105 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
f81bdb1
Add show survey popup event log
adhiamboperes Jul 6, 2023
c51017f
Add begin survey event log
adhiamboperes Jul 6, 2023
1eadc30
Log survey response events
adhiamboperes Jul 7, 2023
b258164
Refactor tests
adhiamboperes Jul 9, 2023
50ac657
Add tests to verify the abandon survey event log
adhiamboperes Jul 9, 2023
6ad3a23
Add tests to verify the mandatory questions event logs
adhiamboperes Jul 9, 2023
913e2fe
Merge branch 'develop' of github.com:oppia/oppia-android into nps-sur…
adhiamboperes Jul 9, 2023
7ea7a13
Add test for begin survey event
adhiamboperes Jul 9, 2023
2558c0b
Add tests for SurveyEventsLogger
adhiamboperes Jul 9, 2023
4b2f8da
Add tests for Survey Events in OppiaLogger
adhiamboperes Jul 9, 2023
bb42456
Add bazel BUILD definition for SurveyEventsLogger
adhiamboperes Jul 9, 2023
277f3c9
Fix nits
adhiamboperes Jul 9, 2023
8e7f3f6
Remove large tests that can't run on either local or CI.
adhiamboperes Jul 9, 2023
bd844aa
Bazel BUILD dependency
adhiamboperes Jul 10, 2023
a264b3a
Refactor TODO and semantics
adhiamboperes Jul 10, 2023
f68e8ae
Update boolean naming
adhiamboperes Jul 11, 2023
9237c66
Merge branch 'develop' of github.com:oppia/oppia-android into nps-sur…
adhiamboperes Jul 11, 2023
cb22dfb
Log optional survey response
adhiamboperes Jul 21, 2023
110d96f
Add firebase Auth fore uploading to firestore
adhiamboperes Jul 21, 2023
c1d4c19
Add BUILD definitions for firestore loggers
adhiamboperes Jul 21, 2023
931019a
Add logic for syncing to firestore
adhiamboperes Jul 21, 2023
32566a6
update maven dependencies
adhiamboperes Jul 21, 2023
ba318eb
Fix import ordering
adhiamboperes Jul 21, 2023
f573158
pull develop and resolve conflicts
adhiamboperes Jul 21, 2023
6b4d488
Add new files to CODEOWNERS
adhiamboperes Jul 21, 2023
44e37b0
Fix prod bazel dependencies
adhiamboperes Jul 23, 2023
d1a11d3
Fix npe in domain/src/test/java/org/oppia/android/domain/oppialogger/…
adhiamboperes Jul 23, 2023
cb25e31
Remove redundant firestore/auth initialization
adhiamboperes Jul 25, 2023
b03011c
Introduce AuthenticationController
adhiamboperes Jul 26, 2023
d9a7fe5
Fix missing KDOc
adhiamboperes Jul 26, 2023
c0a48da
Add new files to CODEOWNERS
adhiamboperes Jul 26, 2023
e6c2568
Fix BUILD file formatting
adhiamboperes Jul 26, 2023
9ad162a
Merge branch 'develop' of github.com:oppia/oppia-android into nps-opt…
adhiamboperes Jul 26, 2023
0de4f3a
Fix failing log upload tests
adhiamboperes Jul 26, 2023
b7bafb5
Add more tests for FirestoreDataController
adhiamboperes Jul 26, 2023
7b13358
Add tests for FakeAuthenticationController.kt
adhiamboperes Jul 26, 2023
fe1dfdf
Add missing bazel dep for build flavors
adhiamboperes Jul 26, 2023
9d66b9f
Fix static check failures
adhiamboperes Jul 26, 2023
6f1fb2a
Add TestAuthenticationModule to test files.
adhiamboperes Jul 27, 2023
e3f1e84
Fix failing tests
adhiamboperes Jul 27, 2023
2996787
Rename variable in ViewEventLogsViewModel.kt
adhiamboperes Jul 28, 2023
ec2e3f8
Add missing dependency for e2e instrumentation module
adhiamboperes Jul 28, 2023
52c438a
Fix proguarding
adhiamboperes Jul 31, 2023
dc5dac3
Fix failing eventlog test
adhiamboperes Aug 1, 2023
ffdeb2b
Add appcheck and play integrity to gradle
adhiamboperes Aug 1, 2023
c67cda2
Add appcheck and play integrity to bazel
adhiamboperes Aug 1, 2023
93d3c6a
Fix failing tests
adhiamboperes Aug 3, 2023
55aa0b4
Add missing bazel dependencies
adhiamboperes Aug 3, 2023
a04caa9
Merge branch 'develop' of github.com:oppia/oppia-android into nps-opt…
adhiamboperes Aug 3, 2023
3e81132
Exempt AuthenticationModule from tests
adhiamboperes Aug 3, 2023
aeb213e
Ignore failing test
adhiamboperes Aug 3, 2023
781644f
Merge branch 'develop' of github.com:oppia/oppia-android into nps-opt…
adhiamboperes Aug 3, 2023
ca5cd8c
Reformat @Ignore
adhiamboperes Aug 3, 2023
46fa660
Merge branch 'nps-optional-response-upload' into configure-appcheck
adhiamboperes Aug 3, 2023
6a0b78f
Refactor test
adhiamboperes Aug 3, 2023
bc05e0b
Refactor event logs viewmodel to use a fake in tests
adhiamboperes Sep 5, 2023
91e3ed4
Merge remote-tracking branch 'upstream/nps-optional-response-upload' …
adhiamboperes Sep 5, 2023
b1d0873
Update maven_dependencies.textproto
adhiamboperes Sep 6, 2023
8083d8a
Add app check dependencies
adhiamboperes Sep 6, 2023
e9daaec
Merge branch 'configure-appcheck' of github.com:oppia/oppia-android i…
adhiamboperes Sep 6, 2023
6bb7831
Merge branch 'develop' of github.com:oppia/oppia-android into nps-opt…
adhiamboperes Sep 6, 2023
64ad461
Add FakeAuthenticationControllerFactory
adhiamboperes Sep 7, 2023
8f5fc58
Add test for AuthenticationModule
adhiamboperes Sep 7, 2023
ccbc2e3
Fix static check test failures
adhiamboperes Sep 7, 2023
89a5bdf
Add newline after imports in OptionsActivityTest.kt
adhiamboperes Sep 21, 2023
d1c7240
Update file documentation
adhiamboperes Sep 21, 2023
78efadc
Update animal-sniffer-annotations license
adhiamboperes Sep 21, 2023
54d2538
Remove mockito from production deps
adhiamboperes Sep 26, 2023
d8d9d8c
Refactor auth tests build file comments
adhiamboperes Sep 26, 2023
4314ca0
Change firestore_logger_impl visibility to private
adhiamboperes Sep 26, 2023
e0bc397
Add test for TestAuthenticationModule
adhiamboperes Sep 27, 2023
ffb07d9
Refactor AuthenticationController and its bindings.
adhiamboperes Sep 29, 2023
64bb998
Renamed AuthenticationListener to AuthenticationWrapper.kt
adhiamboperes Sep 29, 2023
85115a6
Add TestAuthenticationModuleTest to CODEOWNERS
adhiamboperes Sep 29, 2023
7cccc8b
Create a debug interface for FirestoreEventLogger
adhiamboperes Oct 2, 2023
47921bd
Merge branch 'develop' of github.com:oppia/oppia-android into nps-opt…
adhiamboperes Oct 2, 2023
90cf929
Refactor DebugFirestoreEventLoggerImpl
adhiamboperes Oct 3, 2023
3e00d16
Fix failing tests
adhiamboperes Oct 3, 2023
022ef33
Merge branch 'develop' of github.com:oppia/oppia-android into nps-opt…
adhiamboperes Oct 18, 2023
35c0956
Fix DebugFirestoreEventLoggerImplTest tests
adhiamboperes Oct 23, 2023
ab161bf
Fix proguard failure.
adhiamboperes Oct 25, 2023
5848741
Merge branch 'develop' of github.com:oppia/oppia-android into nps-opt…
adhiamboperes Oct 26, 2023
8215c53
Fix failing tests
adhiamboperes Oct 26, 2023
99a15d3
Merge branch 'develop' into nps-optional-response-upload
adhiamboperes Nov 22, 2023
8336320
Merge branch 'develop' into nps-optional-response-upload
adhiamboperes Nov 29, 2023
e190fd9
Create firebase and firestore wrappers
adhiamboperes Jan 11, 2024
8a8d20d
Address review comments
adhiamboperes Jan 12, 2024
893f6e9
Merge branch 'develop' of github.com:oppia/oppia-android into nps-opt…
adhiamboperes Jan 12, 2024
a8e19df
Update maven install
adhiamboperes Jan 12, 2024
8fb5e6b
Add tests for prod impl of firebase auth
adhiamboperes Jan 15, 2024
06a999c
Remove singleton annotation from TestAuthenticationModule
adhiamboperes Jan 15, 2024
b5a1230
Add FakeFirebaseAuthInstanceWrapperImpl to CODEOWNERS
adhiamboperes Jan 15, 2024
4d3a893
Fix failing eventlogs tests
adhiamboperes Jan 15, 2024
e1776b8
Add test file exemption for FakeFirebaseAuthInstanceWrapperImpl
adhiamboperes Jan 16, 2024
2d4228c
Add withtimeout to authentication logic
adhiamboperes Jan 19, 2024
8a0088d
Resolve background dispatcher dependency
adhiamboperes Jan 23, 2024
dddbd98
Ensure debug firestore pushes events to the cloud
adhiamboperes Jan 23, 2024
c439ce2
Update branch and resolve conflicts
adhiamboperes Jan 23, 2024
72473fa
Repin dependencies
adhiamboperes Jan 23, 2024
b1c2df7
Configure debug appcheck
adhiamboperes Jan 24, 2024
d7b95bd
Add debug appcheck dependency to bazel
adhiamboperes Jan 24, 2024
91a3979
switch debug build check for build flavor check
adhiamboperes Jan 26, 2024
f82039c
Sync with develop and resolve conflicts
adhiamboperes Jan 26, 2024
d99e698
Merge branch 'develop' of github.com:oppia/oppia-android into configu…
adhiamboperes Jan 29, 2024
83a356c
Fix lint issue
adhiamboperes Jan 29, 2024
f517ac4
Address review comments
adhiamboperes Jan 31, 2024
2f39df3
Merge branch 'develop' of github.com:oppia/oppia-android into configu…
adhiamboperes Jan 31, 2024
e9776b4
Merge branch 'develop' into configure-appcheck
BenHenning Feb 6, 2024
e20c546
Merge branch 'develop' of github.com:oppia/oppia-android into configu…
adhiamboperes Feb 13, 2024
5684796
Clarify app check usage comment
adhiamboperes Feb 13, 2024
489972b
Merge branch 'configure-appcheck' of github.com:oppia/oppia-android i…
adhiamboperes Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,9 @@ android_library(
name = "firestore_deps",
exports = [
"//third_party:com_google_auto_value_auto-value-annotations",
"//third_party:com_google_firebase_firebase-appcheck",
"//third_party:com_google_firebase_firebase-appcheck-debug",
"//third_party:com_google_firebase_firebase-appcheck-playintegrity",
"//third_party:org_checkerframework_checker-qual",
],
)
Expand Down
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ dependencies {
'com.google.dagger:dagger:2.24',
'com.google.firebase:firebase-analytics:17.5.0',
'com.google.firebase:firebase-analytics-ktx:17.5.0',
'com.google.firebase:firebase-appcheck:16.0.0',
'com.google.firebase:firebase-appcheck-debug:16.0.0',
'com.google.firebase:firebase-appcheck-playintegrity:16.0.0',
'com.google.firebase:firebase-core:17.5.0',
'com.google.firebase:firebase-crashlytics:17.0.0',
'com.google.firebase:firebase-firestore-ktx:24.2.1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ import androidx.multidex.MultiDexApplication
import androidx.work.Configuration
import androidx.work.WorkManager
import com.google.firebase.FirebaseApp
import com.google.firebase.appcheck.FirebaseAppCheck
import com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory
import com.google.firebase.appcheck.playintegrity.PlayIntegrityAppCheckProviderFactory
import org.oppia.android.app.activity.ActivityComponent
import org.oppia.android.app.activity.ActivityComponentFactory
import org.oppia.android.app.model.BuildFlavor
import org.oppia.android.domain.oppialogger.ApplicationStartupListener

/** The root base [Application] of the Oppia app. */
Expand Down Expand Up @@ -47,6 +51,15 @@ abstract class AbstractOppiaApplication(
// TODO(#4751): Re-enable WorkManager for S+.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
FirebaseApp.initializeApp(applicationContext)
if (component.getCurrentBuildFlavor() == BuildFlavor.DEVELOPER) {
FirebaseAppCheck.getInstance().installAppCheckProviderFactory(
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
DebugAppCheckProviderFactory.getInstance(),
)
} else {
FirebaseAppCheck.getInstance().installAppCheckProviderFactory(
PlayIntegrityAppCheckProviderFactory.getInstance(),
)
}
WorkManager.initialize(applicationContext, workManagerConfiguration)
val workManager = WorkManager.getInstance(applicationContext)
component.getAnalyticsStartupListenerStartupListeners().forEach { it.onCreate(workManager) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.app.Application
import androidx.work.Configuration
import dagger.BindsInstance
import org.oppia.android.app.activity.ActivityComponentImpl
import org.oppia.android.app.model.BuildFlavor
import org.oppia.android.domain.oppialogger.ApplicationStartupListener
import org.oppia.android.domain.oppialogger.analytics.AnalyticsStartupListener
import javax.inject.Provider
Expand All @@ -30,4 +31,6 @@ interface ApplicationComponent : ApplicationInjector {
fun getAnalyticsStartupListenerStartupListeners(): Set<AnalyticsStartupListener>

fun getWorkManagerConfiguration(): Configuration

fun getCurrentBuildFlavor(): BuildFlavor
}
1 change: 1 addition & 0 deletions domain/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ TEST_DEPS = [
":interaction_object_test_builder",
"//app:crashlytics",
"//app:crashlytics_deps",
"//app:firestore_deps",
"//app/src/main/java/org/oppia/android/app/application/testing:testing_build_flavor_module",
"//config/src/java/org/oppia/android/config:all_languages_config",
"//data/src/main/java/org/oppia/android/data/backends/gae:network_config_prod_module",
Expand Down
33 changes: 33 additions & 0 deletions scripts/assets/maven_dependencies.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,39 @@ maven_dependency {
}
}
}
maven_dependency {
artifact_name: "com.google.firebase:firebase-appcheck-debug:16.0.0"
artifact_version: "16.0.0"
license {
license_name: "The Apache Software License, Version 2.0"
original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt"
scrapable_link {
url: "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
}
maven_dependency {
artifact_name: "com.google.firebase:firebase-appcheck-playintegrity:16.0.0"
artifact_version: "16.0.0"
license {
license_name: "The Apache Software License, Version 2.0"
original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt"
scrapable_link {
url: "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
}
maven_dependency {
artifact_name: "com.google.firebase:firebase-appcheck:16.0.0"
artifact_version: "16.0.0"
license {
license_name: "The Apache Software License, Version 2.0"
original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt"
scrapable_link {
url: "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
}
maven_dependency {
artifact_name: "com.google.firebase:firebase-auth-ktx:19.3.1"
artifact_version: "19.3.1"
Expand Down
Loading
Loading