Skip to content

Commit 71ad4cd

Browse files
committed
clone capacitor-geckoview
1 parent f04ed69 commit 71ad4cd

File tree

84 files changed

+12219
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+12219
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# @capacitor/android-geckoview
2+
3+
## 2.0.0
4+
5+
### Major Changes
6+
7+
- 8b0f252: feat: upgrade and base on capacitor/4.6.0
8+
9+
## 1.0.10
10+
11+
### Patch Changes
12+
13+
- b1fcd48: chore: code improve in content.js
14+
15+
## 1.0.9
16+
17+
### Patch Changes
18+
19+
- 5e8473d: fix: incorrect logic in content.js
20+
21+
## 1.0.8
22+
23+
### Patch Changes
24+
25+
- 03d332b: fix: fix the bug of overwriting localStorage multiple times
26+
27+
## 1.0.7
28+
29+
### Patch Changes
30+
31+
- 7a88e81: feat: add support for delayed loading and bug fixes for extension
32+
33+
## 1.0.6
34+
35+
### Patch Changes
36+
37+
- 51f3fff: fix: Some capacitor extensions is not responding the messages from the WebView
38+
- 8de4f7b: fix: plugins no effect some time
39+
40+
## 1.0.4
41+
42+
### Patch Changes
43+
44+
- 12068e8: fix: communication bug with native
45+
46+
## 1.0.2
47+
48+
### Patch Changes
49+
50+
- b2dd7fb: refactor: Remove outdated code
51+
52+
## 1.0.0
53+
54+
### Major Changes
55+
56+
- 7995846: fix: Ionic and GeckoView can not communicate with each other
57+
58+
## 0.0.2
59+
60+
### Patch Changes
61+
62+
- feat: Initialize the project

pub/capacitor-geckoview/LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) the Web Media Foundation
2+
All rights reserved.
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
THE SOFTWARE.

