Multiplatform (Android and iOS currently) version of the Probe app.
composeApp
is for code that will be shared across your Compose Multiplatform applications.
It contains several subfolders:
commonMain
is for code that’s common for all targets.androidMain
Android-specific codeiosMain
iOS-specific code written in KotlindwMain
News Media Scan specific Branding and customizationooniMain
OONI Probe specific Branding and customizationiosApp
contains the iOS application configuration and the engine integration written in Swift
.github
contains the Continuous Integration configuration for Github
gradle/libs.versions.toml
specifies the versions of the plugins and dependencies used across
the different modules.
Our aim is to take advantage of multiplatform features as much as possible, specially Compose Multiplatform. Platform specific modules will be limited to the minimum required to setup and launch the apps with a compose wrapper, besides platform-specific code that we can’t avoid, such as the loading our pre-compiled engine.
engine
the Oonimkall engine abstraction in kotlin
probe
our Probe app code
di
dependency injectionshared
classes and methods shared across the whole appdata
data layer code (database, preferences, network...)ui
UI layer code, organized into features/screensTo build, install, and run your application, use the following commands:
For OONI Probe:
./gradlew runDebug -Porganization=ooni
For News Media Scan:
./gradlew runDebug -Porganization=dw
There is a custom gradle task(copyBrandingToCommonResources
) that is used to copy brand specific
resources to the common resources folder. This task is called before the preBuild
task.
Configure run configurations for easy execution within Android Studio:
The "Run/Debug Configurations" already has the proper configuration and you just need to select the
XCode Project Scheme OONIProbe
and run it.
The "Run/Debug Configurations" already has the proper configuration and you just need to select the
XCode Project Scheme NewsMediaScan
and run it.
pod install
in the iosApp
directory.Common tests (tests inside commonTest
) only run on the iOS Simulator.
Choosing the option android (local)
won't work. This is a current
issue with
the official testing library.