OEXFoundation is a core library providing essential dependencies, extensions, utilities, and interfaces for building plugins for the OpenEdX ecosystem. This library allows developers to extend the functionality of OpenEdX by creating plugins that integrate seamlessly into the OpenEdX platform.
Add it in your root build.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
To add OEXFoundation to your project, include the following dependency in your build.gradle
file:
implementation 'com.github.openedx:openedx-app-foundation-android:1.0.0'
class YourPlugin : OneOfOEXFoundationInterfaces()
You can build and publish your plugin to any repository that suits your needs, such as mavenLocal, mavenCentral, JitPack, or Nexus.
Next, include your plugin dependency in app module build.gradle
file and update the initPlugins
function in
your OpenEdXApp
class to include your plugin class. Here’s how to do it:
private fun initPlugins() {
pluginManager.addPlugin(YourPlugin())
}
Now, PluginManager will handle the integration of your plugin.