pub/capacitor-geckoview/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Project Base
2+
3+
This is a basic project template for our organization, to enable template update, try the following step while setting up your environment:
4+
* Create repo with this template;
5+
* Add a new remote and fetch it:
6+
```
7+
git remote add template https://github.com/jibencaozuo-playground/project-base.git
8+
git fetch --all
9+
```
10+
* Merge them:
11+
```
12+
git merge template/main --allow-unrelated-histories
13+
```
14+
15+
You can follow the update of this template repo now!
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
ext {
2+
androidxActivityVersion = project.hasProperty('androidxActivityVersion') ? rootProject.ext.androidxActivityVersion : '1.4.0'
3+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
4+
androidxCoordinatorLayoutVersion = project.hasProperty('androidxCoordinatorLayoutVersion') ? rootProject.ext.androidxCoordinatorLayoutVersion : '1.2.0'
5+
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.8.0'
6+
androidxFragmentVersion = project.hasProperty('androidxFragmentVersion') ? rootProject.ext.androidxFragmentVersion : '1.4.1'
7+
androidxWebkitVersion = project.hasProperty('androidxWebkitVersion') ? rootProject.ext.androidxWebkitVersion : '1.4.0'
8+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
9+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
10+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
11+
cordovaAndroidVersion = project.hasProperty('cordovaAndroidVersion') ? rootProject.ext.cordovaAndroidVersion : '10.1.1'
12+
}
13+
14+
buildscript {
15+
repositories {
16+
google()
17+
mavenCentral()
18+
maven {
19+
url "https://plugins.gradle.org/m2/"
20+
}
21+
maven{
22+
url "https://maven.mozilla.org/maven2/"
23+
}
24+
}
25+
dependencies {
26+
classpath 'com.android.tools.build:gradle:8.2.1'
27+
28+
if (System.getenv("CAP_PUBLISH") == "true") {
29+
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
30+
}
31+
}
32+
}
33+
34+
tasks.withType(Javadoc).all { enabled = false }
35+
36+
apply plugin: 'com.android.library'
37+
38+
if (System.getenv("CAP_PUBLISH") == "true") {
39+
apply plugin: 'io.github.gradle-nexus.publish-plugin'
40+
apply from: file('../scripts/publish-root.gradle')
41+
apply from: file('../scripts/publish-module.gradle')
42+
}
43+
44+
android {
45+
namespace "com.getcapacitor.android"
46+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
47+
defaultConfig {
48+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
49+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
50+
versionCode 1
51+
versionName "1.0"
52+
consumerProguardFiles 'proguard-rules.pro'
53+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
54+
}
55+
buildTypes {
56+
release {
57+
minifyEnabled false
58+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
59+
}
60+
}
61+
buildFeatures {
62+
buildConfig true
63+
}
64+
lintOptions {
65+
baseline file("lint-baseline.xml")
66+
abortOnError true
67+
warningsAsErrors true
68+
}
69+
compileOptions {
70+
sourceCompatibility JavaVersion.VERSION_11
71+
targetCompatibility JavaVersion.VERSION_11
72+
}
73+
}
74+
75+
repositories {
76+
google()
77+
mavenCentral()
78+
maven{
79+
url "https://maven.mozilla.org/maven2/"
80+
}
81+
}
82+
83+
dependencies {
84+
implementation fileTree(dir: 'libs', include: ['*.jar'])
85+
// implementation"androidx.appcompat:appcompat:$androidxAppCompatVersion"
86+
// implementation "androidx.core:core:$androidxCoreVersion"
87+
// implementation "androidx.activity:activity:$androidxActivityVersion"
88+
// implementation "androidx.fragment:fragment:$androidxFragmentVersion"
89+
implementation "androidx.appcompat:appcompat:1.6.1"
90+
implementation "androidx.core:core:1.9.0"
91+
implementation "androidx.activity:activity:1.6.1"
92+
implementation "androidx.fragment:fragment:1.5.5"
93+
94+
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
95+
implementation "androidx.webkit:webkit:$androidxWebkitVersion"
96+
testImplementation "junit:junit:$junitVersion"
97+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
98+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
99+
implementation "org.apache.cordova:framework:$cordovaAndroidVersion"
100+
testImplementation 'org.json:json:20140107'
101+
testImplementation 'org.mockito:mockito-inline:3.6.28'
102+
103+
// @Edward: Different versions of Geckoview for different balances of size and performance
104+
// @Edward: Version numbers for newer Geckoview versions can be obtained from:
105+
// https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/geckoview-omni/
106+
107+
// def geckoViewVersion = "83.0.20201112153044" // minimum (55.8MB download size)
108+
// def geckoViewVersion = "100.0.20220519220738" // (61.5MB download size)
109+
def geckoViewVersion = "117.0.20230912013654" // best size-performance (69.2MB download size)
110+
111+
api "org.mozilla.geckoview:geckoview:$geckoViewVersion"
112+
implementation 'org.nanohttpd:nanohttpd-webserver:2.3.1'
113+
}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<issues format="5" by="lint 4.1.1" client="gradle" variant="all" version="4.1.1">
3+
4+
<issue
5+
id="DefaultLocale"
6+
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
7+
errorLine1=" String msg = String.format("
8+
errorLine2=" ^">
9+
<location
10+
file="src/main/java/com/getcapacitor/BridgeWebChromeClient.java"
11+
line="474"
12+
column="26"/>
13+
</issue>
14+
15+
<issue
16+
id="DefaultLocale"
17+
message="Implicitly using the default locale is a common source of bugs: Use `toUpperCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`."
18+
errorLine1=" return mask.toUpperCase().equals(string.toUpperCase());"
19+
errorLine2=" ~~~~~~~~~~~">
20+
<location
21+
file="src/main/java/com/getcapacitor/util/HostMask.java"
22+
line="110"
23+
column="29"/>
24+
</issue>
25+
26+
<issue
27+
id="DefaultLocale"
28+
message="Implicitly using the default locale is a common source of bugs: Use `toUpperCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`."
29+
errorLine1=" return mask.toUpperCase().equals(string.toUpperCase());"
30+
errorLine2=" ~~~~~~~~~~~">
31+
<location
32+
file="src/main/java/com/getcapacitor/util/HostMask.java"
33+
line="110"
34+
column="57"/>
35+
</issue>
36+
37+
<issue
38+
id="DefaultLocale"
39+
message="Implicitly using the default locale is a common source of bugs: Use `toLowerCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`."
40+
errorLine1=" switch (spinnerStyle.toLowerCase()) {"
41+
errorLine2=" ~~~~~~~~~~~">
42+
<location
43+
file="src/main/java/com/getcapacitor/Splash.java"
44+
line="127"
45+
column="38"/>
46+
</issue>
47+
48+
<issue
49+
id="DefaultLocale"
50+
message="Implicitly using the default locale is a common source of bugs: Use `toLowerCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`."
51+
errorLine1=" if (header.getKey().equalsIgnoreCase(&quot;Accept&quot;) &amp;&amp; header.getValue().toLowerCase().contains(&quot;text/html&quot;)) {"
52+
errorLine2=" ~~~~~~~~~~~">
53+
<location
54+
file="src/main/java/com/getcapacitor/WebViewLocalServer.java"
55+
line="327"
56+
column="89"/>
57+
</issue>
58+
59+
<issue
60+
id="SimpleDateFormat"
61+
message="To get local formatting use `getDateInstance()`, `getDateTimeInstance()`, or `getTimeInstance()`, or use `new SimpleDateFormat(String template, Locale locale)` with for example `Locale.US` for ASCII dates."
62+
errorLine1=" String timeStamp = new SimpleDateFormat(&quot;yyyyMMdd_HHmmss&quot;).format(new Date());"
63+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
64+
<location
65+
file="src/main/java/com/getcapacitor/BridgeWebChromeClient.java"
66+
line="511"
67+
column="28"/>
68+
</issue>
69+
70+
<issue
71+
id="SimpleDateFormat"
72+
message="To get local formatting use `getDateInstance()`, `getDateTimeInstance()`, or `getTimeInstance()`, or use `new SimpleDateFormat(String template, Locale locale)` with for example `Locale.US` for ASCII dates."
73+
errorLine1=" DateFormat df = new SimpleDateFormat(&quot;yyyy-MM-dd&apos;T&apos;HH:mm&apos;Z&apos;&quot;);"
74+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
75+
<location
76+
file="src/main/java/com/getcapacitor/PluginResult.java"
77+
line="44"
78+
column="25"/>
79+
</issue>
80+
81+
<issue
82+
id="SetJavaScriptEnabled"
83+
message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully"
84+
errorLine1=" settings.setJavaScriptEnabled(true);"
85+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
86+
<location
87+
file="src/main/java/com/getcapacitor/Bridge.java"
88+
line="384"
89+
column="9"/>
90+
</issue>
91+
92+
<issue
93+
id="Recycle"
94+
message="This `TypedArray` should be recycled after use with `#recycle()`"
95+
errorLine1=" TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.bridge_fragment);"
96+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
97+
<location
98+
file="src/main/java/com/getcapacitor/BridgeFragment.java"
99+
line="84"
100+
column="32"/>
101+
</issue>
102+
103+
<issue
104+
id="StaticFieldLeak"
105+
message="Do not place Android context classes in static fields; this is a memory leak"
106+
errorLine1=" private static ImageView splashImage;"
107+
errorLine2=" ~~~~~~">
108+
<location
109+
file="src/main/java/com/getcapacitor/Splash.java"
110+
line="41"
111+
column="13"/>
112+
</issue>
113+
114+
<issue
115+
id="StaticFieldLeak"
116+
message="Do not place Android context classes in static fields; this is a memory leak"
117+
errorLine1=" private static ProgressBar spinnerBar;"
118+
errorLine2=" ~~~~~~">
119+
<location
120+
file="src/main/java/com/getcapacitor/Splash.java"
121+
line="42"
122+
column="13"/>
123+
</issue>
124+
125+
<issue
126+
id="Overdraw"
127+
message="Possible overdraw: Root element paints background `#F0FF1414` with a theme that also paints a background (inferred theme is `@android:style/Theme.Holo`)"
128+
errorLine1=" android:background=&quot;#F0FF1414&quot;"
129+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
130+
<location
131+
file="src/main/res/layout/fragment_bridge.xml"
132+
line="5"
133+
column="5"/>
134+
</issue>
135+
136+
</issues>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<lint>
3+
<issue id="GradleDependency" severity="ignore" />
4+
<issue id="AndroidGradlePluginVersion" severity="ignore" />
5+
</lint>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
</manifest>

0 commit comments

Comments
 (0)