Skip to content

Commit

Permalink
Add initial implementation of Capacitor Android bridge and plugin system
Browse files Browse the repository at this point in the history
- Introduced `Bridge` class to manage loading and communication with plugins, proxying native events, and executing plugin methods.
- Added `Plugin` base class for creating new plugins with convenient features for interacting with the `Bridge`.
- Implemented `WebViewLocalServer` to host assets and resources on virtual URLs compatible with the Same-Origin policy.
- Created `BridgeFragment` to facilitate the use of the `Bridge` within a fragment.
- Added various utility classes and methods to support the bridge and plugin functionalities.
- Removed deprecated Java files and replaced them with Kotlin implementations.
  • Loading branch information
tachibana-shin committed Aug 5, 2024
1 parent bc4230e commit b3ee995
Show file tree
Hide file tree
Showing 82 changed files with 7,360 additions and 7,678 deletions.
5 changes: 5 additions & 0 deletions @capacitor/android/capacitor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ buildscript {
tasks.withType(Javadoc).all { enabled = false }

apply plugin: 'com.android.library'
apply plugin: 'org.jetbrains.kotlin.android'

if (System.getenv("CAP_PUBLISH") == "true") {
apply plugin: 'io.github.gradle-nexus.publish-plugin'
Expand Down Expand Up @@ -70,6 +71,9 @@ android {
publishing {
singleVariant("release")
}
kotlinOptions {
jvmTarget = '17'
}
}

repositories {
Expand All @@ -86,6 +90,7 @@ dependencies {
implementation "androidx.fragment:fragment:$androidxFragmentVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.webkit:webkit:$androidxWebkitVersion"
implementation 'androidx.core:core-ktx:1.13.1'
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
Expand Down
Loading

0 comments on commit b3ee995

Please sign in to comment.